[jbpm-commits] JBoss JBPM SVN: r5104 - in jbpm4/trunk: modules/api/src/main/java/org/jbpm/api/listener and 21 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Jun 24 12:06:06 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-06-24 12:06:06 -0400 (Wed, 24 Jun 2009)
New Revision: 5104
Added:
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StatesJoinEndTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/TasksJoinEndTest.java
jbpm4/trunk/qa/hudson-jbpm4-db.sh
Removed:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/TaskExtension.java
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListenerExecution.java
jbpm4/trunk/modules/db/src/main/config/hsqldb.hibernate.cfg.xml
jbpm4/trunk/modules/db/src/main/config/mysql.hibernate.cfg.xml
jbpm4/trunk/modules/db/src/main/config/oracle.hibernate.cfg.xml
jbpm4/trunk/modules/db/src/main/config/postgresql.hibernate.cfg.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Configuration.xml
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ExecutionModes.xml
jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/hsqldb.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/mysql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/oracle.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/postgresql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/sybase.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java
jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.hibernate.cfg.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml
jbpm4/trunk/modules/test-db/pom.xml
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/async/AsyncBasicsTest.java
jbpm4/trunk/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml
jbpm4/trunk/modules/test-load/src/test/resources/jbpm.hibernate.cfg.xml
Log:
JBPM-2303 JBPM-2354 JBPM-2322 JBPM-2356 hibernate persistence cleanup
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -178,12 +178,6 @@
* Can be null in case this execution is not taking a transition. */
Transition getTransition();
- // extensions //////////////////////////////////////////////////////////////
-
- /** way to access process language extensions in the execution without
- * having to cast. Casting can be problematic for persistence. */
- <T> T getExtension(Class<T> extensionClass);
-
/** setter for the priority. The default priority is 0, which means
* NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1),
* LOW (-1) and LOWEST (-2). For the rest, the user can set any other
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListenerExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListenerExecution.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListenerExecution.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -59,18 +59,10 @@
* registered to parent's of the given eventSource. */
void fire(String eventName, ObservableElement eventSource);
- // extensions //////////////////////////////////////////////////////////////
-
- /** way to access process language extensions in the execution without
- * having to cast. Casting can be problematic for persistence. */
- <T> T getExtension(Class<T> extensionClass);
-
-
/** setter for the priority. The default priority is 0, which means
* NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1),
* LOW (-1) and LOWEST (-2). For the rest, the user can set any other
* priority integer value, but then, the UI will have to display it as
* an integer and not the named value.*/
void setPriority(int priority);
-
}
Modified: jbpm4/trunk/modules/db/src/main/config/hsqldb.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/db/src/main/config/hsqldb.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/db/src/main/config/hsqldb.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -15,7 +15,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/db/src/main/config/mysql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/db/src/main/config/mysql.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/db/src/main/config/mysql.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -14,7 +14,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/db/src/main/config/oracle.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/db/src/main/config/oracle.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/db/src/main/config/oracle.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -14,7 +14,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/db/src/main/config/postgresql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/db/src/main/config/postgresql.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/db/src/main/config/postgresql.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -14,7 +14,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Configuration.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Configuration.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Configuration.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -68,8 +68,7 @@
jbpm.history.hbm.xml
jbpm.identity.hbm.xml
jbpm.repository.hbm.xml
- jbpm.task.hbm.xml
- jbpm.jpdl.hbm.xml</programlisting>
+ jbpm.task.hbm.xml</programlisting>
<para>These all map the java domain model objects to a relational database.
</para>
<para>Other various configuration files that are included in jbpm.jar:</para>
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ExecutionModes.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ExecutionModes.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/chxx-ExecutionModes.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -134,7 +134,6 @@
<mapping resource="jbpm.pvm.execution.hbm.xml" />
<mapping resource="jbpm.pvm.variable.hbm.xml" />
<mapping resource="jbpm.pvm.job.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<cache-configuration resource="jbpm.pvm.cache.xml"
usage="nonstrict-read-write" />
</hibernate-configuration>
Modified: jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/hsqldb.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/hsqldb.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/hsqldb.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -18,7 +18,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/mysql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/mysql.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/mysql.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -18,7 +18,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/oracle.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/oracle.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/oracle.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -18,8 +18,7 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
- <mapping resource="jbpm.identity.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
</hibernate-configuration>
Modified: jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/postgresql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/postgresql.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/postgresql.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -18,7 +18,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/sybase.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/sybase.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/db/hibernate.cfg/sybase.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -18,7 +18,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -17,7 +17,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -17,7 +17,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -17,7 +17,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -17,7 +17,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -17,7 +17,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/examples/pom.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -109,11 +109,11 @@
<filtersfile file="target/test-classes/jdbc.properties" />
</filterset>
</copy>
- <replace file="target/test-classes/jbpm.hibernate.cfg.xml">
+ <!-- replace file="target/test-classes/jbpm.hibernate.cfg.xml">
<replacetoken><![CDATA[<property name="hibernate.format_sql">true</property>]]></replacetoken>
<replacevalue><![CDATA[<property name="hibernate.format_sql">true</property>
<property name="hibernate.hbm2ddl.auto">create-drop</property>]]></replacevalue>
- </replace>
+ </replace -->
</tasks>
</configuration>
</execution>
Modified: jbpm4/trunk/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/examples/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -19,7 +19,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/EndActivity.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -69,7 +69,7 @@
}
} else {
- OpenExecution executionToEnd = null;
+ ExecutionImpl executionToEnd = null;
if (endProcessInstance) {
executionToEnd = execution.getProcessInstance();
} else {
@@ -77,9 +77,9 @@
}
if (state==null) {
- execution.end(executionToEnd);
+ executionToEnd.end();
} else {
- execution.end(executionToEnd, state);
+ executionToEnd.end(state);
}
}
}
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -25,11 +25,10 @@
import java.util.Map;
import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.env.Context;
+import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Activity;
-import org.jbpm.jpdl.internal.model.JpdlExecution;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
-import org.jbpm.pvm.internal.env.Context;
-import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.script.ScriptManager;
@@ -55,7 +54,7 @@
protected Map<Object, String> outcomeVariableMappings;
public void execute(ActivityExecution execution) {
- JpdlExecution jpdlExecution = execution.getExtension(JpdlExecution.class);
+ ExecutionImpl executionImpl = (ExecutionImpl) execution;
RepositorySession repositorySession = Environment.getFromCurrent(RepositorySession.class);
@@ -67,19 +66,19 @@
processDefinition = repositorySession.findProcessDefinitionByKey(subProcessKey);
}
- JpdlExecution subProcessInstance = (JpdlExecution) processDefinition.createProcessInstance(null, execution);
+ ExecutionImpl subProcessInstance = (ExecutionImpl) processDefinition.createProcessInstance(null, execution);
for (String swimlaneName: swimlaneMappings.keySet()) {
String subSwimlaneName = swimlaneMappings.get(swimlaneName);
SwimlaneImpl subSwimlane = subProcessInstance.createSwimlane(subSwimlaneName);
- SwimlaneImpl swimlane = jpdlExecution.getSwimlane(swimlaneName);
+ SwimlaneImpl swimlane = executionImpl.getSwimlane(swimlaneName);
if (swimlane!=null) {
subSwimlane.initialize(swimlane);
}
}
for (SubProcessInParameterImpl inParameter: inParameters) {
- inParameter.produce(jpdlExecution, subProcessInstance);
+ inParameter.produce(executionImpl, subProcessInstance);
}
subProcessInstance.start();
@@ -87,9 +86,9 @@
}
public void signal(ActivityExecution execution, String signalName, Map<String, ?> parameters) {
- JpdlExecution jpdlExecution = execution.getExtension(JpdlExecution.class);
+ ExecutionImpl executionImpl = (ExecutionImpl) execution;
- ExecutionImpl subProcessInstance = jpdlExecution.getSubProcessInstance();
+ ExecutionImpl subProcessInstance = executionImpl.getSubProcessInstance();
String transitionName = null;
@@ -103,10 +102,10 @@
}
try {
- jpdlExecution.setSubProcessInstance(null);
+ executionImpl.setSubProcessInstance(null);
for (SubProcessOutParameterImpl outParameter: outParameters) {
- outParameter.consume(jpdlExecution, subProcessInstance);
+ outParameter.consume(executionImpl, subProcessInstance);
}
Activity activity = execution.getActivity();
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -25,12 +25,11 @@
import java.util.Map;
import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Activity;
import org.jbpm.api.model.Transition;
import org.jbpm.api.task.Task;
import org.jbpm.internal.log.Log;
-import org.jbpm.jpdl.internal.model.JpdlExecution;
-import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
@@ -50,8 +49,8 @@
protected TaskDefinitionImpl taskDefinition;
public void execute(ActivityExecution execution) {
- JpdlExecution jpdlExecution = execution.getExtension(JpdlExecution.class);
- TaskImpl task = jpdlExecution.createTask(taskDefinition);
+ ExecutionImpl executionImpl = (ExecutionImpl) execution;
+ TaskImpl task = executionImpl.createTask(taskDefinition);
TaskHandler taskHandler = task.getTaskHandler();
boolean wait = taskHandler.executionCreateTask(task);
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlExecution.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -1,222 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jpdl.internal.model;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.hibernate.Session;
-import org.jbpm.api.JbpmException;
-import org.jbpm.api.task.Assignable;
-import org.jbpm.api.task.AssignmentHandler;
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.script.ScriptManager;
-import org.jbpm.pvm.internal.session.DbSession;
-import org.jbpm.pvm.internal.task.AssignableDefinitionImpl;
-import org.jbpm.pvm.internal.task.ParticipationImpl;
-import org.jbpm.pvm.internal.task.SwimlaneDefinitionImpl;
-import org.jbpm.pvm.internal.task.SwimlaneImpl;
-import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
-import org.jbpm.pvm.internal.task.TaskImpl;
-import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.internal.wire.WireContext;
-
-/**
- * @author Tom Baeyens
- */
-public class JpdlExecution extends ExecutionImpl implements TaskExtension {
-
- private static final long serialVersionUID = 1L;
-
- private static Log log = Log.getLog(JpdlExecution.class.getName());
-
- protected Map<String, SwimlaneImpl> swimlanes;
-
- @Override
- public <T> T getExtension(Class<T> extensionClass) {
- if (extensionClass==null) {
- throw new JbpmException("extensionClass is null");
- }
- if (JpdlExecution.class.isAssignableFrom(extensionClass)) {
- if (dbid == 0L) return extensionClass.cast(this);
-
- Session session = Environment.getFromCurrent(Session.class);
- return extensionClass.cast(session.load(JpdlExecution.class, dbid));
- }
- throw new JbpmException("unsupported extension "+extensionClass.getName());
- }
-
- @Override
- protected ExecutionImpl newChildExecution() {
- return new JpdlExecution();
- }
-
- // tasks ////////////////////////////////////////////////////////////////////
-
- public TaskImpl createTask(TaskDefinitionImpl taskDefinition) {
- DbSession dbSession = Environment.getFromCurrent(DbSession.class);
- TaskImpl task = (TaskImpl) dbSession.createTask();
- task.setTaskDefinition(taskDefinition);
- task.setExecution(this);
- task.setProcessInstance(processInstance);
- task.setSignalling(true);
-
- // initialize the name
- if (taskDefinition.getName()!=null) {
- task.setName(taskDefinition.getName());
- } else {
- task.setName(getActivityName());
- }
-
- task.setDescription(taskDefinition.getDescription());
- task.setPriority(taskDefinition.getPriority());
- task.setForm(taskDefinition.getForm());
-
- // save task so that TaskDbSession.findTaskByExecution works for assign event listeners
- dbSession.saveTask(task);
-
- SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
- if (swimlaneDefinition!=null) {
- JpdlExecution jpdlProcessInstance = processInstance.getExtension(JpdlExecution.class);
- SwimlaneImpl swimlane = jpdlProcessInstance.getInitializedSwimlane(swimlaneDefinition);
- task.setSwimlane(swimlane);
-
- // copy the swimlane assignments to the task
- task.setAssignee(swimlane.getAssignee());
- for (ParticipationImpl participant: swimlane.getParticipations()) {
- task.addParticipation(participant.getUserId(), participant.getGroupId(), participant.getType());
- }
- }
-
- initializeAssignments(taskDefinition, task);
-
- return task;
- }
-
- /** tasks and swimlane assignment.
- * SwimlaneDefinitionImpl is base class for TaskDefinitionImpl.
- * Both Task and Swimlane implement Assignable. */
- public void initializeAssignments(AssignableDefinitionImpl assignableDefinition, Assignable assignable) {
- String assigneeExpression = assignableDefinition.getAssigneeExpression();
- if (assigneeExpression!=null) {
- String assignee = resolveAssignmentExpression(assigneeExpression,
- assignableDefinition.getAssigneeExpressionLanguage());
- assignable.setAssignee(assignee);
-
- if (log.isTraceEnabled()) log.trace("task "+name+" assigned to "+assignee+" using expression "+assigneeExpression);
- }
-
- String candidateUsersExpression = assignableDefinition.getCandidateUsersExpression();
- if (candidateUsersExpression!=null) {
- String candidateUsers =
- resolveAssignmentExpression(candidateUsersExpression,
- assignableDefinition.getCandidateUsersExpressionLanguage());
- StringTokenizer tokenizer = new StringTokenizer(candidateUsers, ",");
- while (tokenizer.hasMoreTokens()) {
- String candidateUser = tokenizer.nextToken().trim();
- assignable.addCandidateUser(candidateUser);
- }
- }
-
- String candidateGroupsExpression = assignableDefinition.getCandidateGroupsExpression();
- if (candidateGroupsExpression!=null) {
- String candidateGroups =
- resolveAssignmentExpression(candidateGroupsExpression,
- assignableDefinition.getCandidateGroupsExpressionLanguage());
- StringTokenizer tokenizer = new StringTokenizer(candidateGroups, ",");
- while (tokenizer.hasMoreTokens()) {
- String candidateGroup = tokenizer.nextToken();
- assignable.addCandidateGroup(candidateGroup);
- }
- }
-
- Descriptor assignmentHandlerDescriptor = assignableDefinition.getAssignmentHandlerDescriptor();
- if (assignmentHandlerDescriptor!=null) {
- AssignmentHandler assignmentHandler = (AssignmentHandler) WireContext.create(assignmentHandlerDescriptor);
- try {
- assignmentHandler.assign(assignable, this);
- } catch (Exception e) {
- throw new JbpmException("assignment handler threw exception: "+e, e);
- }
- }
- }
-
- protected String resolveAssignmentExpression(String expression, String expressionLanguage) {
- ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
- Object result = scriptManager.evaluateExpression(expression, expressionLanguage);
- if ( (result ==null)
- || (result instanceof String)
- ) {
- return (String) result;
- }
- throw new JbpmException("result of assignment expression "+expression+" is "+result+" ("+result.getClass().getName()+") instead of String");
- }
-
- // swimlanes ////////////////////////////////////////////////////////////////
-
- public void addSwimlane(SwimlaneImpl swimlane) {
- if (swimlanes==null) {
- swimlanes = new HashMap<String, SwimlaneImpl>();
- }
- swimlanes.put(swimlane.getName(), swimlane);
- swimlane.setExecution(this);
- }
-
- public SwimlaneImpl getSwimlane(String swimlaneName) {
- if (swimlanes==null) {
- return null;
- }
- return swimlanes.get(swimlaneName);
- }
-
- public void removeSwimlane(SwimlaneImpl swimlane) {
- swimlanes.remove(swimlane.getName());
- swimlane.setExecution(null);
- }
-
- public SwimlaneImpl getInitializedSwimlane(SwimlaneDefinitionImpl swimlaneDefinition) {
- String swimlaneName = swimlaneDefinition.getName();
-
- if (swimlanes==null) {
- swimlanes = new HashMap<String, SwimlaneImpl>();
- }
-
- SwimlaneImpl swimlane = swimlanes.get(swimlaneName);
- if (swimlane==null) {
- swimlane = createSwimlane(swimlaneName);
- initializeAssignments(swimlaneDefinition, swimlane);
- }
-
- return swimlane;
- }
-
- public SwimlaneImpl createSwimlane(String swimlaneName) {
- SwimlaneImpl swimlane = new SwimlaneImpl();
- swimlane.setName(swimlaneName);
- swimlane.setExecution(this);
- swimlanes.put(swimlaneName, swimlane);
- return swimlane;
- }
-}
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/JpdlProcessDefinition.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -40,7 +40,7 @@
Map<String, TaskDefinitionImpl> taskDefinitions = new HashMap<String, TaskDefinitionImpl>();
protected ExecutionImpl newProcessInstance() {
- return new JpdlExecution();
+ return new ExecutionImpl();
}
public SwimlaneDefinitionImpl createSwimlaneDefinition(String name) {
Deleted: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/TaskExtension.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/TaskExtension.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/model/TaskExtension.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.jpdl.internal.model;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface TaskExtension {
-
-
-}
Deleted: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping default-access="field">
-
- <subclass name="org.jbpm.jpdl.internal.model.JpdlExecution"
- extends="org.jbpm.pvm.internal.model.ExecutionImpl"
- discriminator-value="jpdl">
-
- <map name="swimlanes"
- cascade="all-delete-orphan">
- <key foreign-key="FK_SWIMLANE_EXEC">
- <column name="EXECUTION_" index="IDX_SWIMLANE_EXEC"/>
- </key>
- <map-key type="string" column="NAME_" />
- <one-to-many class="org.jbpm.pvm.internal.task.SwimlaneImpl" />
- </map>
- </subclass>
-
-</hibernate-mapping>
\ No newline at end of file
Added: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml (rev 0)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm.jpdl.hbm.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping default-access="field">
+
+ <subclass name="org.jbpm.jpdl.internal.model.JpdlExecution"
+ extends="org.jbpm.pvm.internal.model.ExecutionImpl"
+ discriminator-value="jpdl">
+
+ <map name="swimlanes"
+ cascade="all-delete-orphan">
+ <key foreign-key="FK_SWIMLANE_EXEC">
+ <column name="EXECUTION_" index="IDX_SWIMLANE_EXEC"/>
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.task.SwimlaneImpl" />
+ </map>
+ </subclass>
+
+</hibernate-mapping>
\ No newline at end of file
Modified: jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -19,7 +19,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -31,12 +31,12 @@
import org.jbpm.api.Execution;
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.env.Environment;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.task.Task;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
-import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
import org.jbpm.pvm.internal.job.JobImpl;
@@ -267,9 +267,6 @@
log.debug("deleting process instance "+processInstanceId);
}
- // process language specific delete operations
- processInstance.deleting();
-
session.delete(processInstance);
}
}
@@ -288,7 +285,7 @@
Query query = session.createQuery(
"select job " +
"from "+JobImpl.class.getName()+" as job " +
- "where job.execution.processInstance.id = :processInstanceId"
+ "where job.processInstance.id = :processInstanceId"
);
query.setString("processInstanceId", processInstanceId);
return query.list();
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/DefaultIdGenerator.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -24,8 +24,8 @@
import org.hibernate.Session;
import org.jbpm.api.Execution;
import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.env.Environment;
/**
@@ -37,6 +37,22 @@
public String createId(ProcessDefinition processDefinition, Execution parent, ExecutionImpl execution) {
+ Session session = Environment.getFromCurrent(Session.class);
+ session.save(execution);
+ // the next flush is introduced because of the following situation:
+ // for hsqldb: id generation is done by inserting and then reading the id value
+ // for db's that have separate id generators (postgres, oracle, mysql), the previous
+ // save will only make hibernate generate a new id, but the insert is not yet done
+ // Then the following scenario might happen:
+ // * the new execution is added to collection of the parent execution
+ // * the parent execution ends, causing the new child to be removed from the collection
+ // * the child executions collection's cascade is set to all-delete-orphan so
+ // we expect hibernate to delete it
+ // * for some reason, then hibernate gets confused and still inserts the
+ // execution afterwards.
+ session.flush();
+
+
String base = null;
if (parent!=null) {
base = parent.getId();
@@ -53,8 +69,7 @@
executionPart = execution.getKey();
} else {
- Session session = Environment.getFromCurrent(Session.class);
- session.save(execution);
+
executionPart = Long.toString(execution.getDbid());
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -34,10 +34,13 @@
import java.util.Map;
import java.util.Queue;
import java.util.Set;
+import java.util.StringTokenizer;
import org.jbpm.api.Execution;
import org.jbpm.api.JbpmException;
import org.jbpm.api.activity.ActivityExecution;
+import org.jbpm.api.env.Context;
+import org.jbpm.api.env.Environment;
import org.jbpm.api.job.Job;
import org.jbpm.api.job.Timer;
import org.jbpm.api.listener.EventListenerExecution;
@@ -47,11 +50,11 @@
import org.jbpm.api.model.ObservableElement;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.model.Transition;
+import org.jbpm.api.task.Assignable;
+import org.jbpm.api.task.AssignmentHandler;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.client.ClientProcessInstance;
-import org.jbpm.pvm.internal.env.Context;
-import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.HistorySession;
@@ -66,13 +69,22 @@
import org.jbpm.pvm.internal.model.op.AtomicOperation;
import org.jbpm.pvm.internal.model.op.MoveToChildActivity;
import org.jbpm.pvm.internal.model.op.Signal;
+import org.jbpm.pvm.internal.script.ScriptManager;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.session.MessageSession;
import org.jbpm.pvm.internal.session.RepositorySession;
import org.jbpm.pvm.internal.session.TimerSession;
+import org.jbpm.pvm.internal.task.AssignableDefinitionImpl;
+import org.jbpm.pvm.internal.task.ParticipationImpl;
+import org.jbpm.pvm.internal.task.SwimlaneDefinitionImpl;
+import org.jbpm.pvm.internal.task.SwimlaneImpl;
+import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
+import org.jbpm.pvm.internal.task.TaskImpl;
import org.jbpm.pvm.internal.type.Variable;
import org.jbpm.pvm.internal.util.EqualsUtil;
import org.jbpm.pvm.internal.util.Priority;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.WireContext;
/**
* @author Tom Baeyens
@@ -85,7 +97,7 @@
private static final long serialVersionUID = 1L;
- private static final Log log = Log.getLog(Execution.class.getName());
+ private static final Log log = Log.getLog(ExecutionImpl.class.getName());
/** an optional name for this execution. can be used to
* differentiate concurrent paths of execution like e.g.
@@ -112,7 +124,10 @@
/** the sub process link in case of sub process execution */
protected ExecutionImpl subProcessInstance;
-
+
+ /** swimlanes */
+ protected Map<String, SwimlaneImpl> swimlanes;
+
/** the free text comments users make on this execution */
protected Set<CommentImpl> comments;
@@ -295,8 +310,8 @@
// basic object methods /////////////////////////////////////////////////////
public String toString() {
- if (name!=null) {
- return "execution["+name+"]";
+ if (getId()!=null) {
+ return "execution["+id+"]";
}
if (parent==null) {
return "process-instance";
@@ -693,6 +708,153 @@
ExceptionHandlerImpl.rethrow(exception, rethrowMessage+": "+exception.getMessage());
}
+
+ // tasks ////////////////////////////////////////////////////////////////////
+
+ public TaskImpl createTask(TaskDefinitionImpl taskDefinition) {
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+ TaskImpl task = (TaskImpl) dbSession.createTask();
+ task.setTaskDefinition(taskDefinition);
+ task.setExecution(this);
+ task.setProcessInstance(processInstance);
+ task.setSignalling(true);
+
+ // initialize the name
+ if (taskDefinition.getName()!=null) {
+ task.setName(taskDefinition.getName());
+ } else {
+ task.setName(getActivityName());
+ }
+
+ task.setDescription(taskDefinition.getDescription());
+ task.setPriority(taskDefinition.getPriority());
+ task.setForm(taskDefinition.getForm());
+
+ // save task so that TaskDbSession.findTaskByExecution works for assign event listeners
+ dbSession.saveTask(task);
+
+ SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
+ if (swimlaneDefinition!=null) {
+ SwimlaneImpl swimlane = getInitializedSwimlane(swimlaneDefinition);
+ task.setSwimlane(swimlane);
+
+ // copy the swimlane assignments to the task
+ task.setAssignee(swimlane.getAssignee());
+ for (ParticipationImpl participant: swimlane.getParticipations()) {
+ task.addParticipation(participant.getUserId(), participant.getGroupId(), participant.getType());
+ }
+ }
+
+ initializeAssignments(taskDefinition, task);
+
+ return task;
+ }
+
+ /** tasks and swimlane assignment.
+ * SwimlaneDefinitionImpl is base class for TaskDefinitionImpl.
+ * Both Task and Swimlane implement Assignable. */
+ public void initializeAssignments(AssignableDefinitionImpl assignableDefinition, Assignable assignable) {
+ String assigneeExpression = assignableDefinition.getAssigneeExpression();
+ if (assigneeExpression!=null) {
+ String assignee = resolveAssignmentExpression(assigneeExpression,
+ assignableDefinition.getAssigneeExpressionLanguage());
+ assignable.setAssignee(assignee);
+
+ if (log.isTraceEnabled()) log.trace("task "+name+" assigned to "+assignee+" using expression "+assigneeExpression);
+ }
+
+ String candidateUsersExpression = assignableDefinition.getCandidateUsersExpression();
+ if (candidateUsersExpression!=null) {
+ String candidateUsers =
+ resolveAssignmentExpression(candidateUsersExpression,
+ assignableDefinition.getCandidateUsersExpressionLanguage());
+ StringTokenizer tokenizer = new StringTokenizer(candidateUsers, ",");
+ while (tokenizer.hasMoreTokens()) {
+ String candidateUser = tokenizer.nextToken().trim();
+ assignable.addCandidateUser(candidateUser);
+ }
+ }
+
+ String candidateGroupsExpression = assignableDefinition.getCandidateGroupsExpression();
+ if (candidateGroupsExpression!=null) {
+ String candidateGroups =
+ resolveAssignmentExpression(candidateGroupsExpression,
+ assignableDefinition.getCandidateGroupsExpressionLanguage());
+ StringTokenizer tokenizer = new StringTokenizer(candidateGroups, ",");
+ while (tokenizer.hasMoreTokens()) {
+ String candidateGroup = tokenizer.nextToken();
+ assignable.addCandidateGroup(candidateGroup);
+ }
+ }
+
+ Descriptor assignmentHandlerDescriptor = assignableDefinition.getAssignmentHandlerDescriptor();
+ if (assignmentHandlerDescriptor!=null) {
+ AssignmentHandler assignmentHandler = (AssignmentHandler) WireContext.create(assignmentHandlerDescriptor);
+ try {
+ assignmentHandler.assign(assignable, this);
+ } catch (Exception e) {
+ throw new JbpmException("assignment handler threw exception: "+e, e);
+ }
+ }
+ }
+
+ protected String resolveAssignmentExpression(String expression, String expressionLanguage) {
+ ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
+ Object result = scriptManager.evaluateExpression(expression, expressionLanguage);
+ if ( (result ==null)
+ || (result instanceof String)
+ ) {
+ return (String) result;
+ }
+ throw new JbpmException("result of assignment expression "+expression+" is "+result+" ("+result.getClass().getName()+") instead of String");
+ }
+
+ // swimlanes ////////////////////////////////////////////////////////////////
+
+ public void addSwimlane(SwimlaneImpl swimlane) {
+ if (swimlanes==null) {
+ swimlanes = new HashMap<String, SwimlaneImpl>();
+ }
+ swimlanes.put(swimlane.getName(), swimlane);
+ swimlane.setExecution(this);
+ }
+
+ public SwimlaneImpl getSwimlane(String swimlaneName) {
+ if (swimlanes==null) {
+ return null;
+ }
+ return swimlanes.get(swimlaneName);
+ }
+
+ public void removeSwimlane(SwimlaneImpl swimlane) {
+ swimlanes.remove(swimlane.getName());
+ swimlane.setExecution(null);
+ }
+
+ public SwimlaneImpl getInitializedSwimlane(SwimlaneDefinitionImpl swimlaneDefinition) {
+ String swimlaneName = swimlaneDefinition.getName();
+
+ if (swimlanes==null) {
+ swimlanes = new HashMap<String, SwimlaneImpl>();
+ }
+
+ SwimlaneImpl swimlane = swimlanes.get(swimlaneName);
+ if (swimlane==null) {
+ swimlane = createSwimlane(swimlaneName);
+ initializeAssignments(swimlaneDefinition, swimlane);
+ }
+
+ return swimlane;
+ }
+
+ public SwimlaneImpl createSwimlane(String swimlaneName) {
+ SwimlaneImpl swimlane = new SwimlaneImpl();
+ swimlane.setName(swimlaneName);
+ swimlane.setExecution(this);
+ swimlanes.put(swimlaneName, swimlane);
+ return swimlane;
+ }
+
// comments /////////////////////////////////////////////////////////////////
public Comment createComment(String message) {
@@ -736,14 +898,15 @@
childExecution.setProcessDefinition(getProcessDefinition());
childExecution.processInstance = this.processInstance;
childExecution.name = name;
- log.debug("creating "+childExecution);
// id generation (after initialization)
IdGenerator keyGenerator = Environment.getFromCurrent(IdGenerator.class, false);
if (keyGenerator!=null) {
childExecution.id = keyGenerator.createId(getProcessDefinition(), this, childExecution);
}
-
+
+ log.debug("created "+childExecution);
+
return childExecution;
}
@@ -751,13 +914,12 @@
return new ExecutionImpl();
}
- public void addExecution(Execution execution) {
- ExecutionImpl executionImpl = (ExecutionImpl) execution;
- executionImpl.parent = this;
+ public void addExecution(ExecutionImpl execution) {
+ execution.setParent(this);
if (executions==null) {
executions = new ArrayList<ExecutionImpl>();
}
- executions.add(executionImpl);
+ executions.add(execution);
executionsMap = null;
}
@@ -1027,22 +1189,6 @@
fireHistoryEvent(new ActivityEnd(transitionName));
}
-
- // extensions ///////////////////////////////////////////////////////////////
-
- public <T> T getExtension(Class<T> extensionClass) {
- if (extensionClass==null) {
- throw new JbpmException("extensionClass is null. and this execution doesn't support extensions");
- }
- throw new JbpmException("unsupported extension "+extensionClass.getName());
- }
-
- /** notification of this execution being deleted. this allows for
- * specific process lanugage executions to remove all the pointers
- * to this execution */
- public void deleting() {
- }
-
// equals ///////////////////////////////////////////////////////////////////
// hack to support comparing hibernate proxies against the real objects
// since this always falls back to ==, we don't need to overwrite the hashcode
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -67,6 +67,15 @@
<list-index column="PARENT_IDX_" />
<one-to-many class="ExecutionImpl" />
</list>
+
+ <map name="swimlanes"
+ cascade="all-delete-orphan">
+ <key foreign-key="FK_SWIMLANE_EXEC">
+ <column name="EXECUTION_" index="IDX_SWIMLANE_EXEC"/>
+ </key>
+ <map-key type="string" column="NAME_" />
+ <one-to-many class="org.jbpm.pvm.internal.task.SwimlaneImpl" />
+ </map>
<many-to-one name="parent"
column="PARENT_"
Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -105,19 +105,23 @@
repositoryService.deleteDeploymentCascade(deploymentDbid);
}
+ String errorMsg = null;
String recordsLeftMsg = Db.verifyClean(processEngine);
if ( (recordsLeftMsg!=null)
&& (recordsLeftMsg.length()>0)
) {
- String message = "database was not clean after test: "+recordsLeftMsg;
+ errorMsg = "database was not clean after test: "+recordsLeftMsg;
+ }
+
+ super.tearDown();
+
+ if (errorMsg!=null) {
if (exception==null) {
- throw new JbpmException(message);
+ throw new JbpmException(errorMsg);
} else {
- throw new JbpmException(message, exception);
+ throw new JbpmException(errorMsg, exception);
}
}
-
- super.tearDown();
}
// deployment helper methods ////////////////////////////////////////////////
Modified: jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-concurrent/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -39,8 +39,7 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
- <mapping resource="jbpm.identity.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
</hibernate-configuration>
Modified: jbpm4/trunk/modules/test-db/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-db/pom.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-db/pom.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -120,16 +120,27 @@
<filtersfile file="target/test-classes/jdbc.properties" />
</filterset>
</copy>
- <replace file="target/test-classes/jbpm.hibernate.cfg.xml">
+ <!-- replace file="target/test-classes/jbpm.hibernate.cfg.xml">
<replacetoken><![CDATA[<property name="hibernate.format_sql">true</property>]]></replacetoken>
<replacevalue><![CDATA[<property name="hibernate.format_sql">true</property>
<property name="hibernate.hbm2ddl.auto">create-drop</property>]]></replacevalue>
- </replace>
+ </replace -->
</tasks>
</configuration>
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <failIfNoTests>false</failIfNoTests>
+ <trimStackTrace>false</trimStackTrace>
+ <excludes>
+ <!-- doesn't run for the moment -->
+ <exclude>reporting/SQLStmtTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
@@ -195,12 +206,7 @@
<failIfNoTests>false</failIfNoTests>
<trimStackTrace>false</trimStackTrace>
<excludes>
- <!-- JBPM-2354 following tests need to be fixed: -->
- <exclude>org/jbpm/test/activities/ForkJoinInSameTransactionTest.java</exclude>
- <exclude>org/jbpm/test/execution/ConcurrentEndTest.java</exclude>
- <exclude>org/jbpm/test/async/AsyncEndCombinationTest.java</exclude>
-
- <!-- i don't think the following test should be part of the integration test suite -->
+ <!-- doesn't run for the moment -->
<exclude>reporting/SQLStmtTest.java</exclude>
</excludes>
</configuration>
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -24,6 +24,7 @@
import java.util.List;
import org.jbpm.api.task.Task;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.test.JbpmTestCase;
@@ -89,22 +90,20 @@
" <end-cancel g='600,372,48,48' name='rejected1'/>" +
"</process>"
);
-
+
String processInstanceId = executionService.startProcessInstanceByKey("forkTest").getId();
List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstanceId).list();
assertEquals(3, tasks.size());
final String requester = "requester";
List<Task> tasksForRequester = taskService.findGroupTasks(requester);
- assertEquals(2, tasksForRequester.size());;
+ assertEquals(2, tasksForRequester.size());
// Uncomment these lines to make the test fail
- /*
for (Task task : tasksForRequester) {
taskService.takeTask(task.getDbid(), requester);
taskService.completeTask(task.getDbid(), "Approve");
}
- */
// Adding a state after joing and executing these lines works ...
//String id = executionService.findExecutionById(processInstanceId).findActiveExecutionIn("test").getId();
Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StatesJoinEndTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StatesJoinEndTest.java (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StatesJoinEndTest.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.activities;
+
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class StatesJoinEndTest extends JbpmTestCase {
+
+ public void testStatesJoinEnd() {
+ deployJpdlXmlString(
+ "<process name='StatesJoinEnd'>" +
+ " <start>" +
+ " <transition to='theFork' />" +
+ " </start>" +
+ " <fork name='theFork'>" +
+ " <transition to='stateOne' />" +
+ " <transition to='stateTwo' />" +
+ " </fork>" +
+ " <state name='stateOne'>" +
+ " <transition to='theJoin' />" +
+ " </state> " +
+ " <state name='stateTwo'>" +
+ " <transition to='theJoin' />" +
+ " </state> " +
+ " <join name='theJoin'>" +
+ " <transition to='end' />" +
+ " </join>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("StatesJoinEnd");
+
+ String executionOneId = processInstance.findActiveExecutionIn("stateOne").getId();
+ executionService.signalExecutionById(executionOneId);
+
+ String executionTwoId = processInstance.findActiveExecutionIn("stateTwo").getId();
+ processInstance = executionService.signalExecutionById(executionTwoId);
+
+ assertTrue(processInstance.isEnded());
+ }
+
+}
Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StatesJoinEndTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/TasksJoinEndTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/TasksJoinEndTest.java (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/TasksJoinEndTest.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.activities;
+
+import java.util.List;
+
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.task.Task;
+import org.jbpm.internal.log.Log;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TasksJoinEndTest extends JbpmTestCase {
+
+ private static Log log = Log.getLog(TasksJoinEndTest.class.getName());
+
+
+ public void testTasksJoinEnd() {
+ log.debug("");
+ log.debug("");
+ log.debug("### DEPLOYING PROCESS DEFINITION ######################################");
+ log.debug("");
+ log.debug("");
+
+ deployJpdlXmlString(
+ "<process name='TasksJoinEnd'>" +
+ " <start>" +
+ " <transition to='theFork' />" +
+ " </start>" +
+ " <fork name='theFork'>" +
+ " <transition to='taskOne' />" +
+ " <transition to='taskTwo' />" +
+ " <transition to='extraState' />" +
+ " </fork>" +
+ " <task name='taskOne'>" +
+ " <transition to='theJoin' />" +
+ " </task> " +
+ " <task name='taskTwo'>" +
+ " <transition to='theJoin' />" +
+ " </task> " +
+ " <state name='extraState' />" +
+ " <join name='theJoin'>" +
+ " <transition to='end' />" +
+ " </join>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ log.debug("");
+ log.debug("");
+ log.debug("### STARTING PROCESS INSTANCE ######################################");
+ log.debug("");
+ log.debug("");
+
+ executionService.startProcessInstanceByKey("TasksJoinEnd");
+
+ List<Task> tasks = taskService.createTaskQuery().list();
+
+ log.debug("");
+ log.debug("");
+ log.debug("### COMPLETING TASK ONE ######################################");
+ log.debug("");
+ log.debug("");
+
+ taskService.completeTask(tasks.get(0).getDbid());
+
+ log.debug("");
+ log.debug("");
+ log.debug("### COMPLETING TASK TWO ######################################");
+ log.debug("");
+ log.debug("");
+
+ taskService.completeTask(tasks.get(1).getDbid());
+ }
+}
Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/TasksJoinEndTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/async/AsyncBasicsTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/async/AsyncBasicsTest.java 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/async/AsyncBasicsTest.java 2009-06-24 16:06:06 UTC (rev 5104)
@@ -184,7 +184,8 @@
executionService.signalExecutionById(processInstance.getId());
fail("expected exception");
} catch (Exception e) {
- assertTextPresent("process-instance is not active: async", e.getMessage());
+ assertTextPresent("execution", e.getMessage());
+ assertTextPresent("is not active: async", e.getMessage());
}
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -19,7 +19,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
Modified: jbpm4/trunk/modules/test-load/src/test/resources/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 12:38:25 UTC (rev 5103)
+++ jbpm4/trunk/modules/test-load/src/test/resources/jbpm.hibernate.cfg.xml 2009-06-24 16:06:06 UTC (rev 5104)
@@ -19,7 +19,6 @@
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
- <mapping resource="jbpm.jpdl.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
<mapping resource="jbpm.load.hbm.xml" />
Added: jbpm4/trunk/qa/hudson-jbpm4-db.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-db.sh (rev 0)
+++ jbpm4/trunk/qa/hudson-jbpm4-db.sh 2009-06-24 16:06:06 UTC (rev 5104)
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+# runs the smoke test suite
+
+mvn -U -Ddatabase=$DATABASE clean install
More information about the jbpm-commits
mailing list