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&...]