[JBoss jBPM] - Re: Need help to fix timer issue
by Arunkumar DSRC
For example plz conside the following:
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="process6">
|
| <start-state name="start-state1">
| <transition to="tsmactoncr"></transition>
| </start-state>
|
| <state name="tsmactoncr" async="true">
| <timer name="timer" duedate="7 seconds" transition="to escalated">
| <action class="yourpackage.Action1"></action>
| </timer>
| <transition to="normailflow" name="to normal flow"></transition>
| <transition to="escalationflow" name="to escalated"></transition>
| </state>
|
| <state name="normailflow">
| <event type="node-enter">
| <script>
| System.out.println("Node-enter: normailflow");
| </script>
| </event>
| <transition to="end-state1"></transition>
| </state>
|
| <task-node name="escalationflow">
| <task name="mail to customer" notify="true">
| <assignment class="yourcompany.MailAssignmentHandler"></assignment>
| </task>
| <transition to="end-state1" name="to-end1"></transition>
| </task-node>
|
| <end-state name="end-state1"></end-state>
|
| </process-definition>
|
In above code I am trying to send a mail using task-node when the timer expires and it is escalation flow. when I try to have a AssignmentHandler it gives the Following Exception
org.jbpm.graph.def.DelegationException
at 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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.ProcessDefinition$$EnhancerByCGLIB$$b2e1ca8f.raiseException()
at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:373)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:276)
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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.node.State$$EnhancerByCGLIB$$993b01f9.executeAction()
at org.jbpm.job.Timer.execute(Timer.java:56)
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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.job.Job$$EnhancerByCGLIB$$e4a64402.execute()
at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:173)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
Caused by: java.lang.NullPointerException
at org.jbpm.graph.def.Action.execute(Action.java:122)
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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$cc035953.execute()
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
... 15 more
Any clue.
Thanks in advance
-Arunkumar
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218706#4218706
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4218706
17 years, 1 month
[JBoss jBPM] - Re: Need help to fix timer issue
by Toriton
hello , i'm working on timers too, and the timer defined in the post before work fine for me.
I have a little problem after the timer execute the transition.
Imagine something as stateA have the timer, after 5 sec the timer go for transition to stateB ,do something , and then have to turn back in stateA restarting the timer itself.
I'm getting this exception when i try to do signal directly from the ActionHandler in stateB.
| org.jbpm.JbpmException: this token is locked by token[5740]
|
5740 is the ID of the state where the timer started, the stateA in the example described before.
Why i'm blocked from stateA? the process is not gone on in stateB with the timer?.
The transition used by the timer don't influence the process workflow?
Thanks in advance for any clarification.
T.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218699#4218699
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4218699
17 years, 1 month
[JBoss jBPM] - Re: Need help to fix timer issue
by Arunkumar DSRC
When I tried to have a actionHandler inside the timer It throws the following exception:
org.jbpm.graph.def.DelegationException
at 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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.ProcessDefinition$$EnhancerByCGLIB$$b2e1ca8f.raiseException()
at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:373)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:276)
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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.node.State$$EnhancerByCGLIB$$993b01f9.executeAction()
at org.jbpm.job.Timer.execute(Timer.java:56)
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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.job.Job$$EnhancerByCGLIB$$e4a64402.execute()
at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:173)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
Caused by: java.lang.NullPointerException
at org.jbpm.graph.def.Action.execute(Action.java:122)
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:585)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$cc035953.execute()
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:259)
... 15 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218695#4218695
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4218695
17 years, 1 month
[JBoss jBPM] - Re: Need help to fix timer issue
by gchanteb
And it works with action handler:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="process6">
|
| <start-state name="start-state1">
| <transition to="tsmactoncr"></transition>
| </start-state>
|
| <state name="tsmactoncr" async="true">
| <timer name="timer" duedate="7 seconds" transition="to escalated">
| <action class="yourpackage.Action1"></action>
| </timer>
| <transition to="normailflow" name="to normal flow"></transition>
| <transition to="escalationflow" name="to escalated"></transition>
| </state>
|
| <state name="normailflow">
| <event type="node-enter">
| <script>
| System.out.println("Node-enter: normailflow");
| </script>
| </event>
| <transition to="end-state1"></transition>
| </state>
|
| <state name="escalationflow">
| <event type="node-enter">
| <script>
| System.out.println("Node-enter: escalationflow");
| </script>
| </event>
| <transition to="end-state1"></transition>
| </state>
|
| <end-state name="end-state1"></end-state>
|
| </process-definition>
package yourpackage;
|
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.exe.ExecutionContext;
|
| public class Action1 implements ActionHandler
| {
| private static final long serialVersionUID = 532619789299259672L;
|
| @Override
| public void execute(ExecutionContext executionContext) throws Exception
| {
| for(int cpt=0;cpt<1000;cpt++)
| {
| System.out.println("Action 1: "+cpt);
| }
| }
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218685#4218685
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4218685
17 years, 1 month