[jboss-user] [jBPM] New message: "Re: How to terminate a forked process"
Jas Lam
do-not-reply at jboss.com
Tue Jan 12 14:09:20 EST 2010
User development,
A new message was posted in the thread "How to terminate a forked process":
http://community.jboss.org/message/519664#519664
Author : Jas Lam
Profile : http://community.jboss.org/people/lamj1
Message:
--------------------------------------------------------------
So i modify the testForking method to attempt to terminate all child executions first as follow
public void testForking()
{
ProcessInstance processInstance = executionService.startProcessInstanceByKey("ForkProcess");
String pid = processInstance.getId();
Execution mainExe = executionService.findExecutionById(pid);
List<Execution> exeList = (List<Execution>) mainExe.getExecutions();
for(Execution exe : exeList)
{
System.out.println(exe.getId());
((ExecutionImpl) exe).end();
}
((ExecutionImpl)mainExe).end(); //exception here
}
Two child executions were found, but after one is ended, the for loop quits. The same exception occurs when mainExe is ended.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/519664#519664
More information about the jboss-user
mailing list