-
1. Re: is the Join-node mandatory???
koen.aers Mar 17, 2006 5:33 AM (in response to rafaelle)You are right! ;-)
Regards,
Koen -
2. Re: is the Join-node mandatory???
patrickdalla Mar 17, 2006 8:04 AM (in response to rafaelle)OK,
I had the same problem.
I want two flows of wark that works in parallel. But the first that ends, ends the process.
Is it possible? -
3. Re: is the Join-node mandatory???
mennen Mar 22, 2006 2:55 AM (in response to rafaelle)"patrickdalla" wrote:
OK,
I had the same problem.
I want two flows of wark that works in parallel. But the first that ends, ends the process.
Is it possible?
same question -
4. Re: is the Join-node mandatory???
tom.baeyens Mar 22, 2006 4:23 AM (in response to rafaelle)a token that arrives in an end state causes the process to be ended.
that is the definition of the end state.
if you want all concurrent paths to finish before the process is ended, use a join before the end state. -
5. Re: is the Join-node mandatory???
mennen Mar 22, 2006 5:52 AM (in response to rafaelle)"tom.baeyens@jboss.com" 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, -
6. Re: is the Join-node mandatory???
mennen Mar 23, 2006 9:17 AM (in response to rafaelle)Does anyone know a better solution to end the tasks (children of the fork) after the process had ended , other than the following method?
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"); } } }
Thanks! -
7. Re: is the Join-node mandatory???
mennen Mar 23, 2006 12:17 PM (in response to rafaelle)Is it a bug that once you get to an end state (the process is supposedly finished) that there are still active children of the fork??
-
8. Re: is the Join-node mandatory???
kukeltje Mar 23, 2006 1:20 PM (in response to rafaelle)See the Jira for bugs, and if you do, you'd find http://jira.jboss.com/jira/browse/JBPM-392
Ronald -
9. Re: is the Join-node mandatory???
rafaelle Mar 24, 2006 4:28 AM (in response to rafaelle)"tom.baeyens@jboss.com" wrote:
a token that arrives in an end state causes the process to be ended.
that is the definition of the end state.
if you want all concurrent paths to finish before the process is ended, use a join before the end state.
Then ... if a token arrives to an end-state, the process instances is saved as "ended" in the database, breaking concurrents path of execution?? Or it will wait until other tokens reach a wait-state (as a task ...) ??
I think this is not a good behaviour to end all the process instance. It should end that execution path only, shouldn't it? -
10. Re: is the Join-node mandatory???
tom.baeyens Mar 24, 2006 8:22 AM (in response to rafaelle)it could be an option in a end-state to specify that only the token that arrives in the end state should be finished.
but i don't see why a join in front of the end state is insufficient for you. -
11. Re: is the Join-node mandatory???
osama.abdelkarim Mar 29, 2006 4:05 PM (in response to rafaelle)I have an extended question related to this topic?
Is it possible to make the process instance continue exection after a join node based on a condition (possibily in a script) instead of waiting for all child tokens?
I have seen a undocumented attribute in the code of Join Node that allows adding a script in Join Node. I tried to use it but it failed :http://www.jboss.com/index.html?module=bb&op=viewtopic&t=78135
Is there an alternative choice for this? Are there any plans to support it in future releases?
Thank you,