[jboss-user] [jBPM] - Re: How to suspend and resume a process?

Esteban Aliverti do-not-reply at jboss.com
Fri Jan 13 03:57:34 EST 2012

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

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120113/d64ac8e8/attachment.html 

More information about the jboss-user mailing list