[jboss-user] [JBoss jBPM] - ActorID and swimlane for a Task instance

azeemullah_m do-not-reply at jboss.com
Tue Nov 18 07:10:28 EST 2008


Hi ,
In my application i need to insert both Actor id as well as swimlane for a taskinstance whenever it is created.Because the logged in user views his tasks in myworkitem page and in group workitem he will be viewing the group workitem tasks. So for Myworkitem i will retrive based on ActorId and for group workitem i will retrive based on swimlane instance.

My JPDL :Contains
----------------------

For swimlane i have given swimlane Tag as
--------------------------------------------------

      
      <assignment pooled-actors="AD,GSM,RVP,DVP,CDM"/>
   


For the actorId setting i have used .. Event  tag with task-create attribute. where i am doing the following code


My Sample Task Node in my JPDL
---------------------------------------
 <task-node name="RateCard  AD Approval">
      
       
	   
	   
	   
      
   </task-node>



public class MyHandlerClass implements ActionHandler
{
	private static final long serialVersionUID = 1L;

	public void execute(ExecutionContext poExecutionContext) throws Exception {
		System.out.println("Assigning the Task to the User");
		JbpmContext jbpmContext = poExecutionContext.getJbpmContext();
		long taskId = poExecutionContext.getTaskInstance().getId();
		System.out.println("Task Instance ID IS ::::::::: "+taskId);
		TaskInstance taskInstance = jbpmContext.getTaskInstance(taskId);
        	taskInstance.setActorId("AD");
	        jbpmContext.save(taskInstance);
		System.out.println("Task Instance  ACTOR ID::::::::: "+poExecutionContext.getTaskInstance().getActorId());
		System.out.println("Assigning Done");
	}
	}




The Problem is when i remove the swimlane from Process Defintion it sets the Actor id in taskInstance table. but when i try with swimlane it either sets the actor iD but removes the swimlaneInstance .

WHY do we not have provision to set both while task instantiated...

Kindly reply as soon as possible.

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190082



More information about the jboss-user mailing list