Use sub process multiple times in same workflow

If same sub process is being used at different stages of workflow , how to keep this sub process as one entity and connect it whenever required
Because now if sub process is being used in multiple places then expand it and create listeners to all task inside it, which is duplicated or make use of call activity?? Is this correct understanding?
Is there any way to achieve it without using call activity and not duplicating the listeners (i.e., reuse same sub process)

1 Like

Call Activity is without a doubt the best approach.

Another approach might be to use a non-interrupting event sub process and trigger it… maybe with an escalation event when required:


Thank you
Also can call activity have multiple end events? if so how to map these end events to different sequence flows?

I’m not sure exactly what you’re asking.
A call activity calls a another process and then returns back to the parent once that process is finished and continues the flow. What kind of mapping do you need?

I mean can call activity have two end events?? like for example: meal ordered and meal cancelled
and after this when execution flow returns to parent process, can process decide to take different sequence flow based on end events occurred in call activity

Sure, no reason not to… A Call Activity can of course return variables that would determines how the flow proceeds. Either with a gateway or a conditional sequence flow.

1 Like

Thank you :slight_smile:

Hi Niall,

How many conditional sequence flow can originate from decision gateway or tasks? Can it be more than two? any recommendation/suggestion


As many as you need.

1 Like

Hi Niall,

Using /task REST API , current task in a process can be known using process instance id ,
but if there is call activity involved in between
I have tried to get current task using call activity’s process id, it works
but is it possible to know current task which inside call activity using parent process id??
because current task for call activity is also current task for parent process as well right?

In short , is it possible to know current task irrespective of whether its inside sub process, call activity or transaction?


Use a business key - if you give a process a business key when you start it you can choose to propagate that key to all Call Activities.

Then you can query for tasks based on the business key.

1 Like

Hi Niall,

I’m trying to follow the escalation approach you mentioned above.

Every time, I use the same escalation in my workflow, can I pass a same variable with different value to my non interrupted Escalation start event?

In modeller, how would I do that?