Add Exclusive gateways to a workflow to create branches that run exclusively of each other. When you run a workflow that contains Exclusive gateways, the Data Integration Service runs the tasks on a single branch between the gateways. Configure conditions on the outgoing sequence flows to determine the branch that the workflow follows at run time.
You can use Exclusive gateways when the path that the workflow must follow depends on the result from an upstream workflow object. For example, you might configure a workflow with a Mapping task that identifies exception records and a Human task that distributes the exception records to data stewards. If the mapping in the Mapping task does not identify exceptions, the Human task cannot distribute records. You use an exclusive gateway to create two branches for the workflow. One branch contains the Human task that can distribute the exception records. Another branch contains a Notification task that sends an email to the data stewards if the mapping source data contains no exception records.
The following image shows a workflow that contains the branches between the Exclusive gateways:
The workflow contains the following objects:
Start event. The Start event starts the workflow.
Mapping task. The Mapping task identifies a mapping that finds the exception records in a data set. The Mapping task output includes the
exceptionLoadCount
variable value. The Human task uses the
exceptionLoadCount
value to determine the number of exception records to distribute to the data stewards.
Exclusive gateways. The first gateway splits the sequence flow into two branches. One branch includes a Human task. The other branch includes a Notification task. The second gateway merges the branches into a single sequence flow.
Define a condition on the sequence flow that connects to the Human task. Configure the condition to evaluate to true if the
exceptionLoadCount
variable value that the Mapping task generates is greater than zero.
Human task. The Human task reads the exception records that the earlier mapping identified and distributes the records to data stewards for analysis.
Notification task. The Notification task sends an email to the data stewards to indicate that the Human task did not run.
The sequence flow that connects to the Notification task is the default sequence flow. The Data Integration Service runs the Notification task if the condition on the Human task sequence flow evaluates to false.