Author: pete.muir(a)jboss.org
Date: 2008-05-21 08:18:34 -0400 (Wed, 21 May 2008)
New Revision: 8251
Modified:
trunk/examples/dvdstore/resources/WEB-INF/components.xml
trunk/examples/numberguess/resources/WEB-INF/components.xml
trunk/src/main/org/jboss/seam/bpm/Jbpm.java
Log:
Changes to examples to scan for pageflows, order pageflow parsing order
Modified: trunk/examples/dvdstore/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/dvdstore/resources/WEB-INF/components.xml 2008-05-21 12:16:37 UTC (rev
8250)
+++ trunk/examples/dvdstore/resources/WEB-INF/components.xml 2008-05-21 12:18:34 UTC (rev
8251)
@@ -19,15 +19,7 @@
<!-- 120 second conversation timeout -->
<core:manager conversation-timeout="120000"/>
- <bpm:jbpm>
- <bpm:process-definitions>
- <value>ordermanagement1.jpdl.xml</value>
- </bpm:process-definitions>
- <bpm:pageflow-definitions>
- <value>checkout.jpdl.xml</value>
- <value>newuser.jpdl.xml</value>
- </bpm:pageflow-definitions>
- </bpm:jbpm>
+ <bpm:jbpm />
<security:identity
authenticate-method="#{authenticator.authenticate}"/>
Modified: trunk/examples/numberguess/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/numberguess/resources/WEB-INF/components.xml 2008-05-21 12:16:37 UTC
(rev 8250)
+++ trunk/examples/numberguess/resources/WEB-INF/components.xml 2008-05-21 12:18:34 UTC
(rev 8251)
@@ -10,11 +10,6 @@
<property name="maxGuesses">10</property>
</component>
- <bpm:jbpm>
- <bpm:pageflow-definitions>
- <value>cheat.jpdl.xml</value>
- <value>pageflow.jpdl.xml</value>
- </bpm:pageflow-definitions>
- </bpm:jbpm>
+ <bpm:jbpm />
</components>
Modified: trunk/src/main/org/jboss/seam/bpm/Jbpm.java
===================================================================
--- trunk/src/main/org/jboss/seam/bpm/Jbpm.java 2008-05-21 12:16:37 UTC (rev 8250)
+++ trunk/src/main/org/jboss/seam/bpm/Jbpm.java 2008-05-21 12:18:34 UTC (rev 8251)
@@ -10,6 +10,7 @@
import java.util.Map;
import java.util.Properties;
import java.util.Set;
+import java.util.TreeSet;
import javax.naming.NamingException;
@@ -41,6 +42,7 @@
import org.jbpm.graph.node.ProcessState;
import org.jbpm.graph.node.SubProcessResolver;
import org.jbpm.instantiation.UserCodeInterceptorConfig;
+import org.jbpm.jpdl.JpdlException;
import org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator;
import org.jbpm.persistence.db.DbPersistenceServiceFactory;
import org.xml.sax.InputSource;
@@ -156,7 +158,14 @@
{
throw new IllegalArgumentException("pageflow resource not found: " +
resourceName);
}
- return Jbpm.parseInputSource( new InputSource(resource) );
+ try
+ {
+ return Jbpm.parseInputSource( new InputSource(resource) );
+ }
+ catch (JpdlException e)
+ {
+ throw new JpdlException("Unable to parse process definition " +
resourceName, e);
+ }
}
public ProcessDefinition getProcessDefinitionFromResource(String resourceName)
@@ -232,7 +241,8 @@
}
private void installPageflowDefinitions() {
- Set<String> mergedPageflowDefinitions = ((PageflowDeploymentHandler)
((DeploymentStrategy)
Contexts.getEventContext().get(StandardDeploymentStrategy.NAME)).getDeploymentHandlers().get(PageflowDeploymentHandler.NAME)).getPageflowDefinitions();
+ Set<String> mergedPageflowDefinitions = new TreeSet<String>();
+ mergedPageflowDefinitions.addAll(((PageflowDeploymentHandler) ((DeploymentStrategy)
Contexts.getEventContext().get(StandardDeploymentStrategy.NAME)).getDeploymentHandlers().get(PageflowDeploymentHandler.NAME)).getPageflowDefinitions());
if ( pageflowDefinitions!=null )
{
mergedPageflowDefinitions.addAll(Arrays.asList(pageflowDefinitions));
@@ -321,7 +331,7 @@
try
{
return new PageflowParser(inputSource).readProcessDefinition();
- }
+ }
finally
{
jbpmContext.close();
Show replies by date