Hi,
I want to know how processes and threads are used in Camunda. I have the following questions:
As I have found out, each process instance runs in a different thread, but not necessarily a different process, of the Camunda engine (and not the OS processes and thread). Am I right? If not, can you explain this?
As I know, internal service tasks and execution listeners run synchronously to the process instance. So, they run in the same process and thread as their process instance. Am I right?
Could anyone also mention some useful references, links or documents in this regard?
I also saw the following statement in this link:
" The process engine is a piece of passive Java code which works in the Thread of the client. For instance, if you have a web application allowing users to start a new process instance and a user clicks on the corresponding button, some thread from the application server’s http-thread-pool will invoke the API method runtimeService.startProcessInstanceByKey(...) , thus entering the process engine and starting a new process instance. We call this “borrowing the client thread”."
So, it’s not the Camunda engine which manages the usage of threads. Even if we start a process by Camunda Cockpit right? I thought that the he engine manages the execution of process instances within its own processes and threads (its own thread pool). Does each process instance use one process and thread
Regarding synchronous execution of execution listeners and internal service tasks, I know that they can become asynchronous by “Asynchronous continuation”, but my question is that whether they run synchronously without using “Asynchronous continuation”, and run in the same thread and process as the process instance?
I do really appreciate if someone could explain a bit more in this regard.