[JBoss jBPM] - cancel process instance including subprocesses
by Thomas.Kriechbaum
Hello,
what's the recommended way to cancel a process instance and it's subprocesses as well (jbpm-jpdl 3.2.2).
Within a remote interface I'm invoking the org.jbpm.command.CancelProcessInstanceCommand having cancelSubProcesses set to true.
First of all, there seams to be a bug in the method cancelSubProcesses, because the HQL-Query "GraphSession.findSubProcessInstances" requires the parameter "processInstance" and not "instanceId". I will report this issue.
The main problem is, that when canceling a sub process the super process gets a signal and continues as defined by the process definition. In my particular case, new task instances are created that are not canceled as expected.
Here is the source code from ProcessInstance.end
| /**
| *ends (=cancels) this process instance and all the tokens in it.
| **/
| public void end() {
| ...
| // check if this process was started as a subprocess of a super process
| if (superProcessToken!=null) {
| addCascadeProcessInstance(superProcessToken.getProcessInstance());
|
|
| ExecutionContext superExecutionContext = new ExecutionContext(superProcessToken);
| superExecutionContext.setSubProcessInstance(this);
| superProcessToken.signal(superExecutionContext);
| }
| ...
| }
| }
|
|
The posting http://www.jboss.com/index.html?module=bb&op=viewtopic&t=72442 almost deals with the same question, but no replies have been sent at the moment.
Thanks,
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175777#4175777
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175777
17 years, 6 months
[JBoss jBPM] - Re: Consuming webservice in jBPM JPDL (Eclipse)
by chrlyck
Hi again
Thanks for the reply.
I have been looking into this thoroughly. I have tried two things, my original setup where i deploy the WS jars using JPDL, then not deploying them. Then the same two options with the custom-made jar in the classpath. Here are my results:
Webservice NOT deployed from JDPL deployed - without JAR
exception
|
| javax.servlet.ServletException: Servlet execution threw an exception
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
| root cause
|
| java.lang.NoClassDefFoundError: org/me/calculator/CalculatorWSService
| java.lang.Class.getDeclaredConstructors0(Native Method)
| java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
| java.lang.Class.getConstructor0(Class.java:2671)
Webservice deployed from JDPL - without JAR
Error: Cannot load service endpoint interface: com.sample.action.CalculatorWS
Webservice NOT deployed from JDPL - with JAR
exception
|
| javax.servlet.ServletException: Servlet execution threw an exception
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
| root cause
|
| java.lang.NoClassDefFoundError: javax/xml/ws/Service
| java.lang.ClassLoader.defineClass1(Native Method)
| java.lang.ClassLoader.defineClass(ClassLoader.java:620
Webservice deployed from JDPL - with JAR
exception
|
| javax.servlet.ServletException: Servlet execution threw an exception
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
| root cause
|
| java.lang.NoClassDefFoundError: javax/xml/ws/Service
| java.lang.ClassLoader.defineClass1(Native Method)
| java.lang.ClassLoader.defineClass(ClassLoader.java:620
So it seems like thats not the solution...
Any other ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175602#4175602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175602
17 years, 6 months