"[EMAIL PROTECTED]" wrote : if you want all concurrent paths to finish before 
the process is ended, use a join before the end state.

Thank you for your reply. All i want to do is end the process, and i tried to 
end it, and there are tokens (children of the fork) that are still active even 
after the process end. I can see the tasks on the tasklist of the user.

In order so kill thoses tasks, i had to do it manually:

 

  
  |       Collection listTasks = pi.getTaskMgmtInstance().getTaskInstances();
  |       if (listTasks.size()>0) {
  |         for (Iterator iter = listTasks.iterator(); iter.hasNext(); ) {
  |           
  |             TaskInstance ti = (TaskInstance) iter.next();
  |             if (!ti.hasEnded()) {
  |               ti.setSignalling(false);
  |               ti.cancel();
  |               ti.setEnd(new java.util.Date());
  |               log.debug("task instance " + ti.getName() + " has ended");
  |               Token tk = ti.getToken();
  |               tk.end();
  |               log.debug("token " + tk.getName() + " has ended");
  |             }
  |         }
  |       }

I don't know if there is another way, a simpler way, to do it.

I have a question though: are the children of the fork still active after the 
process end because i have more than one end state?

Thanks in advance,

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3931818


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to