Tuesday, August 12, 2008

JBoss Seam Page Flow Configuration Tips

Here are some tips for avoiding problems in defining Page Flows with JBoss Seam.
  • You need the jbpm-jpdl.jar file in your ear file. It comes with the Seam download. Otherwise you will get deploy errors complaining about the class org/jbpm/graph/exe/ProcessInstance not found.
  • First define page flows in files suffixed .jpdl.xml.
  • File names need not match the flow names defined inside them.
  • Put the page flow definitions in the components.xml file which must go in the META-INF dir. The relevant segment will look like this:


<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpm="http://jboss.com/products/seam/bpm">

<bpm:jbpm>
<bpm:pageflow-definitions>
<value>myPageFlow.jpdl.xml</value>
</bpm:pageflow-definitions>
</bpm:jbpm>
</components>

  • When you have hierarchically dependent page flows then the file in which the more basic flow (subflow or sub-process) must be listed earlier in the the components.xml's jbpm file list.
  • So for example:
  •    

    <bpm:jbpm>
    <bpm:pageflow-definitions>
    <value>subFlow.jpdl.xml</value>
    <value>dependentFlow.jpdl.xml</value>
    </bpm:pageflow-definitions>
    </bpm:jbpm>

1 comment:

Anonymous said...

Good words.