While creating a workflow process of an organization, you need to take into account that workflow or activities are not necessarily sequential. At some step, decisions taken would direct the workflow and hence the workflow becomes linear. To create such workflows, you need to add gateways of different types.
As mentioned, our sequence of activities is not a linear structure. The activity Notify Customer has not yet been defined as a successor activity of any other activity. The organization wants to differentiate between two paths in the process definition:
Which path the process goes depends on the state of the support case. If the activity Analyze To Solve set this variable to "C" which stands for the CLOSED state, the first option is realized. If the same variable has been set to "R", standing for REJECTED, the activity Notify Customer follows. This means that processing of the support case needs to be split into two branches at activity Analyze To Solve. Our process diagram should reflect this.
To add a Join gateway, perform the following steps:
Figure: Enter Data - Click Gateway Icon
Figure: Join Gateway
Figure: Gateway Properties
Figure: Join Gateway - Click Sequence Flow Icon
Figure: Join Gateway - Analyze to Solve
In case the Analyze to Solve activity decision states that you need to Notify Customer if the Product State is Rejected. If the Product State is Closed then the flow should go to Deliver Patch activity. To handle this flow, you need to add one more split gateway from Analyze to Solve activity.
To add split gateway, perform the following steps:
Figure: Analyze to Solve - Click Sequence Flow Icon
Figure: Gateway
Figure: Gateway Properties
Figure: Split Gateway - Sequence
Figure: Connect Split Gateway with Notify Customer
Figure: Split Gateway - Sequence
Figure: Connect Split Gateway with Deliver Patch
We need to add conditions based on the Product State. Perform the following steps:
Figure: Sequence Flow and Conditional Sequence Flow Properties
Figure: Conditional Sequence Flow - Condition Expression
Figure: Conditional Sequence Flow - Condition Expression
If both the conditions added at split gateway are evaluated as false then the repeat loop needs to be added for the Analyze to Solve activity. This will cause the transition to only evaluate to true. To do that, you need to add transition from the Split gateway to the Join gateway as Default. Perform the following steps:
Figure: Conditional Sequence Flow - Condition Expression
Figure: Select Default Flow
Figure: Default Flow - Slash through
The process flow diagram would look like as shown in the following screenshot: