Bpmn - How to simulate an optional task
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.
source to share
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.
Hope this example helps.
source to share