Skip to main content

Choose a review path

A document can take either a summary review or a full review. Continue from your linear model or open the linear model as a starting point, or open the completed choice model before running the examples below.

  1. Put an Exclusive Gateway between the start and the reviews. Add a User Task called Review full document and keep Review summary on the other path. Set the full review’s General → ID to reviewFull and keep reviewSummary on the summary review. Assign both to the reviewer role.
  2. Add a Boolean process field detailed under Process fields. Select the outgoing flow to the full review. In the Getriebe properties, set its Condition expression to detailed. Select the flow to the summary review and set Default path.
  3. Before the end event, add another Exclusive Gateway with one incoming flow from each review and one outgoing flow. That merge forwards a token as soon as it arrives. It does not wait for the unused review.

Use Validate and deploy on your choice model or on the completed file. Since its BPMN namespace and process ID match the first part, the server records it as a new version of the same model.

Terminal window
node run-workflow.ts tutorial choice summary
node run-workflow.ts tutorial choice detailed

The first run sends detailed: false and the reviewer sees reviewSummary. The second sends detailed: true and the reviewer sees reviewFull. Both instances complete after their one review. Compare the rules in exclusive routing.

Try both choices in the interactive routing diagram.

Continue to run two checks in parallel.