cancel
Showing results for 
Search instead for 
Did you mean: 

RuntimeService.startProcessInstanceById() blocks

m2spring
Champ in-the-making
Champ in-the-making
I just realized that calling RuntimeService.startProcessInstanceById() blocks for the entire time the process is active.
All I want is to start the process and get the process Id.
How should I do that?
Thanks!
-Max
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Set the attribute "activiti:async=true" on the first activity in the process. This way, you'll get the id instantly and the rest of the process is executed in an async thread. If an error occurs while executing the process, there will be an error-message and stack trace in the ACT_RU_JOB table for the started process-instance.