Hello!!

I defined a timer on a state with repeat="true" and duration="1 minutes"...

My goal is to check each minutes if the state is over..

Inside the timer I've put a 

node.leave(..) which seems to signal the token because i can see the task 
instance that have defined after the state node...

But the timer is still running each minutes!!!!

Because I've putted a node.leave(..) inside my process go on node by node each 
minutes...

Is this behavior normal???

How can I do to cancel this timer??(I've tryed a lot of solutions without 
success!)


Here is the jpdl section:

state name="initial"
        timer name="initialTimer" duedate="1 minutes" repeat="true"
                        action class="com.sdmda.adt.ActionHandler"/
        /timer

        transition name="" to="traiterFinAccident"/
/state

And the ActionHandler:

public class ActionHandler implements org.jbpm.graph.def.ActionHandler {

        public void execute(ExecutionContext arg0) throws Exception {

                Integer count = (Integer) arg0.getVariable("count");

                String message = (String) arg0.getVariable("message");

                if (null == count)
                        count = 0;

                System.out.println("count= " + count);
                System.out.println("message= " + message);

                if (count == 2) {

                        System.out.println("signaling");

                        
                        Node state = arg0.getNode();

                        
                        state.leave(arg0);


                } else
                        arg0.setVariable("count", ++count);
                
        
                System.out
                
.println("-------------------------------------------------------------");

                
        }

}


THANKS!!!!!!!!!!!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993686#3993686

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993686
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to