[jboss-user] [JBoss jBPM] - Re: How logging me in as a user in JBPM (swimlane)

antitrust1982 do-not-reply at jboss.com
Thu Sep 14 04:47:21 EDT 2006


now I work on one instance of jbpm process in order to work one instance correctly. (but I notice that when I execute two portlets of jbpm, the processID of each is the same).

Now, I catch the taskinstance and do a list for each swimlane person. after, I would like to choice one among these and execute this. So I must to indicate which one it is. I have the taskinstanceID but how can I call this taskinstance thanks to this Id?

this is my code:
		    System.out.println("les taches non finies sont:"); 
  | 		    Collection taskinstances  = (Collection) pi.getTaskMgmtInstance().getUnfinishedTasks(token);		  
  | 		    Iterator itr1 = taskinstances.iterator();	
  | 		    while(itr1.hasNext()) {
  | 			        taskinstance=(TaskInstance)itr1.next();
  | 			      
  | 		      if("ernie"==taskinstance.getActorId()){
  | 		    	  System.out.println("Pour ERNIE :................"+taskinstance.getName());
  | 		    	  System.out.println(taskinstance.getId());
  | 		    	  System.out.println("tache finie:.........."+taskinstance.hasEnded());
  | 		      }
  | 		      
  | 		      else if("bert"==taskinstance.getActorId()){
  | 		    	  System.out.println("Pour BERT :...................."+taskinstance.getName());
  | 		      }
  | 		      
  | 		      else{	          
  | 		    	  System.out.println("Les autres taches sont :"+taskinstance.getName()+" et sont allouées à"+taskinstance.getActorId());
  | 		    	  taskinstance.getSwimlaneInstance().setActorId("bert");
  | 		    	  System.out.println("Changement effectué.. the task is :"+taskinstance.getName()+" to the user "+taskinstance.getActorId());
  | 		    	  
  | 		      }
  | 		  }
  | 		  
  | 		

I want to work on one of the task instances after this "while loop".

thank you for your help

antitrust1982

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

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




More information about the jboss-user mailing list