File Write activity
The File Write activity writes a file on a Linux or UNIX computer.
The source file can be an absolute or relative path from the Directory. If an absolute path is used, then no value is required in the Directory field.
This activity replaces an SSH activity by the same name available in releases prior to Istanbul. If you have a workflow created in a previous version that uses the deprecated activity, your workflow will continue to work normally after upgrading to Istanbul. However, all new workflows must use the custom version of this activity. This activity was built with the SSH activity template, which gives workflow administrators the ability to store input and output variables in the databus.
Input variables
| Field | Description |
|---|---|
| hostname | Hostname or IP address of destination server for SSH activity. |
| directory | Name of the working (target) directory. |
| file | Name of the file to be written. |
| behavior | Select one of the following:
|
| contents | What to write or append (depending on the behavior) to the file |
Output variables
| Variable | Description |
|---|---|
| return_code | Indicates whether or not the file write operation was successful. |
| error_message | Message that indicates if an error has occurred. Any value other than 0 indicates a failure. |
Conditions
| Condition | Description |
|---|---|
| Success | The activity wrote a file in the target directory. |
| Failure | The activity failed to write a file in the target directory. |