[jbpm-commits] JBoss JBPM SVN: r4346 - in jbpm3/branches/jbpm-3.2.5.SP: modules/core/src/main/java/org/jbpm/graph/node and 3 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Mar 28 13:58:27 EDT 2009


Author: alex.guizar at jboss.com
Date: 2009-03-28 13:58:26 -0400 (Sat, 28 Mar 2009)
New Revision: 4346

Added:
   jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml
Removed:
   jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd
Modified:
   jbpm3/branches/jbpm-3.2.5.SP/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml
   jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/java/org/jbpm/graph/node/Join.java
   jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml
   jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java
Log:
JBPM-2121: revert addition of PARENTLOCKMODE_ column
merge r4320:4345 from branch jbpm-3.2.5.SP4_JBPM-2121

Modified: jbpm3/branches/jbpm-3.2.5.SP/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml	2009-03-28 13:46:48 UTC (rev 4345)
+++ jbpm3/branches/jbpm-3.2.5.SP/hudson/hudson-home/jobs/jBPM3-Container-Matrix/config.xml	2009-03-28 17:58:26 UTC (rev 4346)
@@ -34,7 +34,6 @@
     <axis>
       <name>container</name>
       <values>
-        <string>jboss422</string>
         <string>jboss423</string>
         <string>jboss500</string>
       </values>
@@ -42,8 +41,8 @@
     <axis>
       <name>database</name>
       <values>
-        <string>hsqldb</string>
-        <string>mysql</string>
+        <string>postgresql</string>
+        <string>sybase</string>
       </values>
     </axis>
     <axis>

Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/java/org/jbpm/graph/node/Join.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/java/org/jbpm/graph/node/Join.java	2009-03-28 13:46:48 UTC (rev 4345)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/java/org/jbpm/graph/node/Join.java	2009-03-28 17:58:26 UTC (rev 4346)
@@ -42,13 +42,13 @@
   private static final long serialVersionUID = 1L;
   
   /** 
-   * specifies wether what type of hibernate lock should be acquired.
+   * specifies what type of hibernate lock should be acquired.
    * null value defaults to LockMode.UPGRADE 
    */ 
   String parentLockMode;
 
   /**
-   * specifies if this joinhandler is a discriminator.
+   * specifies if this join is a discriminator.
    * a descriminator reactivates the parent when the first 
    * concurrent token enters the join. 
    */

Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml	2009-03-28 13:46:48 UTC (rev 4345)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.hbm.xml	2009-03-28 17:58:26 UTC (rev 4346)
@@ -6,8 +6,6 @@
 <hibernate-mapping auto-import="false" default-access="field" >
 
   <subclass name="org.jbpm.graph.node.Join" discriminator-value="J"
-  	extends="org.jbpm.graph.def.Node">
-  	<property name="parentLockMode" column="PARENTLOCKMODE_"/>
-  </subclass>
+  	extends="org.jbpm.graph.def.Node" />
 
 </hibernate-mapping>

Copied: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml (from rev 4345, jbpm3/branches/jbpm-3.2.5.SP4_JBPM-2121/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml)
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/graph/node/Join.lock.hbm.xml	2009-03-28 17:58:26 UTC (rev 4346)
@@ -0,0 +1,13 @@
+<?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 auto-import="false" default-access="field" >
+
+  <subclass name="org.jbpm.graph.node.Join" discriminator-value="J"
+    extends="org.jbpm.graph.def.Node">
+    <property name="parentLockMode" column="PARENTLOCKMODE_"/>
+  </subclass>
+
+</hibernate-mapping>

Deleted: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd	2009-03-28 13:46:48 UTC (rev 4345)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/main/resources/org/jbpm/jpdl/xml/jpdl-3.3.xsd	2009-03-28 17:58:26 UTC (rev 4346)
@@ -1,511 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xs:schema targetNamespace="urn:jbpm.org:jpdl-3.3"
-           elementFormDefault="qualified"
-           xmlns="urn:jbpm.org:jpdl-3.3"
-           xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
-  <!--  PROCESS-DEFINITION -->
-  <!--  ################## -->
-  <xs:element name="process-definition">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="swimlane" />
-        <xs:element ref="start-state" />
-        <xs:group   ref="node-elements"/>
-        <xs:group   ref="action-elements" />
-        <xs:element ref="event" />
-        <xs:element ref="exception-handler" />
-        <xs:element ref="task" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required" />
-    </xs:complexType>
-  </xs:element>
-
-  <!--  SWIMLANE -->
-  <!--  ######## -->
-  <xs:element name="swimlane">
-    <xs:complexType>
-      <xs:sequence minOccurs="0" maxOccurs="1">
-        <xs:element ref="assignment"/>
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" use="required" />
-    </xs:complexType>
-  </xs:element>
-
-  <!--  NODES -->
-  <!--  ##### -->
-  <xs:element name="start-state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="task"/>
-        <xs:element ref="transition"/>
-        <xs:element ref="event"/>
-        <xs:element ref="exception-handler"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="end-state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="event"/>
-        <xs:element ref="exception-handler"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="end-complete-process" type="booleanType" use="optional" default="false"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="decision">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element name="handler" type="delegation" />
-        <xs:element ref="event"/>
-        <xs:element ref="exception-handler"/>
-        <xs:element ref="transition"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="expression" type="xs:string" />
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="fork">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="script" />
-        <xs:group ref="node-content-elements" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-  
-  <xs:element name="join">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="node-content-elements" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-      <xs:attribute name="lock" type="lockMode"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="node">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:choice minOccurs="0" maxOccurs="1">
-          <xs:group ref="action-elements" />
-        </xs:choice>
-        <xs:choice minOccurs="0" maxOccurs="unbounded">
-          <xs:group ref="node-content-elements" />
-        </xs:choice>
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="process-state">
-    <xs:complexType>
-    	<xs:choice minOccurs="0" maxOccurs="unbounded">
-    		<xs:element name="sub-process">
-    			<xs:complexType>
-    				<xs:attribute name="name" type="xs:string"
-    					use="required" />
-    				<xs:attribute name="version" type="xs:integer" />
-    				<xs:attribute name="binding" type="xs:string" />
-    			</xs:complexType>
-    		</xs:element>
-    		<xs:element ref="variable" />
-    		<xs:group ref="node-content-elements" />
-    	</xs:choice>
-    	<xs:attribute name="name" type="xs:string" use="required" />
-    	<xs:attribute name="async" type="xs:string" default="false" />
-    	<xs:attribute name="binding" type="bindingType"/>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="node-content-elements"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="super-state">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="node-elements"/>
-        <xs:group ref="node-content-elements"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="task-node">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="task" />
-        <xs:group ref="node-content-elements" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="create-tasks" type="booleanType" default="true" />
-      <xs:attribute name="end-tasks" type="booleanType" default="false" />
-      <xs:attribute name="signal" default="last">
-        <xs:simpleType>
-          <xs:restriction base="xs:string">
-            <xs:enumeration value="unsynchronized"/>
-            <xs:enumeration value="never"/>
-            <xs:enumeration value="first"/>
-            <xs:enumeration value="first-wait"/>
-            <xs:enumeration value="last"/>
-            <xs:enumeration value="last-wait"/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:attribute>
-      <xs:attribute name="async" type="xs:string" default="false" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="mail-node">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="subject" />
-        <xs:element ref="text" />
-        <xs:group ref="node-content-elements"/>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-      <xs:attribute name="template" type="xs:string"/>
-      <xs:attribute name="actors" type="xs:string"/>
-      <xs:attribute name="to" type="xs:string"/>
-      <xs:attribute name="subject" type="xs:string"/>
-      <xs:attribute name="text" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-
-  <!--  TRANSITION -->
-  <!--  ########## -->
-  <xs:element name="transition">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-         <xs:element ref="description" />
-         <xs:element name="condition">
-           <xs:complexType mixed="true">
-             <xs:sequence minOccurs="0" maxOccurs="unbounded">
-               <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-             </xs:sequence>
-             <xs:attribute name="expression" type="xs:string" />
-           </xs:complexType>
-         </xs:element>
-        <xs:group ref="action-elements"/>
-        <xs:element ref="exception-handler" />
-      </xs:choice>
-      <xs:attribute name="to" type="xs:string" use="required" />
-      <xs:attribute name="name" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <!-- ACTIONS -->
-  <!-- ####### -->
-  <xs:element name="action">
-    <xs:complexType mixed="true">
-      <xs:sequence>
-        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-      </xs:sequence>
-      <xs:attribute name="class" type="xs:string" />
-      <xs:attribute name="config-type" default="field" type="xs:string" />
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="ref-name" type="xs:string" />
-      <xs:attribute name="accept-propagated-events" type="booleanType" default="true" />
-      <xs:attribute name="expression" type="xs:string" />
-      <xs:attribute name="async" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="cancel-timer">
-    <xs:complexType>
-      <xs:attribute name="name" type="xs:string" use="required" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="create-timer">
-    <xs:complexType>
-      <xs:choice  minOccurs="0">
-        <xs:element ref="action"/>
-        <xs:element ref="script"/>
-      </xs:choice>
-      <xs:attribute name="duedate" type="xs:string" use="required" />
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="repeat" type="xs:string" />
-      <xs:attribute name="transition" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="script">
-    <xs:complexType  mixed="true">
-      <xs:sequence>
-        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="accept-propagated-events" type="booleanType" default="true" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="mail">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="subject" />
-        <xs:element ref="text" />
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="async" type="xs:string" default="false" />
-      <xs:attribute name="template" type="xs:string"/>
-      <xs:attribute name="actors" type="xs:string"/>
-      <xs:attribute name="to" type="xs:string"/>
-      <xs:attribute name="subject" type="xs:string"/>
-      <xs:attribute name="text" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  EVENT -->
-  <!--  ##### -->
-  <xs:element name="event">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:group ref="action-elements"/>
-      </xs:choice>
-      <xs:attribute name="type" use="required">
-        <xs:simpleType>
-          <xs:union>
-            <xs:simpleType>
-              <xs:restriction base="xs:string"/>
-            </xs:simpleType>
-            <xs:simpleType>
-              <xs:restriction base="xs:string">
-                <xs:enumeration value="node-enter"/>
-                <xs:enumeration value="node-leave"/>
-                <xs:enumeration value="process-start"/>
-                <xs:enumeration value="process-end"/>
-                <xs:enumeration value="task-create"/>
-                <xs:enumeration value="task-assign"/>
-                <xs:enumeration value="task-start"/>
-                <xs:enumeration value="task-end"/>
-                <xs:enumeration value="before-signal"/>
-                <xs:enumeration value="after-signal"/>
-                <xs:enumeration value="superstate-enter"/>
-                <xs:enumeration value="superstate-leave"/>
-                <xs:enumeration value="timer-create"/>
-                <xs:enumeration value="subprocess-created"/>
-                <xs:enumeration value="subprocess-end"/>
-              </xs:restriction>
-            </xs:simpleType>
-          </xs:union>
-        </xs:simpleType>
-      </xs:attribute>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  EXCEPTION-HANDLER -->
-  <!--  ################# -->
-  <xs:element name="exception-handler">
-    <xs:complexType>
-      <xs:choice minOccurs="1" maxOccurs="unbounded">
-        <xs:element ref="action"/>
-        <xs:element ref="script"/>
-      </xs:choice>
-      <xs:attribute name="exception-class" type="xs:string"/>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  TASK -->
-  <!--  #### -->
-  <xs:element name="task">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="description" />
-        <xs:element ref="assignment"/>
-        <xs:element ref="controller"/>
-        <xs:element ref="event"/>
-        <xs:element ref="timer"/>
-        <xs:element name="reminder">
-          <xs:complexType>
-            <xs:attribute name="duedate" type="xs:string" use="required" />
-            <xs:attribute name="repeat" type="xs:string" />
-          </xs:complexType>
-        </xs:element>
-      </xs:choice>
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="blocking" type="booleanType" default="false"/>
-      <xs:attribute name="signalling" type="booleanType" default="true"/>
-      <xs:attribute name="description" type="xs:string" />
-      <xs:attribute name="duedate" type="xs:string" />
-      <xs:attribute name="swimlane" type="xs:string" />
-      <xs:attribute name="priority" type="priorityType" default="normal" />
-      <xs:attribute name="notify" type="booleanType" default="false"/>
-    </xs:complexType>
-  </xs:element>
-  
-  <xs:element name="controller" type="delegation" />
-
-  <xs:element name="assignment">
-    <xs:complexType>
-      <xs:complexContent>
-        <xs:extension base="delegation">
-          <xs:attribute name="expression" type="xs:string" />
-          <xs:attribute name="actor-id" type="xs:string" />
-          <xs:attribute name="pooled-actors" type="xs:string" />
-        </xs:extension>
-      </xs:complexContent>
-    </xs:complexType>
-  </xs:element>
-
-  <!--  TIMER -->
-  <!--  ##### -->
-  <xs:element name="timer">
-    <xs:complexType>
-      <xs:choice minOccurs="0" maxOccurs="1">
-        <xs:group ref="action-elements" />
-      </xs:choice>
-      <xs:attribute name="duedate" type="xs:string" use="required" />
-      <xs:attribute name="name" type="xs:string" />
-      <xs:attribute name="repeat" type="xs:string" />
-      <xs:attribute name="transition" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="variable">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-      </xs:sequence>
-      <xs:attribute name="name" type="xs:string" use="required"/>
-      <xs:attribute name="access" type="xs:string" default="read,write"/>
-      <xs:attribute name="mapped-name" type="xs:string" />
-    </xs:complexType>
-  </xs:element>
-
-  <!--  MAIL  -->
-  <!--  #### -->
-  <xs:element name="to" type="xs:string"/>
-  <xs:element name="recipients" type="xs:string"/>
-  <xs:element name="subject" type="xs:string"/>
-  <xs:element name="text" type="xs:string"/>
-  <xs:element name="template" type="xs:string"/>
-
-  <!-- TYPES AND GROUPS -->
-  <!-- ################ -->
-
-  <xs:element name="description" type="xs:string" />
-
-  <xs:complexType name="delegation" mixed="true">
-    <xs:sequence>
-      <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
-    </xs:sequence>
-    <xs:attribute name="class" type="xs:string" />
-    <xs:attribute name="config-type" default="field" type="xs:string" />
-  </xs:complexType>
-
-  <xs:simpleType name="configType">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="field"/>
-      <xs:enumeration value="bean"/>
-      <xs:enumeration value="constructor"/>
-      <xs:enumeration value="configuration-property"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="booleanType">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="yes"/>
-      <xs:enumeration value="no"/>
-      <xs:enumeration value="true"/>
-      <xs:enumeration value="false"/>
-      <xs:enumeration value="on"/>
-      <xs:enumeration value="off"/>
-    </xs:restriction>
-  </xs:simpleType>
-  
-  <xs:simpleType name="priorityType">
-    <xs:union>
-      <xs:simpleType>
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="highest"/>
-          <xs:enumeration value="high"/>
-          <xs:enumeration value="normal"/>
-          <xs:enumeration value="low"/>
-          <xs:enumeration value="lowest"/>
-        </xs:restriction>
-      </xs:simpleType>
-      <xs:simpleType>
-        <xs:restriction base="xs:int"/>
-      </xs:simpleType>
-    </xs:union>
-  </xs:simpleType>
-
-  <xs:group name="node-elements">
-    <xs:choice>
-      <xs:element ref="node"/>
-      <xs:element ref="state"/>
-      <xs:element ref="task-node"/>
-      <xs:element ref="super-state"/>
-      <xs:element ref="process-state"/>
-      <xs:element ref="fork"/>
-      <xs:element ref="join"/>
-      <xs:element ref="decision"/>
-      <xs:element ref="end-state"/>
-      <xs:element ref="mail-node"/>
-    </xs:choice>
-  </xs:group>
-  
-  <xs:group name="action-elements">
-    <xs:choice>
-      <xs:element ref="action"/>
-      <xs:element ref="script"/>
-      <xs:element ref="create-timer"/>
-      <xs:element ref="cancel-timer"/>
-      <xs:element ref="mail"/>
-    </xs:choice>
-  </xs:group>
-  
-  <xs:group name="node-content-elements">
-    <xs:choice>
-      <xs:element ref="description" />
-      <xs:element ref="event"/>
-      <xs:element ref="exception-handler"/>
-      <xs:element ref="timer"/>
-      <xs:element ref="transition"/>
-    </xs:choice>
-  </xs:group>
-
-  <xs:simpleType name="bindingType">
-    <xs:restriction base="xs:string">
-  	  <xs:enumeration value="late"/>
-  	  <xs:enumeration value="early"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="lockMode">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="NONE"/>
-      <xs:enumeration value="READ"/>
-      <xs:enumeration value="UPGRADE"/>
-      <xs:enumeration value="UPGRADE_NOWAIT"/>
-      <xs:enumeration value="FORCE"/>
-      <xs:enumeration value="pessimistic"/>
-    </xs:restriction>
-  </xs:simpleType>
-</xs:schema>

Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java	2009-03-28 13:46:48 UTC (rev 4345)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/graph/node/JoinDbTest.java	2009-03-28 17:58:26 UTC (rev 4346)
@@ -21,27 +21,87 @@
  */
 package org.jbpm.graph.node;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.regex.Pattern;
+
 import org.hibernate.LockMode;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmException;
 import org.jbpm.db.AbstractDbTestCase;
 import org.jbpm.graph.def.ProcessDefinition;
 
 /**
  * Verifies the join node can be persisted correctly.
+ * 
  * @author Alejandro Guizar
  */
 public class JoinDbTest extends AbstractDbTestCase {
 
+  @Override
+  protected JbpmConfiguration getJbpmConfiguration() {
+    if (jbpmConfiguration == null) {
+      URL cfgResource = getClass().getClassLoader().getResource("hibernate.cfg.xml");
+      try {
+        OutputStream outStream = new FileOutputStream(new File(cfgResource.toURI().resolve(
+            "hibernate.join.cfg.xml")));
+        sed("Join.hbm.xml", "Join.lock.hbm.xml", cfgResource.openStream(), outStream);
+        outStream.close();
+      }
+      catch (URISyntaxException e) {
+        throw new AssertionError(e);
+      }
+      catch (IOException e) {
+        throw new JbpmException("could not edit hibernate configuration", e);
+      }
+      jbpmConfiguration = JbpmConfiguration.parseXmlString("<jbpm-configuration>"
+          + "  <string name='resource.hibernate.cfg.xml' value='hibernate.join.cfg.xml' />"
+          + "</jbpm-configuration>");
+    }
+    return jbpmConfiguration;
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    super.tearDown();
+    jbpmConfiguration.close();
+  }
+
+  private static void sed(String target, String replacement, InputStream inStream,
+      OutputStream outStream) throws IOException {
+    BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
+    Writer writer = new OutputStreamWriter(outStream);
+    Pattern pattern = Pattern.compile(target, Pattern.LITERAL);
+    for (String inLine; (inLine = reader.readLine()) != null;) {
+      String outLine = pattern.matcher(inLine).replaceAll(replacement);
+      writer.write(outLine);
+      writer.write('\n');
+    }
+    reader.close();
+    writer.flush();
+  }
+
   public void testParentLockMode() {
-    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
-        "<process-definition name='" + getName() + "'>" +
-        "  <join name='read' lock='READ' />" +
-        "  <join name='nowait' lock='UPGRADE_NOWAIT' />" +
-        "  <join name='upgrade' lock='pessimistic' />" +
-        "</process-definition>");
+    ProcessDefinition processDefinition = ProcessDefinition
+        .parseXmlString("<process-definition name='"
+            + getName()
+            + "'>"
+            + "  <join name='read' lock='READ' />"
+            + "  <join name='nowait' lock='UPGRADE_NOWAIT' />"
+            + "  <join name='upgrade' lock='pessimistic' />"
+            + "</process-definition>");
     jbpmContext.deployProcessDefinition(processDefinition);
-    long processDefinitionId = processDefinition.getId();
+
     newTransaction();
-        
     try {
       processDefinition = graphSession.findLatestProcessDefinition(getName());
       Join join = (Join) processDefinition.getNode("read");
@@ -50,11 +110,9 @@
       assertEquals(LockMode.UPGRADE_NOWAIT.toString(), join.getParentLockMode());
       join = (Join) processDefinition.getNode("upgrade");
       assertEquals(LockMode.UPGRADE.toString(), join.getParentLockMode());
-
-    } finally {
-      newTransaction();
-      graphSession.deleteProcessDefinition(processDefinitionId);
     }
-
+    finally {
+      graphSession.deleteProcessDefinition(processDefinition.getId());
+    }
   }
 }




More information about the jbpm-commits mailing list