RuntimeService.startProcessInstanceById() blocks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2012 09:24 PM
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
All I want is to start the process and get the process Id.
How should I do that?
Thanks!
-Max
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2012 03:49 AM
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.
