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 custom object are as mentioned below:
You can configure a workflow trigger for custom objects 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.
Alternatively, right-click on 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 'Custom Object'.
3.5. Custom Object Template - Select the 'ISS Issue' option and continue.
3.6. Trigger Conditions - You can create various trigger conditions using 'AND' / 'OR' (Logical Operators).
Workflow triggers for custom objects can currently be created only based on 'CustomObject Status'.
The 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 issue is created having 'Open' status. I need to select:
Condition One: CustomObject Status is equal to 'Open'
You can use further combinations of logical operators to cover a business process.
3.7. Trigger Event - Select an appropriate event which should trigger the workflow (as configured by the user). The trigger event can be:
Event Name | Description | Supported Task Mode | Support for Groovy Script |
Create Custom Object | When a new custom object is created | Post | Yes |
Update Custom Object | When an existing custom object is updated | Post | Yes |
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 a custom object. 'Post' task mode is currently available for all custom object events.
3.9. 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 custom object.
Next Article: Navigate to Workflow Instances