Question

Having the following process

enter image description here

and a message boundary event which has cancelActivity set to false so that after Should cancel the Sub Process could continue where it was before the event was received - in case that No was selected.

How could I simulate as if cancelActivity was set to true in case that the user selects Yes (i.e. cancel/stop Sub Process when the No end is reached)?

Please ask if I wasn't clear about this.

Was it helpful?

Solution

With the boundary event attached to the sub process, there is no way of going to another task after should cancel. You can neither use link events (not allowed from parent to sub process), nor a simple sequence flow (not allowed between two processes).

So I guess you need attach the message event to each relevant task within the sub process or you need to use two separate boundary events (one interrupting and one non-interrupting).

OTHER TIPS

Further the answer above. The process flow really doesnt properly capture your requirement. You should have the email event running in parallel to your sub process. On receipt of the email, flow directly into the should cancel human/user task. If yes, send a signal event (signals are easier to implement than messages) that is captured by a signal boundary event receiver on the sub process and simply flow to the end (i.e. terminate).

If no, you simply exit (you may need to start another email receiver - depends on your requirements).

This way, the sub process boundary event is not triggered until after you have made your decision to terminate or not.

Hope this helps.

maybe you need the bpmn definition below

should task

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top