Pre-requisites:
Required role privilege 'Manage Workflow Rules' on the project where a workflow trigger needs to be created.
The steps to create a workflow trigger event on a form are as mentioned below:
You have the option to configure a workflow trigger for forms right after publishing a workflow from the workflow designer. In such a case, you will get a prompt message stating 'Do you want to configure a Trigger now?'. Here, click the 'Yes' option and follow the steps below - from step number 3 onwards.
1. Navigate to the 'Workflows' tab and select the project.
2. Click the 'Create Trigger' button to start creating a trigger event.
Alternately, right-click the project name and select the 'Create Trigger' option.
3. Enter the required details for all the mandatory fields in the 'Configure Trigger' screen:
3.1. Name - Name of the trigger.
3.2. Priority - At any given point in time, only one running workflow is allowed. Below are the key factors to be considered while setting the priority of a workflow:
A new workflow can get kicked off only when the earlier workflow is completed.
To decide which trigger gets precedence when there are multiple triggers with matching conditions, you can use the priority field. The triggers with higher priority will be kicked off first, and then the triggers with lesser priorities will be kicked off one by one.
All the triggers will execute which are configured with the system tasks event, while only one trigger will execute which is configured with the workflow definition event.
If there is more than one trigger with matching conditions and priority, then any one of them will get kicked off. In case this particular trigger fails, the next trigger with a matching condition would be initiated right away.
3.3. Description - A brief description of the trigger to be created.
3.4. Context - Select the trigger context as 'App'.
3.5. App Type - If the selected task context is 'App', you will be required to choose a form type from a list of active form types.
Controller-based form types are not supported in workflow. For any non-controller-based form type that was converted to controller-based after the workflow was configured, the workflow won't execute for that particular form type.
3.6. Trigger Conditions - You can create various trigger conditions using 'AND' / 'OR' (Logical Operators).
Workflow triggers for forms can currently be created only based on 'App Status' that are enabled in relevant form settings.
A rule is a single logical statement created based on one or more conditions defined by the user.
The trigger is executed based on this statement under different matching conditions. You can see the actual rule (statement) that will get applied based on the conditions defined for workflow trigger just like below:
Different brackets and text colours used to present the applied rule can make it easy for you to understand how the workflow trigger would get applied based on the conditions entered, irrespective of the complexity of the rule.
Working of logical operators:-
------------------------------------------------------------------------------------------------------------------
<Condition 1> <logical operator (AND)> <Condition 2>
Description:- For 'AND' logical operator, both conditions must be satisfied (true).
<Condition 1> <logical operator (OR)> <Condition 2>
Description:-
For 'OR' logical operator, any condition should be satisfied (true).
------------------------------------------------------------------------------------------------------------------
If I want the workflow to trigger when a new form is created having 'Open' status. I need to select:
Condition One: Form type is equal to 'Request For Information' AND
Condition Two: When the form status is 'Open'
You can use such combinations of logical operators to cover a business process.
Click here for detailed help on how to use independent system tasks.
3.7. Trigger Event - Select the appropriate event which should trigger the workflow (as configured by the user). Trigger events for forms can be:
3.8. Task Mode - Select the task mode for which this trigger will be used.
Post - An event which is executed after completion of the desired event i.e. creation of an app. 'Post' task mode is currently available for all form events.
Post (Sync) - An event which is executed in sync after completion of the desired event i.e. creation of an app. 'Post' task mode is currently available for the following form events:
'Create App', 'Create Response'
3.9. Task Type - Select the type of task to be performed based on the selected trigger event and task mode.
3.10 Task - Select the relevant system task if this trigger is for an independent system task or select the relevant workflow definition if this trigger is for a workflow.
4. Click on 'Create' to complete creating a trigger event for the workflow on the selected form.
Check: FAQs