2
votes

I know in BPMN there is just a "start event" for each pool. In my case I have a pool that can begin when a message is caught or because the actor decide to do it by his own decision.

How can I model that? I'm not sure I can use an event-based exclusive XOR.

Maybe a complex gateway?

2

2 Answers

1
votes

As stated in many best practice how-tos, it is NOT RECOMMENDED to use multiple start events in a pool. BPMN specification 1.2 contains this note too:

9.3.2.
...
It is RECOMMENDED that
this feature be used sparingly and that 
the modeler be aware that other readers of the Diagram may have difficulty
understanding the intent of the Diagram.
...

On the other side, the common rule for the case with omitted start event is

If the Start Event is not used, then all Flow Objects that do not have an incoming Sequence Flow SHALL be instantiated when the Process is instantiated.

I assume this will be fair enough for the case of manual process start too. Even if the process has only message start event it will be correctly started because Message Start Event is a fair flow object with no incoming sequence flow and thus it complies to the above rule.

However, if you want to be 100% sure the process will go the way you want then the Event Based Exclusive Gateway (which is available since version 1.1) is your choice. Placing it before multiple different start events will make the process choose either of them for start.

enter image description here

Further explanation can be found in this blog.

0
votes

Unlimited process instances

If you don't mind that during execution of your process the pool could be used multiple times (e. g. once started by a message and 3 times by an actor) then you can simply use multiple start events (BPMN 1.2 PDF Spec 9.3.2 page 37 allows this): enter image description here

Single instance

If you can only allow a single run of the pool, you might have to instantiate it manually at the start of your execution and then decide whether to use it and when. Here is an example of how this can be done: enter image description here

The Event-Based Gateway (Spec 9.5.2.4) will "decide" what to do with your pool:

  • If Actor decides to start or a message comes from the main pool, some actions will take place;
  • If the process is "sure" that additional pool will not be required, a signal is cast to terminate its instance.