[jboss-user] [JBoss jBPM] - Re: next task/node name in processInstance

vtysh do-not-reply at jboss.com
Thu Aug 23 03:13:17 EDT 2007


You can try to use jbpm logs. But i don't know which results will you get in case of the next node is the join node. Here how it is used in TaskBean.java of jbpm-3.1.3

  |     LoggingInstance loggingInstance = processInstance.getLoggingInstance();
  |     List assignmentLogs = loggingInstance.getLogs(TaskAssignLog.class);
  | 
  |     log.debug("assignmentlogs: " + assignmentLogs);
  | 
  |     if (assignmentLogs.size() == 1) {
  |       TaskAssignLog taskAssignLog = (TaskAssignLog) assignmentLogs.get(0);
  |       JsfHelper.addMessage("A new task has been assigned to '" + taskAssignLog.getTaskNewActorId() + "'");
  | 
  |     } else 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 += ", ";
  |       }
  |       msg += ".";
  |       JsfHelper.addMessage(msg);
  |     }
  | 
TaskAssignLog has reference to TaskInstance

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

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



More information about the jboss-user mailing list