Michael Wohlfart [
http://community.jboss.org/people/mwohlf] created the discussion
"Re: Process Definition MetaData"
To view the discussion, visit:
http://community.jboss.org/message/562687#562687
--------------------------------------------------------------
i guess what you want to do is something like this:
public class ProcessDefinitionTaskQueryTest extends JbpmTestCase {
public void testQueryProcessDefinitionTasks() {
deployJpdlXmlString(
"<process name='findMyTasks'>" +
" <start name='start' />" +
" <task name='do something' >" +
" </task>" +
" <task name='do something else' >" +
" </task>" +
"</process>"
);
ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl)
repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(QueryOperator.EQUALS, "findMyTasks")
.uniqueResult();
Map<String, ?> activities = processDefinition.getActivitiesMap();
Set<Entry<String, ?>> entries = (Set)activities.entrySet();
for (Entry entry : entries) {
System.err.println(entry.getKey() + " -> " + entry.getValue());
}
}
}
this gives you the task nodes and the start node:
do something -> activity(do something)
do something else -> activity(do something else)
start -> activity(start)
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/562687#562687]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]