Alejandro Velazquez [
http://community.jboss.org/people/avelazquez] created the discussion
"Re: jbpm3 Assign task to multiple actors"
To view the discussion, visit:
http://community.jboss.org/message/607310#607310
--------------------------------------------------------------
OK,
Programatically,you can add an Action to the enter-event in the Task Node.
In the ActionHandler you create the tasks required (individual assigned) via the
TaskMgtInstance; something like:
//First, obtain the unassigned task from the node
TaskNode taskNode = (TaskNode) executionContext.getNode();
Task myTask = taskNode.getTask("My Unassigned Task")
//Then, create the required task instances, by using myTask as model.
TaskMgmtInstance taskMgtInstance = executionContext.getTaskMgmtInstance();
for(.....) {
TaskInstance ti = taskMgtInstance.createTaskInstance(myTask,
executionContext().getToken());
ti.setName(......);
ti.setActorId(.....);
.....
}
In order to make this works, you have to disable the automatic creation of task instances
in the Task Node. By setting the attribute: create-tasks="false". So, the
task-node is something like:
<task-node name="task-node1" create-tasks="false">
<event type="node-enter">
<action class="my,paq.CreateTaskActionHandler"
name="CreateTaskActionHandler"></action>
</event>
<task name="My Unassigned Task">
......
</task>
</task-node>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/607310#607310]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]