I am trying to bring my knowledge about the way camunda handles tasks within BPMNs. Assuming, I do have 2 processes, where each has a serviceTask with custom java-delegate and run them in parallel:
Service Task and Job executor are two different things
Service Task are used when you want to perform automated actions and there are different flavors of service task like invoking a delegate deployed in process engine(Synchronous), HTTP API call(Synchronous), External task(Asynchronous)
@vicmosin Correct. If any activity is marked for asynchronous execution, then job executor executes those activities. If the activity execution is synchronous, the execution will be continued on the application server’s http-thread-pool (We call this “borrowing the client thread”)
Many thanks @aravindhrs , this was very helpful. But one question I do still have in mind - if service-task borrow the thread from main process, is there any limitation of amount of service-tasks which can be executed in parallel? Can it be configured via camunda engine properties or mostly done at JVM level?
@vicmosin If service tasks are executed synchronously, it uses thread from underlying application/web server thread pools. If the server is not able to handle the load, then scaling comes to the rescue. You can execute tasks in parallely in camunda.