-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
jBPM 3.1.0
-
None
-
None
-
Workaround Exists
-
I have a process definition which uses timer:
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jbpm.org:jpdl-3.1 http://jbpm.org/xsd/jpdl-3.1.xsd"
name="ramtest">
<start-state name="start">
<transition name="t1" to="state1"></transition>
</start-state>
<state name="state1">
<timer duedate="10 seconds" repeat="true" name="aaa">
<action class="be.certipost.jc.jbpm.actions.testAction"></action>
</timer>
<transition name="tonode1" to="node1"></transition>
<transition name="back" to="state1"></transition>
<!-- due to some reason cancel-timer doesn't work during node-leave and it is deleted in action -->
<event type="node-leave">
<cancel-timer name="aaa"/>
</event>
</state>
<node name="node1">
<script>
<expression>System.out.println("node node1")</expression>
</script>
<transition name="t3" to="end1"></transition>
</node>
<end-state name="end1">
</end-state>
</process-definition>
Action in timer is called. It checks some other table and calls token.signal("tonode1")
so process continues on node1 and so on.. But timer remains in table and it is called again. As you can see Idefined an event which should remove timer on node-leave event. But it doesn't.
Here is the exefute method of testAction:
public void execute(ExecutionContext ctx) throws Exception {
log.info("test Action called");
boolean flag=checkFlag(ctx);
if
{ ctx.getToken().signal("tonode1"); }}
- relates to
-
JBPM-627 Cancel timer problem
- Resolved