Next Action
- Last Updated: December 12, 2023
- 3 minute read
- MOVEit Automation
- Version 2023.1
- Version 2023
- Documentation
A next action setting defines an action to take following the completion of a task. The action can be to either send an email message to a specified recipient or list of recipients, or to run another task.
A next action setting can be configured to run after any combination of the following task results:
- Success - The task found files to operate on and successfully operated on them.
- Failure - The task found files to operate on but failed to operate on them.
- No Action - The task did not find any files to operate on or the files it found were "ignored" by a process.
A next action can also be configured to run after the Task, which will cause the next action to run once after completion of the entire task, or after Each File, which will cause the next action to run after each file is completely processed.
When sending an email following completion of a task, there are four settings to configure:
- SMTP Host - The SMTP host to use for sending email. At least one SMTP host must be configured in the Hosts section in order to send an email.
- AddressTo - A single email address or a comma-separated list of email addresses to send an email to. You may use Macros in this field.
- Subject - Subject of the email message. You may use Macros in this field.
- Message - Main body of the email message. You may use Macros in this field.
When starting another task following completion of a task, there are two settings to configure:
- Task To Run - The task to run.
- Parameters - A list of task parameters to forward on to the next task. Adding and removing parameters from the list can be done using the Add and Remove button below the list.
If the selected task is already running when MOVEit Automation tries to start it via Next Action, MOVEit Automation will wait until the running instance of the task is completed before it starts the task.
Using Error Macros in Next Actions
As of MOVEit Automation 3.2, the built-in "[Error..." macros can be used to send the error code and description of any error which happened in the subject or body of a Next Action notification.
For example, a Next Action message body of:
At [yyyy]-[mm]-[dd] [hh]:[tt]:[ss], task '[TaskName]' encountered error #[ErrorCodeFile] - [ErrorDescriptionFile] - while transporting '[OrigName]' (FYI, the current task error is #[ErrorCodeTask] - [ErrorDescriptionTask])
...will be interpreted as:
At 2005-01-07 12:37:26, task 'Test Error Macros' encountered error #2234 - CopyFile returned Access is denied. - while transporting 'readme.txt' (FYI, the current task error is #2234 - CopyFile returned Access is denied.)
If you settle on a preferred combination of messages using error macros, you may want to propagate their use by setting them up as Global Parameters and configure your tasks' Next Actions to work off global parameters rather than a different message for each task.
Next Action Tips
Next Actions can generate failures. For example, if a task successfully transfers 5 files but cannot send the email to notify the operator, then the whole task will be marked failed. To prevent this kind of behavior, point your mail host to a reliable external server or to the localhost SMTP server when using email-based Next Actions.