How do I run my own program in a Flow?
To run your own script or tool when a Flow's steps finish, add a Run command step. It is under Advanced in the Palette.
- Add Run command.
- In Program, type or choose the full path. It must start with
/, and the file must be executable. - Press Add argument for each argument. Each row is one argument.
- Set Time limit (seconds). The default is 300. You can use 1 to 86400.
- Wire the steps it follows into After or Result / files / source.
Tokens
Arguments can use {project} {day} {camera} {roll} {dit}, {card} (the card volume name), {source}, {folder}, {project_root}, and {dest1} {dest2} and so on for the copy folders in destination order. Facts a run does not have are empty.
The program also gets FF_RUN_ID, FF_FLOW_NAME, FF_PROJECT, FF_DAY, FF_CAMERA, FF_ROLL and FF_DIT as environment variables.
What to know
- The program runs directly, not through a shell. A card name with spaces or symbols stays one argument.
- An exit code other than 0 fails the step. So does passing the time limit.
- If your license is read-only, ForwardFlow will not run commands. It says "Your license is read-only, so ForwardFlow won't run commands. Renew to run this step."
Wire the step's Failed output into On failure if you want to hear about a failed command.