An activity state trigger is used to initiate workflow activity when one or more activities within a preceding workflow start or complete. The activities contained in the activity state’s workflow can optionally act upon the data set output by the preceding workflow.
The following options are available in the mini toolbar when you select an activity state trigger:
• Activate/Deactivate trigger: if the interaction contains no unsaved changes, the workflow’s active status is Inactive and the interaction contains no validation errors, this button is enabled and its tooltip reads Activate trigger. Invocation causes the workflow to activate. If the conditions in respect of the trigger’s input workflow have not been met, the trigger enters a Waiting for trigger state. If the conditions have been met, the workflow commences Playing. This also occurs at the point at which the conditions are met.
If the workflow’s status is Inactive and the interaction has validation errors, the button is enabled and its tooltip reads Activate trigger. However, attempting to activate the trigger causes display of a warning message, and the workflow is not activated.
If the workflow’s status is Waiting for Trigger, the button is enabled and its tooltip reads Deactivate trigger. You can re-activate the trigger if required.
• Rollback current Workflow Instance: only available post-completion of production execution. Removes the workflow instance entirely.
• Play/Pause workflow instance: if the currently-executing activity’s status is Playing, the button is enabled and its tooltip reads Pause workflow instance. Invocation pauses the workflow instance.
If the currently-executing activity’s status is Paused, the button is enabled and its tooltip reads Play workflow instance. Invocation plays the workflow instance.
If the currently-executing activity’s status is not Playing or Paused, the button is disabled.
• Stop workflow instance: only available if the currently-executing activity’s status is Playing or Paused.
• Reactivate trigger: this button is only available when a workflow instance is Stopped in Production mode.
• Fire trigger: this option is available when the trigger is in a Waiting for Trigger state, and when its Use data from input workflow property is unchecked. It allows you to manually override the rules governing the point at which the trigger is scheduled to commence execution.
This means that, should something untoward occur within the trigger’s preceding workflow, you always have the option to commence execution at the activity state trigger. Key to availability of this option is the fact that the trigger does not source its input data from the preceding workflow – in such a case this option would not be viable, due to non-availability of input data at the point of the trigger’s being fired manually.
• View results: displays the Results Window, within which the current workflow’s results are displayed.
• Show configuration panel
An activity state trigger’s configuration panel contains General and Activities tabs.
The General tab displays a message:
You can select an Input Workflow using the dropdown, which lists all other workflows’ triggers within the interaction. Having selected an Input Workflow, you can clear it. Selection of an Input Workflow is mandatory for an activity state trigger.
Note that an activity state trigger does not support selection of a queue listener Input Workflow.
A checkbox (Use data from input workflow) is displayed at the bottom of the General tab. It is checked by default. If checked, the input data for the activity state trigger's workflow will be sourced from its input workflow – you must define within any activities downstream from the activity state trigger the fulfillment states that are to apply. For example…
…in this case, all records output by ‘Basic Email Offer’ (i.e. those in a ‘Targeted’ state) will serve as the input to ‘Basic Email Offer 2’.
If Use data from input workflow is unchecked, the trigger's workflow's data will be sourced independently from its input workflow. This means that the activity state workflow remains entirely independent from the input workflow (other than in activity within the latter initiating activity within the former). In this case it is mandatory for the activity state workflow to contain an audience.
Constraints and Input Workflow sections are displayed. They are covered separately in this documentation.
The Activities tab contains the following:
• Start when: defines the type of conditions within the input workflow that must be met before activity state execution can begin. The dropdown exposes the following values:
o Any one of the selected items starts playing
o Any one of the selected items completes
o All of the selected items complete (default)
• When no input workflow has been selected, a message is shown:
• When an input workflow has been selected, the panel below Start when… lists all of the input workflow’s activities following its trigger:
Each is accompanied by a checkbox. It is mandatory to select at least one checkbox. By selecting checkboxes, you define the activities within the input workflow to which the conditions defined by Start when will apply.
Note that a validation error is raised in the event of an activity state trigger's Input Workflow being configured with a recurring, multi-instance workflow.