[jboss-user] [JBoss Seam] - jbpm, AssignmentHandler and bijection

szaccaria do-not-reply at jboss.com
Fri Jun 29 13:09:57 EDT 2007


Hallo to all,
   I need some help about assignmenthandler in to my proccess...

The definition is


  | <process-definition
  | 	name="controllodate">
  |    
  |    <start-state name="start">
  |       <transition to="controllo"/>
  |    </start-state>
  |    
  |    <task-node name="controllo">
  |       <task name="innerchek" description="Controllo documento da interno azienda">         
  |          <assignment class="AssignmentToActorOrPooledActors" config-type="bean"/>         
  |       </task>
  |       <transition to="confermato" name="terminato"/>
  |       <transition to="controllo" name="rinuncia"/>
  |       <transition name="richiesta" to="fornitore"></transition>
  |    </task-node>
  |    
  |   
  |    <task-node name="fornitore">
  |       <task name="controlladata" description="Controllo data da fornitore">
  |          <assignment actor-id="#{doc.clifor}"></assignment>
  |       </task>
  |       <transition name="proposta" to="controllo"></transition>
  |    </task-node>
  |    
  |    <end-state name="confermato"/>
  |     
  | </process-definition>
  | 

and the class handler is


  | @Stateless
  | @Name("assignment")
  | public class AssignmentToActorOrPooledActors implements AssignmentHandler {
  | 	
  | 	@In
  | 	org.jbpm.taskmgmt.exe.TaskInstance taskInstance;
  | 	
  | 	@Logger
  | 	private Log log;
  | 	
  | 	private static final long serialVersionUID = 1L;
  | 
  | 	public void assign(Assignable arg0, ExecutionContext arg1) throws Exception {		
  | 		
  | 		if( taskInstance == null ){
  | 			arg0.setPooledActors(new String[]{"commerciale"});
  | 			return;			
  | 		}		
  | 		
  | 		Object obj = taskInstance.getVariable("responsabile");
  | 		if( obj != null ){			
  | 			arg0.setActorId((String)obj);
  | 		} else {			
  | 			arg0.setPooledActors(new String[]{"commerciale"});
  | 		}		
  | 
  | 	}
  | 
  | }
  | 

I hoped that the magic of bijection worked also with the AssignmentHandler? but therefore it does not seem being.
Infact I get the java.lang.NullPointerException error when i try to use the seam componet like @loger or @in...
Bjiection not wotk with bpm?

I want to assign a task to a actor or a pooled-actors to second from who it assigns the task. 
Es: I'm a actor of a pooled-actors, get a task from the pooled-actors list taskinstace, than valutate the task and bypass to another person that make something with this, so the person return to me this task... but i want to be assign to me and not to entire pooled-actors list.

Thanks in advantage 


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

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



More information about the jboss-user mailing list