How can I connect an embedded or reusable sub process back to a human activity that threw its originating message/signal event

19 views Asked by At

I'm trying to model a BPMN process in RHPAM Business Central where the first activity is a Human Task to create a master (security).

As part of this task, the user will select values from two other masters, viz. the Group and TypeCode, for associating the new Security.

As they won't exist the first time, this will necessitate branching-off from the security master creation flow, into the respective Group and TypeCode master creation flows. And then returning to the security master creation flow.

At first I thought of modeling this using a message event. However that would yield a clumsy solution - as it'd involve a decision gateway (does the Group Master Exist? No? throw message event), and explicitly passing input parameters (facts) for that decision. Also there's no KIE API to throw a message, like there is for a signal.

So I tried with signalling as below: Signal catching Events on the boundary of a sub-process

Bsnss Cntrl didn't seem to let me attach a intermediate signal on a Task, so I created a sub-process with attached intermediate signals for triggering the flows of creating the two associated masters. And linked the events directly to Reusable processes.

My first challenge was wrapping my head around how to resume the primary task (create security), after the branches (create group / type code) were run to completion. There Francisco Javier Sarti's answer made things wonderfully clear, by phrasing both the question and the answer.

want your main process to wait for a signal, then invoke a subprocess and then resume the main flow when the subprocess is done?. add an arrow from the subprocess to the end node and remove the arrow from the waiting node to the end.

Previously I had been trying to connect the sub-process back to the activity that threw the message event, which was not possible.

That was my original problem. Now the next issue was a model validation error : Reusable Subprocess with no Assignments Data Input/Data Output: Create Security Group

0

There are 0 answers