[jboss-user] [jBPM] - How to get a list of available transitions for an ActivityExecution
Joe Gottman
do-not-reply at jboss.com
Tue Jun 29 09:51:17 EDT 2010
Joe Gottman [http://community.jboss.org/people/joegottman] replied to the discussion
"How to get a list of available transitions for an ActivityExecution"
To view the discussion, visit: http://community.jboss.org/message/550204#550204
--------------------------------------------------------------
I finally figured it out. Jorge's answer was almost correct, but I had to manually create an Environment variable for ExecutionImpl.getActivity() to succeed. So the final code was
EnvironmentFactory environmentFactory = (EnvironmentFactory)processEngine;
Execution execution = executionService.findExecutionById(executionID);
if (execution instanceof ExecutionImpl) {
ExecutionImpl executionImpl = (ExecutionImpl)execution;
EnvironmentImpl environment = environmentFactory.openEnvironment();
ActivityImpl activityImpl = null;
try {
activityImpl = executionImpl.getActivity();
} finally {
environment.close();
}
if (activityImpl != null) {
return activityImpl.getOutgoingTransitionsMap().keySet();
}
}
return Collections.<String>emptySet();
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550204#550204]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100629/7dba110d/attachment-0001.html
More information about the jboss-user
mailing list