4 Replies Latest reply on Dec 22, 2006 5:08 PM by jainer

    New tasks have been assigned to: ..... null, null?

    zephren

      I get the message telling me that a new task has been assigned.

      "New tasks have been assigned to: null, null."

      Can anyone help me figure out why it might say "null, null"?

      I have created simlanes for "Sales" and "Reception".
      I am using the expression assignment: "user(Sales)" and "user(Reception)" respectively.
      I have added each user to the jbpm_id_user table (that is the only table I have added them to).

      I only get this "bug" when using a fork that splits into two different tasks assigned to two different users.

      Thanks

        • 1. Re: New tasks have been assigned to: ..... null, null?
          jainer

          Hi:

          You must to use:

           taskAssignLog.getTaskNewActorId();
          


          it works!!!

          jainer e.

          • 2. Re: New tasks have been assigned to: ..... null, null?
            zephren

            Where and how do I use that?

            • 3. Re: New tasks have been assigned to: ..... null, null?
              jainer

               

               Iterator iterator = taskMgmtSession.findTaskInstances(jbpmContext.getActorId()).iterator();
              LoggingInstance loggingInstance = processInstance.getLoggingInstance();
              List assignmentLogs = loggingInstance.getLogs(TaskAssignLog.class);
              
              log.debug("assignmentlogs: " + assignmentLogs);
              


              
              else if (assignmentLogs.size() > 1) {
               String msg = "Nuevas tareas han sido asignadas a: ";
               Iterator iter = assignmentLogs.iterator();
              
               while (iter.hasNext()) {
               TaskAssignLog taskAssignLog = (TaskAssignLog) iter.next();
               msg += taskAssignLog.getTaskNewActorId();
              
               while (iterator.hasNext()) {
               TaskInstance nextTask = (TaskInstance) iterator.next();
              
               if (nextTask.isSignalling()) {
              
               if (taskAssignLog.getTaskNewActorId().equals(jbpmContext.getActorId())) {
              
               jbpmContext.save(taskInstance);
               initialize(nextTask);
               return "task";
               }
               }
               }
               if (iter.hasNext())
               msg += ", ";
               iterator = taskMgmtSession.findTaskInstances(jbpmContext.getActorId()).iterator();
               }
               msg += ".";
              
               JsfHelper.addMessage(msg);
              


              • 4. Re: New tasks have been assigned to: ..... null, null?
                jainer

                the inner blocks of code are my own code

                jainer e.