4 Replies Latest reply on Oct 30, 2006 5:09 PM by Kevin Barfield

    StartersProcess - task assigned to null, null

    jerzy stachera Newbie

      I deployed the StartersProcess from jBPM Getting Started and after the state 'Receive Return' I got a message:

      New tasks have been assigned to: null, null.


      (the next step in the process is fork node).

      My question is why I don't have information about next users which were assigned to the task (bert, ernie) ?

      I have looked into the code and I found that next assigned user is retrieved by: taskAssignLog.getActorId()

      if (assignmentLogs.size() > 1) {
       String msg = "New tasks have been assigned to: ";
       Iterator iter = assignmentLogs.iterator();
       while (iter.hasNext()) {
       TaskAssignLog taskAssignLog = (TaskAssignLog) iter.next();
       msg += taskAssignLog.getActorId();
       if (iter.hasNext())
       msg += ", ";
       }


      unfortunatelly that method returns null, but if I use
      getTaskNewActorId()
      instead, it would be ok:

      so another question is what is the difference between following methods:

      taskAssignLog.getActorId()
      taskAssignLog.getTaskNewActorId()
      taskAssignLog.getTaskOldActorId()


      ??

      BR,
      Jurek

        • 1. Re: StartersProcess - task assigned to null, null
          jerzy stachera Newbie

          ProcessDefinition.xml to previous post ^^^^

          <?xml version="1.0" encoding="UTF-8"?>
          
          <process-definition
           xmlns="" name="starters">
           <swimlane name="Shipping">
           <assignment expression="user(sors)"></assignment>
           </swimlane>
           <swimlane name="Sales">
           <assignment expression="user(ernie)"></assignment>
           </swimlane>
           <swimlane name="Accounting">
           <assignment expression="user(bert)"></assignment>
           </swimlane>
           <start-state name="Ship Order Return">
           <task name="Ship Item">
           <controller>
           <variable name="tracking number" access="read,write,required"></variable>
           </controller>
           </task>
           <transition name="shipping" to="Receive Return"></transition>
           </start-state>
           <task-node name="Receive Return">
           <task name="Receive Item" swimlane="Shipping">
           <controller>
           <variable name="tracking number" access="read"></variable>
           <variable name="received date" access="read,write,required"></variable>
           </controller>
           </task>
           <transition name="process return" to="fork1"></transition>
           </task-node>
           <fork name="fork1">
           <transition name="ordering" to="Update Order"></transition>
           <transition name="accounting" to="Return Money"></transition>
           </fork>
           <task-node name="Update Order">
           <task name="Send Updated Order" swimlane="Sales">
           <controller>
           <variable name="address" access="read,write,required"></variable>
           </controller>
           </task>
           <transition name="" to="join1"></transition>
           </task-node>
           <task-node name="Return Money">
           <task name="Update Books" swimlane="Accounting">
           <controller>
           <variable name="amount" access="read,write,required"></variable>
           </controller>
           </task>
           <transition name="" to="join1"></transition>
           </task-node>
           <join name="join1">
           <transition name="" to="end1"></transition>
           </join>
           <end-state name="end1"></end-state>
          </process-definition>


          • 2. Re: StartersProcess - task assigned to null, null
            Kevin Barfield Newbie

            Check the jbpm_id_user table to make sure the users are in it. I believe you will see that message if the users do not exist in the table.

            http://wiki.jboss.org/wiki/Wiki.jsp?page=Jbpm31DataModel

            • 3. Re: StartersProcess - task assigned to null, null
              jerzy stachera Newbie

               

              "kbarfield" wrote:
              Check the jbpm_id_user table to make sure the users are in it. I believe you will see that message if the users do not exist in the table.

              http://wiki.jboss.org/wiki/Wiki.jsp?page=Jbpm31DataModel


              All the users are in the JBPM_ID_USER table.

              • 4. Re: StartersProcess - task assigned to null, null
                Kevin Barfield Newbie

                I see you have:

                 <swimlane name="Shipping">
                 <assignment expression="user(sors)"></assignment>
                 </swimlane>
                


                Is the user "sors" in the user dropdown? Does it work correctly if you use "grover" instead?