Bpmn - How to simulate an optional task

enter image description here

After completing task 1, we need to create an optional task based on a condition. The process termination is independent of this optional task completion.

What is the correct way to design this model?

+3


source to share


3 answers


the desired behavior can be modeled as follows:

BPMN diagram



After Task1 finishes starting Task2, if the optional condition is true, the optional Task is also started. The instance ends when Task2 completes. If the additional task is still active, it will be completed.

+2


source


Modeling an optional task in BPMN

You must use a conditional marker for the extra flow. The exclusive gateway in your diagram will always execute the required task 2, the optional task will always be ignored even if the condition for its execution is true.



The parallel gateway cannot be used because it will wait for the additional task to complete for a successful merge.

+3


source


Using non-interrupting events (messages / signals / escalation) will help your scenario.

Alternatively, using an event sub-process in this process.

Let me know if you understand how to use it. Otherwise I will give you an example

UPDATE

Note: 1. I only use bpmn.io to draw an example instead of Camunda. However, this is basic BPMN and my guess is that Camunda should have this type of model. I am only familiar with JBPM.

EXPLANATION: Basically, you really don't need to use the post event. It could be a signal / escalation depending on what scenarios you have. In theory, a message event is used if there is an incoming message to create other actions, and this event is the most common among others. However, you should consider whether this event is interrupting or not. In your case, it does not interrupt, so I am posting no interrupt message.

The interrupt event will interrupt task 1 as soon as the event is fired, and not interrupt will only add an additional task / event without interrupting task 1.

enter image description here

Hope this example helps.

0


source







All Articles