avatarGhailene ben Marzouk

Summary

The web content provides a detailed guide on implementing various subprocess types in Camunda, with a focus on Call Activity and Embedded Subprocess, including examples and deployment steps.

Abstract

The article discusses the use of subprocesses in Camunda BPMN workflows, highlighting the different types such as Embedded Subprocess, Event Subprocess, Call Activity, and Transaction Subprocess. It offers a step-by-step tutorial on creating a Call Activity subprocess named confirm_sql_request_sub_process, demonstrating how to create a new variable confirmRequest and use it in an exclusive gateway within the main process. The guide includes screenshots and explanations for deploying the process, mapping variables between the main and subprocess, and testing the workflow. Additionally, it provides an example of an Embedded Subprocess within a main process and explains the use of Event Subprocess with error handling. The article also links to other Camunda-related topics for further reading.

Opinions

  • The author emphasizes the importance of variable mapping in Call Activity to ensure that all relevant data is available in the subprocess.
  • The use of visual examples and deployment steps suggests that the author values practical, hands-on learning for understanding Camunda subprocesses.
  • The inclusion of multiple subprocess types indicates the author's recognition of the versatility and importance of subprocesses in complex workflow designs.
  • By providing additional resources on Camunda topics, the author seems to encourage continuous learning and exploration of Camunda's capabilities beyond subprocesses.

sub process in Camunda

There is too many types of subprocess in camunda :

Embedded subprocess,Event subprocess,Call Activity and Transaction subprocess

Call Activity example:

we gonna create a sub process named: confirm_sql_request_sub_process, in which we gonna create new variable named “confirmRequest” based on the data of variables coming from the main process named,

the boolean variable “confirmRequest” will be used in the exclusive gateway in the main process

lets deploy it :

-the main process named: “sql_request_subprocess_example”

it will call a subprocess with type CallActivity BPMN, in the Called Element field we should put the id of the subprocess,

then there is a mapping to do also in the callActivity level, so we could put source as all to map all the variable between the main and the subprocess:

That s it, let s deploy the process and test:

lets fill the first form of the first task :

now as we can see we in the level of the callActivity:

the Variable in the main process are visible in the subprocess because we putted the mapping as all:

Lets confirm the request in the subprocess:

as we can see, we can read now the variable confirmRequest in the main process (which is getted from the subprocess) and use it in the exlusive gateway.

Embedded Sub process:

In this example the subprocess is embedded to the main process

let s deploy and test:

as we can see after completed the first user task “Cook the pizza” we passed throught the sub process to add onion to the pizza.

Event Subprocess:

the event subprocess can be used when we throw an error or when we use a message event, then the catch event will be in a subprocess called event subproccess,

this is an example of bpmn file in which i throwed an error from the first process, then the catch is in the event subprocess

Other Camunda topics:

camunda task events notifier camunda genericuser task listener in camunda task marker multi-instance taskmarker loop in camunda feel language camunda how to work with dmn how to work with dmn how-to-use-embedded-task-form-in-camunda all-about-camunda-database error-handling-in-camunda sub-process-in-camunda gateways-in-camunda camunda-with-spring-boot-example task-in-camunda events-in-camunda

Recommended from ReadMedium