[jboss-user] [JBoss jBPM] - swimlane user assigment seems to doesn't work

antitrust1982 do-not-reply at jboss.com
Tue Aug 8 03:31:05 EDT 2006


Hi all,

I created a process where I have two differents swimlane role:


  | <swimlane name='Swimlane1' >
  |   <assignment expression='user(ernie)'/>
  | </swimlane>
  | 
  | <swimlane name='Swimlane2' >
  |    <assignment expression='user(bert)'/>
  | </swimlane>
  |   
	
I affect for each role a task in order to see if the swimlane works:


  |  <task-node name='DeclarationSinistre'>
  |      <task swimlane='FONCIA'>
  |      </task>
  |      <transition name='' to='EnregistrementSinistre'>"+"</transition>
  | </task-node>
  | 
  | <task-node name='EnregistrementSinistre'>
  |       <task swimlane='Assurimo'>
  | 	</task>
  | 	<transition name='' to='ControlePrime'></transition>
  | </task-node>

In my java file I initialise the context and declare my swimlane:


  | ProcessInstance processInstance  =      new ProcessInstance(processDefinition);
  | JbpmContext	jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
  | 
  | try {
  |   jbpmContext.deployProcessDefinition(processDefinition);
  |   ///////////////////////////////////////////////////////////////	
  |  Swimlane s = new Swimlane("Swimlane1");
  |   processInstance.getProcessDefinition().getTaskMgmtDefinition().addSwimlane(s);
  |   System.out.println(s);
  |   s.addTask(processInstance.getProcessDefinition().getTaskMgmtDefinition().getTask("DeclarationSinistre")); 
  | 

For see if my swimlane works I put in the JbpmContext the user of the second swimlane, and execute my process:


  |   jbpmContext.setActorId("bert");Token token =   processInstance.getRootToken();
  |    		          nameProcess=processInstance.getProcessDefinition().getName();   
  |   System.out.println("nom de l'utilisateur est:"+ jbpmContext.getActorId());      
  |   this.setNameProcess(nameProcess);
  |   token.signal();
  |   currentNode=token.getNode().getName();
  |   this.setCurrentNode(currentNode);
  |   System.out.println("noeud courant:"+currentNode);
  |   jbpmContext.save(token);
  |   jbpmContext.save(processInstance);
  |   Map session = (Map) ActionContext.getContext().get("session");
  |   session.put("process",processInstance);    session.put("processName",nameProcess);
  | }
  | finally {
  | 	System.out.println("dans finally");
  | 	jbpmContext.close();
  |          System.out.println("fermeture du context");
  | 	}
  | 

When I execute my process, my task is execute while the user is a user of swimlane2, and in the anothers tasks where the swimlane role is different (alternance of swimlane1 and swimlane2) the process continue to be executed like there isn't any swimlane role.

Somebody can help me to put in the context the user in order to be seen by the swimlane, please.

I hope, I explain well because it's difficult to explain exactly my problem. I will try to summary now:

I have two swimlane role I declare in my processdefinition the both and when I execute my process the changement of role in ignored. And the assigment by setActorId too.

can you help me to resolve my problem please

antitrust1982

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

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



More information about the jboss-user mailing list