Esteban Aliverti [
https://community.jboss.org/people/eaa] created the discussion
"Re: How to suspend and resume a process?"
To view the discussion, visit:
https://community.jboss.org/message/646632#646632
--------------------------------------------------------------
In jBPM5 you can't manually suspend a process. Processes are automatically suspended
when, during its execution, they reach a wait-state (nothing else to execcute). This could
be the case of async Tasks, Events, Rule Execution, etc. Resuming the process execution
depends on what is the process waiting for:
* ksession.signalEvent() -> if the process is suspended in a event
* ksession.getWorkItemManager().completeWorkItem() -> if the process is suspended in an
async Task
* using Human Task Client API -> if the process is suspended in a Human Task
* ksession.fireAllRules() -> if the process is suspended in a Rule Task node.
Regarding your last question, why do you need startProcess() to return immediately? If
what you need is the id of the process, then you can separate startProcess() in:
1. ksession.createProcessInstance() -> creates an instance and persists it in the db
2. ksession.startProcessInstance() -> actually starts the execution of the process
instance.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/646632#646632]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]