Order in which Actions are Executed

For Execute Command Actions and Execute Advanced Workflow Actions, EFT does not wait for a reply before returning control to the Event Rule thread, unless an "if failed" Condition is specified, such as Stop Processing this Rule. If an "if failed" Condition is specified, regardless of whether the Command succeeded or failed, the Event Rule processor waits for a return message from the invoked process before moving on to the next Rule.

Example: Command Action Followed by OpenPGP Action

A common Event Rule scenario is downloading a file, running a script against that file (either with an Execute Command Action or an Execute Advanced Workflow Action), then encrypting or decrypting the file.

In the illustrations below, an Event Rule has three Actions: first an SFTP get (download a file from the Remote Server), followed by an Execute Command Action that runs a script (cscript.exe), followed by an OpenPGP Action.

In Example 1, an "If failed" Condition was not defined for the Command, so when the Command executes, the next Action (OpenPGP) is called almost immediately after the script is called. If you are doing a transform on the file you just retrieved that must be completed PRIOR to the OpenPGP operation, the potential risk is that there will be a race condition and likely OpenPGP will lose; that is, the pre-transformed file will be encrypted or the Action will fail because the script has locked the file for some reason.  

In Example 2 we've added the "If failed" Condition so that the OpenPGP Action does not start until after the Command has finished running the script.

Related Topic