[jboss-user] [JBoss jBPM] - Re: a fast solution
newbie007
do-not-reply at jboss.com
Tue Aug 1 13:15:27 EDT 2006
Look at the following code and you should be able to understand what is going on:
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);
| }
|
| jbpmContext.save(taskInstance);
|
| return "home";
| }
When it returns, it uses faces config xml to figure where to go (mapping for "home").
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962250#3962250
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962250
More information about the jboss-user
mailing list