Author: manaRH
Date: 2011-02-15 08:23:11 -0500 (Tue, 15 Feb 2011)
New Revision: 14045
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/jbpm.cfg.xml
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
Log:
JBPAPP-5517 - integration test for exception handling in jbpm EL expression
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/resources/jbpm.cfg.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/resources/jbpm.cfg.xml 2011-02-15
12:10:45 UTC (rev 14044)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/resources/jbpm.cfg.xml 2011-02-15
13:23:11 UTC (rev 14045)
@@ -1,13 +1,15 @@
<jbpm-configuration>
<jbpm-context>
- <service name="persistence">
- <factory>
- <bean
class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
- <field
name="isTransactionEnabled"><false/></field>
- </bean>
- </factory>
- </service>
+
+ <service name="persistence"
factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
+<!-- <service name="persistence">-->
+<!-- <factory>-->
+<!-- <bean
class="org.jbpm.persistence.db.DbPersistenceServiceFactory">-->
+<!-- <field
name="isTransactionEnabled"><false/></field>-->
+<!-- </bean>-->
+<!-- </factory>-->
+<!-- </service>-->
<service name="tx" factory="org.jbpm.tx.TxServiceFactory"
/>
<service name="message"
factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler"
factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml 2011-02-15
12:10:45 UTC (rev 14044)
+++
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml 2011-02-15
13:23:11 UTC (rev 14045)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<process-definition
- name="OrderManagement"
+ name="TestProcess5"
xmlns="urn:jbpm.org:jpdl-3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jbpm.org:jpdl-3.2
http://jbpm.org/xsd/jpdl-3.2.xsd"
@@ -12,17 +12,14 @@
</start-state>
<task-node name="process" end-tasks="true">
- <task name="ship" description="Ship order">
- <assignment
pooled-actors="#{shipperAssignment.pooledActors}"/>
- </task>
<transition name="shipped" to="problem">
- <action expression="#{afterShipping.log}"/>
+ <action
expression="#{seamExpressionEvaluatorTestController.log}"/>
</transition>
<transition name="cancel" to="cancelled"/>
</task-node>
<node name="problem">
- <action
expression="#{seamExpressionEvaluatorTestController.exceptionThrowing}"></action>
+ <action
expression="#{seamExpressionEvaluatorTestController.exceptionThrowing}" />
<transition to="complete" />
</node>
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-02-15
12:10:45 UTC (rev 14044)
+++
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-02-15
13:23:11 UTC (rev 14045)
@@ -8,6 +8,9 @@
public class BusinessProcessTest
extends SeamTest
{
+
+ static final String EXCEPTION_MESSAGE = "org.jbpm.jpdl.el.ELException: Error
evaluating ${seamExpressionEvaluatorTestController.exceptionThrowing}; possible causes are
logged at debug level";
+
@Test
public void noProcessDefinition()
throws Exception
@@ -52,10 +55,12 @@
protected void invokeApplication() throws Exception
{
try {
-
invokeAction("#{seamExpressionEvaluatorTestController.createProcess5}");
+ invokeAction("#{bpmTest.startExceptionPageflow}");
assert false;
- } catch (Exception e) {
-
+ } catch (Exception e) {
+// System.out.println(e.getMessage());
+// System.out.println(EXCEPTION_MESSAGE);
+ assert EXCEPTION_MESSAGE.equals(e.getMessage());
}
}
@@ -72,5 +77,10 @@
@CreateProcess(definition="TestProcess1")
public void startOne() {
}
+
+ @CreateProcess(definition="TestProcess5")
+ public void startExceptionPageflow()
+ {
+ }
}
}
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-02-15
12:10:45 UTC (rev 14044)
+++
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-02-15
13:23:11 UTC (rev 14045)
@@ -41,6 +41,11 @@
System.out.println("true");
}
+ public void log()
+ {
+ System.out.println("After Shipping");
+ }
+
public String getName()
{
return this.name;