[jboss-user] [jBPM] - Re: Process Definition MetaData

Michael Wohlfart do-not-reply at jboss.com
Mon Sep 20 10:31:21 EDT 2010


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&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100920/96307446/attachment-0001.html 


More information about the jboss-user mailing list