[jboss-user] [JBoss jBPM] - How to dispatch workflows/create an event handler loop?

ryhadley do-not-reply at jboss.com
Mon Jul 24 21:36:45 EDT 2006


When I think of what a workflow engine does, it is essentially an event handler loop that is configured to appropriately dispatch the incoming messages:
event loop
  |     get message from queue
  |     handle message by one of:
  |         - start new workflow, or
  |         - start next activity in a (suspended) workflow
  | repeat


Based on the user guide http://docs.jboss.org/jbpm/v3/userguide/index.html, I can see how to define a workflow (as XML) and give the code behind the activities in the workflow (implement ActionHandler interface), but I don't understand how jBPM takes incoming "messages" and dispatches to the appropriate ActionHandlers. i.e. The user guide only has code snippets that are JUnit tests which create a workflow from an XML definition (ProcessDefinition.parseXmlString()) and then execute the workflow by pushing the token through it with token.signal() (i.e. 3.2. Database example in User Guide); there is no practical code example for a workflow application.

Does jBPM provide such an event loop/dispatch capability? Or do I need to figure out how to implement this myself (using something like the code in ProcessInstanceBean.java, from the webapp example, and tie it into the Scheduler from chapter 12 in the User Guide)? If so, is there a simple example available?

Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960562#3960562

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960562



More information about the jboss-user mailing list