Thanks for the reply.
The java code that I have supplied is in effect incorrect: the classes are not abstract.
My processes are a little more complex, so I had simplified before post in the forum to
avoid a lot of code. But the concept of the check executed in a specific range time in a
manual or in a automatic way is however my target.
I have followed your suggestion and from Jboss log I have seen that both timers are
created by CreateTimerAction. The problem is the signal in the AutomaticCheckAction: this
will fire an before-signal and a node-leave event on the task-node. The first is not
handled but the second, due to end-task="true" attribute, will cause an task-end
event, so the timer in the task will be removed.
So I have tried to change the process definition with end-task="false" (the
default) to preserve both timers when the execution follows KO transition. (As you can
guess, this transition goes into a node where I notify the KO status (with a log message
or a mail) and the returns into the task-node "check".)
Now I obtain the following exception:
| org.jbpm.graph.def.DelegationException:
org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:382)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at
org.jbpm.graph.def.ProcessDefinition_$$_javassist_184.raiseException(ProcessDefinition_$$_javassist_184.java)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:373)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:276)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
| at org.jbpm.graph.def.Node.leave(Node.java:381)
| at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at org.jbpm.graph.def.Node_$$_javassist_252.leave(Node_$$_javassist_252.java)
| at org.jbpm.graph.exe.Token.signal(Token.java:192)
| at org.jbpm.graph.exe.Token.signal(Token.java:155)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at org.jbpm.graph.exe.Token_$$_javassist_186.signal(Token_$$_javassist_186.java)
|
in the AutomaticCheckAction at line
| token.signal(isOK ? "OK" : "KO");
|
This exception is also present int JBPM_JOB.EXCEPTION_ column.
I have notice that whan the execution leaves the task-node a CancelTimerAction will be
invoked. This probably suggests that I never leave the node and the KO notification must
be done in the task (in the AutomaticCheckAction). But this solution is valid only for the
automatic check, not for the manual where I explicity click on a OK/KO form (and the
notification can be done only in another node).
Any suggestions or any another approach?
Regards.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270209#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...