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.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134767
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to