Parameters of Action "rename"
Name | Type | Direction | Description |
---|
name | String | in | Fully qualified file name of the file you want to rename, including the path. |
newName | String | in | New name you want to rename the file to. We recommend to provide a fully qualified file name (including the path). |
Defining a "rename" Action
To rename a file with the file system adapter, you need to define a rename action on an action having the stereotype <<FileSystemAdapter>>. You can do this manually or with the help of the xUML Action Wizard (see context menu of the action node).
Figure: Renaming a File
The new file name newName is of the base type String and has to be provided dynamically. We recommend to provide a fully qualified file name (including the path).
The path and file name of the file you want to rename are defined in the component diagram. The link from the activity diagram to the physical information is established by an alias (in the present example: FileAlias). See File System Components for more information on file system aliases.
For information on how to access a file or directory dynamically refer to Dynamic File System Access.
Find a list of all File System Adapter error codes on System Errors of the File System Adapter.
Error Code | Description |
---|
FSASDM/26 | Failed renaming <file name>. |
Moving Files using the "rename" Action
You can use the rename action to easily move around files, simply by providing a new path with parameter newName.
Find a list of all File System Adapter error codes on System Errors of the File System Adapter.
Error Code | Description |
---|
FSASDM/26 | Failed renaming <file name>. |