7 Replies Latest reply on Dec 19, 2007 5:32 PM by Pete Muir

    jbpm, AssignmentHandler and bijection

    Stefano Zaccaria Newbie

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

      The definition is

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

      and the class handler is

      public class AssignmentToActorOrPooledActors implements AssignmentHandler {
       org.jbpm.taskmgmt.exe.TaskInstance taskInstance;
       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"});
       Object obj = taskInstance.getVariable("responsabile");
       if( obj != null ){
       } 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