cancel
Showing results for 
Search instead for 
Did you mean: 

Access external Activit workflows

drams
Champ in-the-making
Champ in-the-making
There is some documentation about accessing sub workflows (subprocesses) but nothing about how you are able to call another Activti workflow (different BPMN file) in the same environment. Is this possible?

We have two different workflows, which can exist standalone, but the first workflow should be able to call the second workflow in certain conditions.

Information on the call activit:
"A call activity is a regular activity, that requires a calledElement that references a process definition by its key. In practice, this means that the id of the process is used in the calledElement.

<callActivity id="callCheckCreditProcess" name="Check credit" calledElement="checkCreditProcess" />
Note that the process definition of the subprocess is resolved at runtime. This means that the subprocess can be deployed independently from the calling process, if needed." This means it can only be the subprocess key and not an external process key right?

Thanks.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
A call-activity allows you to set a key of a process-definition which you want to see started. If the parent-process reaches the call-activity, it will fetch the LATEST process-definition with that key and start a new process-instance of that definition. When that child process is completed, the outgoing sequence flow from the call-activity is taken.

This is a good way to start the second process from within the first process. Offcourse, if you need actual "communication" between the parent and child, consider using message-events or using the API from inside the processes, using service-task, tasklisteners, execution-listeners. You can get hold of the EngineServices based on the DelegateTask/DelegateExecution you get passed on in those classes, allwoing you to do stuff like "engineServices.getRuntimeService().signal(childProcessInstanceId)".

bbwilliams88
Champ in-the-making
Champ in-the-making
Hi,

   We have two Tomcat servers running their own Activiti engine\workflows and they share the same database. Tomcat A needs to start a process in Tomcat B, what is the best way to implement this? BTW - The client will not allow rest.
Thanks!

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,
One possibility ( I do not say the best - it depends on your requirements + ….):
- run JobExecutor only on one tomcat (e.g tomcat B). Make call activity asynchronous.

Regards
Martin