Hi boerse,
anonymous wrote : The main point is that tasks always take their default
transition (confirm in my case) and i don't want to execute twice the same
action in that node.
If you want to end tasks that goes to a certain transition, if I remember,
you can signal it this way (make it a signalling task so when it signals it
also ends the task)
| TaskInstance ti= executionContext.getTaskInstance();
| ti.end( transitionName );
|
I assume you want to have a task to be done by somebody, like approving an
order for example. If for some pre-determined time he does not accomplish, you
want the system to do something. Is this the correct assumption? If this is the
case, I would suggest to have only one task to keep things simple and add a
timer to cancel that task if it has elapsed some period. If you want to have
two or more users being able to carry the same task, first-come-first-serve,
then add those users in a group and specify it in the swimlane, like so:
| <swimlane name="approver">
| <assignment expression="group(groupname)"/>
| </swimlane>
|
and your task (This simply means anybody from the group can take on the
task. In this example, the "system" must be a member of the group. btw, I have
not tested the timer part but I think it should work):
| <task-node name="order" create-tasks="true">
| <timer duedate="3 business hours">
| <script>
| taskInstance.setActorId( "system" );
| taskInstance.end( "cancel" );
| </script>
| </timer>
| <task name="Approve-Order" swimlane="approver"/>
| <transition name="Approve" to="approve" />
| <transition name="Cancel" to="cancel" />
| </task-node>
|
There are many ways how to to do it, so unless I know what you want to
accomplish (real world example and not code), maybe I can add some input. If
this code does not work tell me. I did not have time to test this and I might
have forgotten some syntax, but the idea is there.
Regards,
Elmo
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925722#3925722
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925722
-------------------------------------------------------
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