[jboss-user] [JBoss jBPM] - swimlane and taskinstances
antitrust1982
do-not-reply at jboss.com
Fri Sep 1 03:49:23 EDT 2006
Hi all,
I have create two swimlanes with some tasks for each.
I want to execute my process logging me like the swimlane"s user.
Now, I have made this in order to know my current taskinstance but I have some taskinstances but I must have just one.
I think this problem can be a problem of execution of my taskinstance. do you know how do this please. Now I use the token.signal() is it the good solution.
I put my code of get back taskinstance and my console returns in order to know what is for you my problem.
SwimlaneInstance si= (SwimlaneInstance)session.get("si");
| System.out.println( si.getName());
|
|
|
|
|
| System.out.println("avant la création du collection");
| System.out.println("NOM DU SWIMLANE : "+si.getName());
| Collection taskinstances = (Collection) si.getTaskMgmtInstance().getTaskInstances();
| System.out.println("ca fonctionne le MAP");
| Iterator itr1 = taskinstances.iterator();
| System.out.println("iterator ok");
| while(itr1.hasNext()) {
| System.out.println("creation taskinstance");
| taskinstance=(TaskInstance)itr1.next();
| // taskinstance = processInstance.getTaskMgmtInstance().createTaskInstance();
|
|
| if("ernie"==taskinstance.getActorId()){
| System.out.println("TASK ERNIE ARE:.ERNIE................:"+taskinstance.getName());
| }
|
| else if("bert"==taskinstance.getActorId()){
| System.out.println("task BERT ARE:.BERT....................:"+taskinstance.getName());
| }
| else{
|
| System.out.println("THE TASK ARE NOT ALLOWED TO YOUR USER .. the task is :"+taskinstance.getName()+" to the user "+taskinstance.getActorId());
| taskinstance.getSwimlaneInstance().setActorId("bert");
| System.out.println("Changement effectué.. the task is :"+taskinstance.getName()+" to the user "+taskinstance.getActorId());
| }
| /* System.out.println("TASK INSTANCE..................:"+ taskinstance.getName());
|
| System.out.println("SI ACTOR ID..................: "+si.getActorId());
| jbpmContext1.setActorId("bert");
| System.out.println("JBPM CONTEXT ACTOR ID..........: "+jbpmContext1.getActorId());
| */
|
| }
| //////////////////////////////////
| // jbpmContext.save(token);
|
| try{
| token = taskinstance.getToken();
| token.signal();
| token.signal();
| }
| finally{
|
| }
the console returns:
| iterator ok
| creation taskinstance
| task BERT ARE:.BERT....................:DeclarationSinistre
| creation taskinstance
| TASK ERNIE ARE:.ERNIE................:start
| ############## save token good#######
| ############## save process good#######
| USER ..........................ernie
| set currentNode
| #### execute
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968855#3968855
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968855
More information about the jboss-user
mailing list