-
1. Re: jBPM 4.4 How do I force a process instance to end
kevinmoodley Jul 28, 2010 1:35 PM (in response to kevinmoodley)By the way I tried using
processEngine.getExecutionService().endProcessInstance(instanceId, ProcessInstance.STATE_ENDED);
but this threw a null-pointer exception:
DefaultCommandService - exception while executing command org.jbpm.pvm.internal.cmd.EndProcessInstance@6649
java.lang.NullPointerException
at org.jbpm.pvm.internal.util.ReflectUtil.installDeploymentClassLoader(ReflectUtil.java:385)
at org.jbpm.pvm.internal.util.ReflectUtil.instantiateUserCode(ReflectUtil.java:412)
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getObject(UserCodeReference.java:63)
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getObject(UserCodeReference.java:47)
at org.jbpm.pvm.internal.wire.usercode.UserCodeEventListener.notify(UserCodeEventListener.java:38)
at org.jbpm.pvm.internal.model.op.ExecuteEventListener.perform(ExecuteEventListener.java:81)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632)
at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:579)
at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:568)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:386)
at org.jbpm.pvm.internal.cmd.EndProcessInstance.execute(EndProcessInstance.java:48)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:40)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.endProcessInstance(ExecutionServiceImpl.java:117) -
2. Re: jBPM 4.4 How do I force a process instance to end
rebody Jul 28, 2010 8:53 PM (in response to kevinmoodley)Hi Kevin,
Please provide your jpdl.xml and testcase, it will help us to understand this problem easily, Thank you very much.
-
3. Re: jBPM 4.4 How do I force a process instance to end
yushanyuan Jul 29, 2010 5:29 AM (in response to kevinmoodley)try this:executionService.deleteProcessInstance(processInstanceId);
-
4. Re: jBPM 4.4 How do I force a process instance to end
kevinmoodley Jul 29, 2010 6:43 PM (in response to rebody)I am basically using a modified version of your concurrency example (attached) but I make one of the forks take an ERROR transition and then try to force the process instance to end via :
processEngine.getExecutionService().endProcessInstance(pid,ProcessInstance.STATE_ENDED);
This works fine unless I have an <on event="end"> on the jPDL. In this case an event is fired, after the process ends, to handle the on end event. But this results in a null pointer exception because there are no more activities or transitions at this point. UserCodeReference.getProcessDefinition returns null.
My basic problem is : How do I end a Process Instance if the join is not reached due to an error transition from one of the nodes feeding the join.
-
process.jpdl.xml 1.3 KB
-
-
5. Re: jBPM 4.4 How do I force a process instance to end
mrbrush Sep 3, 2010 2:57 PM (in response to kevinmoodley)Hi Kevin,
I think this is a bug. I've modified the source of the ReflectUtil class to handle the null case and it works. I've filed an issue in the jBoss JIRA: http://jira.jboss.org/browse/JBPM-2932