This content has been marked as final.
Show 3 replies
-
1. Re: Multiple Simultaneous Task Instances of the Same Task
olivier_debels Oct 30, 2007 5:32 AM (in response to dleerob)I guess you can do this with an actionHandler.
see Wfp16MiWithoutAPrioriRuntimeKnowledge. -
2. Re: Multiple Simultaneous Task Instances of the Same Task
dleerob Mar 7, 2008 3:45 AM (in response to dleerob)Thank you. It tried it out, and it works perfectly.
In my action class:TaskMgmtDefinition tmd = (TaskMgmtDefinition) executionContext.getDefinition(TaskMgmtDefinition.class); Task task = tmd.getTask("Principal Approval"); TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance(); String[] approvers = new String["actor1","actor2"]; //get desired actors here for (int x = 0; x < approvers.length; x++) { TaskInstance taskInstance = tmi.createTaskInstance(task, executionContext.getToken()); taskInstance.setActorId(approvers[x]); }
Just remember, in your processdefinition.xml, the <task-node> must have the following attribute if you don't want to create a task instance automatically.create-tasks="false"
Hope this helps someone else. -
3. Re: Multiple Simultaneous Task Instances of the Same Task
dleerob Apr 2, 2008 6:03 AM (in response to dleerob)I forgot to mention, my action class is fired on node-enter.
eg:<event type="node-enter"> <action name="Create Document Review Tasks" class="mypackage.CreateDocumentReviewTasks"></action> </event>