[jbpm-commits] JBoss JBPM SVN: r1627 - in api/trunk: docs/VioletUML and 10 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jul 14 11:16:28 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-07-14 11:16:28 -0400 (Mon, 14 Jul 2008)
New Revision: 1627

Added:
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java
Removed:
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java
Modified:
   api/trunk/.classpath
   api/trunk/docs/VioletUML/APIModel.class.violet
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExecutionHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Handler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalHandler.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessMarshaller.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessUnmarshaller.java
   api/trunk/modules/api/src/test/java/org/jboss/bpm/model/ProcessMarshallerTest.java
   api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/TaskA.java
   api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java
Log:
Seperate JAXB from Impl hirarchy

Modified: api/trunk/.classpath
===================================================================
--- api/trunk/.classpath	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/.classpath	2008-07-14 15:16:28 UTC (rev 1627)
@@ -2,6 +2,7 @@
 <classpath>
 	<classpathentry kind="src" output="modules/api/target/classes" path="modules/api/src/main/java"/>
 	<classpathentry kind="src" output="modules/api/target/test-classes" path="modules/api/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="modules/api/target/classes" path="modules/api/src/main/resources"/>
 	<classpathentry excluding="**" kind="src" output="modules/api/target/test-classes" path="modules/api/src/test/resources"/>
 	<classpathentry kind="src" output="modules/testsuite/target/test-classes" path="modules/testsuite/src/test/java"/>
 	<classpathentry excluding="**" kind="src" output="modules/testsuite/target/test-classes" path="modules/testsuite/src/test/resources"/>

Modified: api/trunk/docs/VioletUML/APIModel.class.violet
===================================================================
--- api/trunk/docs/VioletUML/APIModel.class.violet	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/docs/VioletUML/APIModel.class.violet	2008-07-14 15:16:28 UTC (rev 1627)
@@ -5,41 +5,6 @@
    <object id="ClassNode0" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
-      <string>ExecutionContext</string> 
-     </void> 
-    </void> 
-   </object> 
-   <object class="java.awt.geom.Point2D$Double"> 
-    <void method="setLocation"> 
-     <double>728.0</double> 
-     <double>18.0</double> 
-    </void> 
-   </object> 
-  </void> 
-  <void method="addNode"> 
-   <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> 
-    <void property="name"> 
-     <void property="text"> 
-      <string>Attachments</string> 
-     </void> 
-    </void> 
-   </object> 
-   <object class="java.awt.geom.Point2D$Double"> 
-    <void method="setLocation"> 
-     <double>736.0</double> 
-     <double>114.0</double> 
-    </void> 
-   </object> 
-  </void> 
-  <void method="addNode"> 
-   <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> 
-    <void property="methods"> 
-     <void property="text"> 
-      <string>execute</string> 
-     </void> 
-    </void> 
-    <void property="name"> 
-     <void property="text"> 
       <string>FlowObject</string> 
      </void> 
     </void> 
@@ -52,7 +17,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode1" class="com.horstmann.violet.ClassNode"> 
     <void property="methods"> 
      <void property="text"> 
       <string>startProcess</string> 
@@ -73,7 +38,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode2" class="com.horstmann.violet.ClassNode"> 
     <void property="methods"> 
      <void property="text"> 
       <string>execute</string> 
@@ -93,7 +58,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode3" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>outFlow</string> 
@@ -113,12 +78,12 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode4" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>name
-inFlows
-outFlows</string> 
+inFlow
+outFlow</string> 
      </void> 
     </void> 
     <void property="name"> 
@@ -135,7 +100,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode7" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode5" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>name
@@ -156,7 +121,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode8" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode6" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>name</string> 
@@ -176,7 +141,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode9" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode7" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>name
@@ -204,7 +169,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode10" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode8" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>parent
@@ -232,7 +197,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode11" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode9" class="com.horstmann.violet.ClassNode"> 
     <void property="attributes"> 
      <void property="text"> 
       <string>inFlow
@@ -258,29 +223,9 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode12" class="com.horstmann.violet.ClassNode"> 
-    <void property="attributes"> 
-     <void property="text"> 
-      <string>process</string> 
-     </void> 
-    </void> 
+   <object id="ClassNode10" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
-      <string>Token</string> 
-     </void> 
-    </void> 
-   </object> 
-   <object class="java.awt.geom.Point2D$Double"> 
-    <void method="setLocation"> 
-     <double>589.0</double> 
-     <double>15.0</double> 
-    </void> 
-   </object> 
-  </void> 
-  <void method="addNode"> 
-   <object id="ClassNode13" class="com.horstmann.violet.ClassNode"> 
-    <void property="name"> 
-     <void property="text"> 
       <string>ExclusiveGateway</string> 
      </void> 
     </void> 
@@ -293,7 +238,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode14" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode11" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
       <string>InclusiveGateway</string> 
@@ -308,7 +253,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode15" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode12" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
       <string>ComplexGateway</string> 
@@ -323,7 +268,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode16" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode13" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
       <string>ParallelGateway</string> 
@@ -338,7 +283,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode17" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode14" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
       <string>Result</string> 
@@ -353,7 +298,7 @@
    </object> 
   </void> 
   <void method="addNode"> 
-   <object id="ClassNode18" class="com.horstmann.violet.ClassNode"> 
+   <object id="ClassNode15" class="com.horstmann.violet.ClassNode"> 
     <void property="name"> 
      <void property="text"> 
       <string>Attachments</string> 
@@ -376,8 +321,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode5"/> 
-   <object idref="ClassNode4"/> 
+   <object idref="ClassNode3"/> 
+   <object idref="ClassNode2"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -388,8 +333,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode4"/> 
    <object idref="ClassNode2"/> 
+   <object idref="ClassNode0"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -400,8 +345,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode6"/> 
    <object idref="ClassNode4"/> 
+   <object idref="ClassNode2"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -412,19 +357,7 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode7"/> 
-   <object idref="ClassNode4"/> 
-  </void> 
-  <void method="connect"> 
-   <object class="com.horstmann.violet.ClassRelationshipEdge"> 
-    <void property="bentStyle"> 
-     <object class="com.horstmann.violet.BentStyle" field="VHV"/> 
-    </void> 
-    <void property="endArrowHead"> 
-     <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
-    </void> 
-   </object> 
-   <object idref="ClassNode9"/> 
+   <object idref="ClassNode5"/> 
    <object idref="ClassNode2"/> 
   </void> 
   <void method="connect"> 
@@ -436,8 +369,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode3"/> 
-   <object idref="ClassNode8"/> 
+   <object idref="ClassNode7"/> 
+   <object idref="ClassNode0"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -448,8 +381,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode10"/> 
-   <object idref="ClassNode3"/> 
+   <object idref="ClassNode1"/> 
+   <object idref="ClassNode6"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -460,32 +393,20 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode11"/> 
    <object idref="ClassNode8"/> 
+   <object idref="ClassNode1"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
     <void property="bentStyle"> 
-     <object class="com.horstmann.violet.BentStyle" field="HVH"/> 
-    </void> 
-    <void property="endArrowHead"> 
-     <object class="com.horstmann.violet.ArrowHead" field="V"/> 
-    </void> 
-   </object> 
-   <object idref="ClassNode12"/> 
-   <object idref="ClassNode0"/> 
-  </void> 
-  <void method="connect"> 
-   <object class="com.horstmann.violet.ClassRelationshipEdge"> 
-    <void property="bentStyle"> 
      <object class="com.horstmann.violet.BentStyle" field="VHV"/> 
     </void> 
     <void property="endArrowHead"> 
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode0"/> 
-   <object idref="ClassNode1"/> 
+   <object idref="ClassNode9"/> 
+   <object idref="ClassNode6"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -496,8 +417,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode13"/> 
-   <object idref="ClassNode9"/> 
+   <object idref="ClassNode10"/> 
+   <object idref="ClassNode7"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -508,8 +429,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode14"/> 
-   <object idref="ClassNode9"/> 
+   <object idref="ClassNode11"/> 
+   <object idref="ClassNode7"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -520,8 +441,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode15"/> 
-   <object idref="ClassNode9"/> 
+   <object idref="ClassNode12"/> 
+   <object idref="ClassNode7"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -532,20 +453,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode16"/> 
-   <object idref="ClassNode9"/> 
-  </void> 
-  <void method="connect"> 
-   <object class="com.horstmann.violet.ClassRelationshipEdge"> 
-    <void property="bentStyle"> 
-     <object class="com.horstmann.violet.BentStyle" field="HVH"/> 
-    </void> 
-    <void property="endArrowHead"> 
-     <object class="com.horstmann.violet.ArrowHead" field="V"/> 
-    </void> 
-   </object> 
+   <object idref="ClassNode13"/> 
    <object idref="ClassNode7"/> 
-   <object idref="ClassNode17"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -556,8 +465,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="V"/> 
     </void> 
    </object> 
-   <object idref="ClassNode2"/> 
-   <object idref="ClassNode12"/> 
+   <object idref="ClassNode5"/> 
+   <object idref="ClassNode14"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -568,8 +477,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="V"/> 
     </void> 
    </object> 
-   <object idref="ClassNode17"/> 
-   <object idref="ClassNode18"/> 
+   <object idref="ClassNode14"/> 
+   <object idref="ClassNode15"/> 
   </void> 
   <void method="connect"> 
    <object class="com.horstmann.violet.ClassRelationshipEdge"> 
@@ -580,8 +489,8 @@
      <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/> 
     </void> 
    </object> 
-   <object idref="ClassNode8"/> 
-   <object idref="ClassNode2"/> 
+   <object idref="ClassNode6"/> 
+   <object idref="ClassNode0"/> 
   </void> 
  </object> 
 </java> 

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ExecutionManager.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -29,10 +29,10 @@
 import org.jboss.bpm.model.ExecutionHandler;
 import org.jboss.bpm.model.FlowHandler;
 import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Process;
 import org.jboss.bpm.model.Result;
 import org.jboss.bpm.model.Signal;
 import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.internal.ProcessImpl;
 import org.jboss.bpm.runtime.Attachments;
 
 /**
@@ -57,7 +57,7 @@
    * @param att The Attachments in the ExecutionContext
    * @return The Future from which to obtain the process result
    */
-  public abstract Future<Result> startProcess(Process proc, Attachments att);
+  public abstract Future<Result> startProcess(ProcessImpl proc, Attachments att);
   
   /**
    * Locate the signal manager

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -35,6 +35,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.jboss.bpm.EngineShutdownException;
 import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.internal.ProcessImpl;
 import org.jboss.bpm.util.ProcessMarshaller;
 
 /**
@@ -148,16 +149,16 @@
   {
     // Only initialize if this has not already been done
     if (proc.getProcessState() == Process.ProcessState.CREATED)
-      proc.initialize();
+      ((ProcessImpl)proc).initialize();
     
     marshallProcess(proc);
-    return procs.add(proc);
+    return procs.add((ProcessImpl)proc);
   }
 
   /**
    * Remove a Process
    */
-  public void removeProcess(Process proc)
+  public void removeProcess(ProcessImpl proc)
   {
     procs.remove(proc.getName());
   }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -40,10 +40,14 @@
 import org.jboss.bpm.model.FlowObject;
 import org.jboss.bpm.model.Process;
 import org.jboss.bpm.model.Result;
-import org.jboss.bpm.model.SequenceFlow;
 import org.jboss.bpm.model.Signal;
 import org.jboss.bpm.model.SignalHandler;
 import org.jboss.bpm.model.StartEvent;
+import org.jboss.bpm.model.internal.ExecutionHandlerImpl;
+import org.jboss.bpm.model.internal.ProcessImpl;
+import org.jboss.bpm.model.internal.SequenceFlowImpl;
+import org.jboss.bpm.model.internal.StartEventImpl;
+import org.jboss.bpm.model.internal.jaxb.JAXBSequenceFlow;
 import org.jboss.bpm.runtime.Attachments;
 import org.jboss.bpm.runtime.Token;
 
@@ -64,13 +68,13 @@
   }
 
   @Override
-  public Future<Result> startProcess(Process proc, Attachments att)
+  public Future<Result> startProcess(ProcessImpl proc, Attachments att)
   {
     throwSignal(new Signal(proc, Signal.Type.ENTER_PROCESS));
     try
     {
       Token token = new Token(proc, att);
-      StartEvent start = proc.getStartEvent();
+      StartEventImpl start = proc.getStartEvent();
       token.addTailFlow(new InitialFlow(start));
 
       while (token.peekHeadFlow() != null)
@@ -112,10 +116,11 @@
   /** 
    * The initial flow 'to' the StartEvent
    */
-  class InitialFlow extends SequenceFlow
+  class InitialFlow extends SequenceFlowImpl
   {
     InitialFlow(StartEvent start)
     {
+      super(new JAXBSequenceFlow());
       setTarget(start);
     }
   }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/ProcessManagerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -33,8 +33,9 @@
 import org.jboss.bpm.InvalidProcessException;
 import org.jboss.bpm.client.ProcessEngine;
 import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.model.internal.ProcessImpl;
+import org.jboss.bpm.util.ProcessUnmarshaller;
 import org.jboss.bpm.model.Process;
-import org.jboss.bpm.util.ProcessUnmarshaller;
 
 /**
  * The process manager is the entry point to create, find and otherwise manage processes.

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,55 +1,6 @@
-/*
- * 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.jboss.bpm.model;
 
-import javax.xml.bind.annotation.XmlType;
-
-// $Id$
-
-/**
- * An activity is a generic term for work that a company or organization performs via business processes. 
- * An activity can be atomic or non-atomic (compound). 
- * The types of activities that are a part of a Process Model are: Process, Sub-Process, and Task. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="Activity")
-public abstract class Activity extends AbstractActivity implements NamedFlowObject
+public interface Activity extends FlowObject, NamedFlowObject
 {
-  /**
-   * Construct an anonymous Activity
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected Activity()
-  {
-  }
 
-  /**
-   * Construct a Activity with a given name
-   * Note, this MUST NOT leak into the public API.
-   */
-  public Activity(String name)
-  {
-    super(name);
-  }
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,150 +1,11 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
 
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.runtime.Attachments;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * As the name implies, the End Event indicates where a Process will end. 
- * 
- * In terms of Sequence Flow, the End Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flow. 
- * An End Event can have a specific Result that will appear as a marker within the center of the End Event shape. 
- * End Event Results are Message, Error, Compensation, Link, and Multiple.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="EndEvent")
-public class EndEvent extends AbstractEndEvent implements SingleInFlowSupport
+public interface EndEvent extends Event, NamedFlowObject, SingleInFlowSupport
 {
-  // provide logging
-  private static final Log log = LogFactory.getLog(EndEvent.class);
-  
-  private Result result;
-  private Flow inFlow;
-  
-  /**
-   * Construct an anonymous StartEvent. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected EndEvent()
-  {
-  }
-  
-  /**
-   * Construct an anonymous StartEvent. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected EndEvent(String name)
-  {
-    super(name);
-  }
-  
-  /**
-   * Get the out flow
-   */
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-  
-  /**
-   * Set the in flow
-   */
-  @XmlTransient
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-  
   /** 
    * Get the result 
    */
-  @XmlTransient
-  public Result getResult()
-  {
-    return result;
-  }
+  Result getResult();
 
-  @XmlTransient
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandler()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        log.debug("End reached in: " + getName());
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject end = this;
-    return new SignalHandler()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(end, Signal.Type.ENTER_END_EVENT);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(end, Signal.Type.EXIT_END_EVENT);
-      }
-    };
-  }
-
-  @XmlTransient
-  public ExecutionHandler getDefaultExecutionHandler()
-  {
-    return new ExecutionHandler()
-    {
-      @Override
-      public void execute(final Token token)
-      {
-        // Provide the result
-        result = new Result()
-        {
-          public Attachments getAttachments()
-          {
-            return token.getExecutionContext();
-          }
-        };
-      }
-    };
-  }
-  
-  public String toString()
-  {
-    return "EndEvent[" + getName() + "]";
-  }
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,45 +1,6 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * An Event is something that “happens” during the course of a business process. 
- * These Events affect the flow of the Process and usually have a cause or an impact.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="Event")
-public abstract class Event extends AbstractEvent implements Executable
+public interface Event extends FlowObject, Executable
 {
-  /**
-   * Construct an anonymous StartEvent. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected Event()
-  {
-  }
+
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExecutionHandler.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExecutionHandler.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExecutionHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,52 +1,12 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
 import org.jboss.bpm.runtime.Token;
 
-/**
- * Implement to make the FlowObject executable
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "ExecutionHandler")
-public class ExecutionHandler extends Handler
+public interface ExecutionHandler extends Handler
 {
-  private ExecutionHandler delegate;
-
   /**
    * Execute this flow object
    */
-  public void execute(Token token)
-  {
-    if (delegate == null)
-    {
-      delegate = newInstance(ExecutionHandler.class);
-    }
-    delegate.execute(token);
-  }
+  void execute(Token token);
+
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,99 +1,25 @@
-/*
- * 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.jboss.bpm.model;
 
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-
-
-// $Id$
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD. 
- * 
- * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. 
- * Flow is also used in a generic sense (and lowercase) to describe how Tokens will traverse 
- * Sequence Flow from the Start Event to an End Event. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="Flow")
-public abstract class Flow extends AbstractFlow
+public interface Flow
 {
-  private FlowObject source;
-  private FlowObject target;
-  
   /**
-   * Construct a flow with no target
-   * Note, this MUST NOT leak into the public API.
+   * Get the optional name
    */
-  protected Flow()
-  {
-  }
-  
+  String getName();
+
   /**
-   * Construct a flow with a given target
-   * Note, this MUST NOT leak into the public API.
+   * Get the target name
    */
-  public Flow(String targetName)
-  {
-    super(targetName);
-  }
-
+  String getTargetName();
+  
   /**
    * Get the source flow object
    */
-  public FlowObject getSource()
-  {
-    return source;
-  }
+  FlowObject getSource();
 
   /**
-   * Set the source flow object
-   * Note, this MUST NOT leak into the public API.
-   */
-  @XmlTransient
-  protected void setSource(FlowObject source)
-  {
-    this.source = source;
-  }
-
-  /**
    * Get the target flow object
    */
-  public FlowObject getTarget()
-  {
-    return target;
-  }
+  FlowObject getTarget();
 
-  /**
-   * Set the target flow object
-   * Note, this MUST NOT leak into the public API.
-   */
-  @XmlTransient
-  public void setTarget(FlowObject target)
-  {
-    this.target = target;
-  }
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowHandler.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowHandler.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,55 +1,16 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
 import org.jboss.bpm.runtime.Token;
 
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "FlowHandler")
-public class FlowHandler extends Handler
+public interface FlowHandler extends Handler
 {
-  private FlowHandler delegate;
-  
+
   /**
    * Transfer the token to the FlowHandler.
    * <p/>
    * The FlowHandler will add the active outgoing @{link Flow}s to
    * @{link Token}'s flow queue.  
    */
-  public void transfer(Token token)
-  {
-    if (delegate == null)
-    {
-      delegate = newInstance(FlowHandler.class);
-    }
-    delegate.transfer(token);
-  }
+  void transfer(Token token);
+
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,147 +1,10 @@
-/*
- * 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.jboss.bpm.model;
 
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.NameNotUniqueException;
-
-//$Id$
-
-/**
- * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="FlowObject")
-public abstract class FlowObject extends AbstractFlowObject
+public interface FlowObject
 {
-  /**
-   * Construct an anonymous StartEvent. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected FlowObject()
-  {
-  }
-  
-  /**
-   * Initialize the flow object
-   */
-  protected void initialize(Process proc)
-  {
-    setProcess(proc);
-
-    if (this instanceof NamedFlowObject)
-    {
-      // Check required name 
-      String name = ((NamedFlowObject)this).getName();
-      if (name == null)
-        throw new InvalidProcessException("Name is required for: " + this);
-      
-      // Check name uniqueness 
-      for (FlowObject aux : proc.getFlowObjects())
-      {
-        if (aux != this && aux instanceof NamedFlowObject)
-        {
-          String auxName = ((NamedFlowObject)aux).getName(); 
-          if (name.equals(auxName))
-            throw new NameNotUniqueException("NamedFlowObject: " + this);
-        }
-      }
-    }
-      
-    // Initialize in/out flows
-    Flow outFlow = null;
-    if (this instanceof SingleOutFlowSupport)
-    {
-      SingleOutFlowSupport sof = (SingleOutFlowSupport)this;
-      outFlow = sof.getOutFlow();
-      initFlow(proc, outFlow);
-    }
-    else if (this instanceof MultipleOutFlowSupport)
-    {
-      MultipleOutFlowSupport mof = (MultipleOutFlowSupport)this;
-      for (Flow flow : mof.getOutFlows())
-      {
-        outFlow = flow;
-        initFlow(proc, flow);
-      }
-    }
-    
-    Flow inFlow = null;
-    if (this instanceof SingleInFlowSupport)
-    {
-      SingleInFlowSupport sif = (SingleInFlowSupport)this;
-      inFlow = sif.getInFlow();
-    }
-    else if (this instanceof MultipleInFlowSupport)
-    {
-      MultipleInFlowSupport mif = (MultipleInFlowSupport)this;
-      for (Flow flow : mif.getInFlows())
-      {
-        inFlow = flow;
-      }
-    }
-    
-    if (inFlow == null && outFlow == null)
-      throw new InvalidProcessException("Unconnected flow object: " + this);
-  }
-
-  private void initFlow(Process proc, Flow flow)
-  {
-    if (flow != null)
-    {
-      String name = flow.getTargetName();
-      FlowObject target = proc.findFlowObject(name);
-      if (target == null)
-        throw new InvalidProcessException("Cannot find target for out flow: " + name);
-      
-      if (target instanceof SingleInFlowSupport)
-      {
-        SingleInFlowSupport sif = (SingleInFlowSupport)target;
-        sif.setInFlow(flow);
-      }
-      else if (target instanceof MultipleInFlowSupport)
-      {
-        MultipleInFlowSupport mif = (MultipleInFlowSupport)target;
-        mif.addInFlow(flow);
-      }
-      else
-      {
-        throw new InvalidProcessException("Target does not support in flow: " + target);
-      }
-      
-      flow.setSource(this);
-      flow.setTarget(target);
-    }
-  }
-  
   /** 
    * Get the associated Process 
    */
-  public Process getProcess()
-  {
-    return super.getProcess();
-  }
+  Process getProcess();
+
 }
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,127 +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.jboss.bpm.model;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. If the flow does not need to be
- * controlled, then a Gateway is not needed.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Gateway")
-public abstract class Gateway extends AbstractGateway implements NamedFlowObject, Executable
-{
-  // provide logging
-  private static final Log log = LogFactory.getLog(Gateway.class);
-
-  @XmlTransient
-  protected List<Flow> inFlows = new ArrayList<Flow>();
-
-  /**
-   * Construct an anonymous Gateway Note, this MUST NOT leak into the public API.
-   */
-  protected Gateway()
-  {
-  }
-
-  /**
-   * Construct a Gateway with a given name Note, this MUST NOT leak into the public API.
-   */
-  protected Gateway(String name)
-  {
-    super(name);
-  }
-
-  public void addOutFlow(Flow flow)
-  {
-    outFlows.add(flow);
-  }
-
-  public List<Flow> getInFlows()
-  {
-    return Collections.unmodifiableList(inFlows);
-  }
-
-  public void addInFlow(Flow inFlow)
-  {
-    this.inFlows.add(inFlow);
-  }
-
-  @XmlTransient
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandler()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        List<Flow> outFlows = getOutFlows();
-        if (outFlows.size() == 1)
-          token.addTailFlow(outFlows.get(0));
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject gateway = this;
-    return new SignalHandler()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(gateway, Signal.Type.ENTER_GATEWAY);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(gateway, Signal.Type.EXIT_GATEWAY);
-      }
-    };
-  }
-
-  @XmlTransient
-  public ExecutionHandler getDefaultExecutionHandler()
-  {
-    return new ExecutionHandler()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in gateway: " + getName());
-      }
-    };
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,7 @@
+package org.jboss.bpm.model;
+
+
+public interface Gateway extends FlowObject, NamedFlowObject, Executable, MultipleOutFlowSupport, MultipleInFlowSupport
+{
+
+}
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Handler.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Handler.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Handler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,90 +1,6 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.bpm.NotImplementedException;
-
-
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Handler")
-public abstract class Handler
+public interface Handler
 {
-  private String className;
-  private String beanRef;
 
-  public String getClassName()
-  {
-    return className;
-  }
-
-  @XmlAttribute(name = "class", required = false)
-  public void setClassName(String className)
-  {
-    this.className = className;
-  }
-
-  public String getBeanRef()
-  {
-    return beanRef;
-  }
-
-  @XmlAttribute(name = "bean", required = false)
-  public void setBeanRef(String beanRef)
-  {
-    this.beanRef = beanRef;
-  }
-
-  @SuppressWarnings("unchecked")
-  protected <T> T newInstance(Class<T> clazz)
-  {
-    try
-    {
-      if (className != null)
-      {
-        ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-        return (T)ctxLoader.loadClass(className).newInstance();
-      }
-      else if (beanRef != null)
-      {
-        throw new NotImplementedException();
-      }
-      else
-      {
-        throw new IllegalStateException("There is no 'class' nor 'bean' attribute set for this handler");
-      }
-    }
-    catch (Exception ex)
-    {
-      throw new IllegalStateException("Cannot instanciate the handler", ex);
-    }
-  }
 }
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,5 @@
+package org.jboss.bpm.model;
+
+public interface IntermediateEvent extends Event, NamedFlowObject, SingleInFlowSupport, SingleOutFlowSupport
+{
+}
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -31,9 +31,6 @@
    * Get the list of in flows
    */
   List<Flow> getInFlows();
-  
-  /**
-   * Add an out flow
-   */
+
   void addInFlow(Flow flow);
 }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -31,9 +31,7 @@
    * Get the list of out flows
    */
   List<Flow> getOutFlows();
-  
-  /**
-   * Add an out flow
-   */
+
   void addOutFlow(Flow flow);
+
 }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,210 +1,48 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id: Process.java 1581 2008-07-10 19:41:52Z thomas.diesler at jboss.com $
-
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Future;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.client.ExecutionManager;
-import org.jboss.bpm.client.ProcessManager;
 import org.jboss.bpm.runtime.Attachments;
 
-/**
- * A Process is any Activity performed within a company or organization.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Process")
- at XmlRootElement(name = "process")
-public class Process extends AbstractProcess
+public interface Process extends NamedFlowObject
 {
-  public enum ProcessState
+  enum ProcessState
   {
     CREATED, INITIALIZED, STARTED, ENDED
   };
 
-  private ProcessState processState = ProcessState.CREATED;
-
   /**
-   * Construct an anonymous process
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected Process()
-  {
-    setProcess(this);
-  }
-
-  /**
-   * Construct a process with a given name
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected Process(String name)
-  {
-    super(name);
-    setProcess(this);
-  }
-
-  /**
-   * Add a flow object. Note, this MUST NOT leak into the public API.
-   */
-  protected void addFlowObject(FlowObject flowObject)
-  {
-    flowObjects.add(flowObject);
-  }
-
-  /**
    * Get the start event
    */
-  public StartEvent getStartEvent()
-  {
-    StartEvent start = null;
-    for (FlowObject aux : flowObjects)
-    {
-      if (aux instanceof StartEvent)
-      {
-        start = (StartEvent)aux;
-        break;
-      }
-    }
-    return start;
-  }
+  StartEvent getStartEvent();
 
   /**
    * Get the set of end events
    */
-  public List<EndEvent> getEndEvents()
-  {
-    List<EndEvent> ends = new ArrayList<EndEvent>();
-    for (FlowObject aux : flowObjects)
-    {
-      if (aux instanceof EndEvent)
-      {
-        ends.add((EndEvent)aux);
-      }
-    }
-    return Collections.unmodifiableList(ends);
-  }
+  List<EndEvent> getEndEvents();
 
   /**
    * Get the list of flow objects
    */
-  public List<FlowObject> getFlowObjects()
-  {
-    if (processState == ProcessState.CREATED)
-      return flowObjects;
+  List<FlowObject> getFlowObjects();
 
-    return Collections.unmodifiableList(flowObjects);
-  }
-
   /** Start the process */
-  public Future<Result> startProcess()
-  {
-    return startProcess(null);
-  }
+  Future<Result> startProcess();
 
   /** Start the process, with a given execution context */
-  public Future<Result> startProcess(Attachments att)
-  {
-    if (processState != ProcessState.INITIALIZED)
-      throw new IllegalStateException("Cannot start process in state: " + processState);
+  Future<Result> startProcess(Attachments att);
 
-    processState = ProcessState.STARTED;
-    ExecutionManager exm = ExecutionManager.locateExecutionManager();
-    return exm.startProcess(this, att);
-  }
-
   /**
    * Find a flow object by name
    * 
    * @return null if not found
    */
-  public FlowObject findFlowObject(String name)
-  {
-    if (name == null)
-      throw new IllegalArgumentException("Cannot find flow object with name: null");
+  FlowObject findFlowObject(String name);
 
-    FlowObject nfo = null;
-    for (FlowObject aux : flowObjects)
-    {
-      if (aux instanceof NamedFlowObject)
-      {
-        NamedFlowObject auxnfo = (NamedFlowObject)aux;
-        if (name.equals(auxnfo.getName()))
-        {
-          nfo = aux;
-          break;
-        }
-      }
-    }
-    return nfo;
-  }
-
   /**
    * Get the process state
    */
-  public ProcessState getProcessState()
-  {
-    return processState;
-  }
+  ProcessState getProcessState();
 
-  /**
-   * Set the process state
-   */
-  public void initialize()
-  {
-    if (processState != ProcessState.CREATED)
-      throw new IllegalStateException("Cannot initialize process in state: " + processState);
-
-    // Set the anonymous default name
-    if (getName() == null)
-    {
-      ProcessManager pm = ProcessManager.locateProcessManager();
-      setName("AnonymousProcess#" + pm.getProcesses().size());
-    }
-    
-    if (getStartEvent() == null)
-      throw new InvalidProcessException("Process does not have a start event");
-
-    if (getEndEvents().size() == 0)
-      throw new InvalidProcessException("Process does not have end events");
-
-    // Set the associated process
-    for (FlowObject aux : flowObjects)
-      aux.initialize(this);
-
-    processState = ProcessState.INITIALIZED;
-  }
-
-  public String toString()
-  {
-    return "Process[" + getName() + "]";
-  }
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -21,7 +21,22 @@
  */
 package org.jboss.bpm.model;
 
+import org.jboss.bpm.model.internal.ComplexGatewayImpl;
+import org.jboss.bpm.model.internal.EndEventImpl;
+import org.jboss.bpm.model.internal.ExclusiveGatewayImpl;
+import org.jboss.bpm.model.internal.FlowObjectImpl;
+import org.jboss.bpm.model.internal.InclusiveGatewayImpl;
+import org.jboss.bpm.model.internal.IntermediateEventImpl;
+import org.jboss.bpm.model.internal.MessageFlowImpl;
+import org.jboss.bpm.model.internal.ParallelGatewayImpl;
+import org.jboss.bpm.model.internal.ProcessImpl;
+import org.jboss.bpm.model.internal.SequenceFlowImpl;
+import org.jboss.bpm.model.internal.StartEventImpl;
+import org.jboss.bpm.model.internal.SubProcessImpl;
+import org.jboss.bpm.model.internal.TaskImpl;
 
+
+
 // $Id$
 
 /**
@@ -32,12 +47,12 @@
  */
 public class ProcessBuilder
 {
-  private Process proc;
-  private FlowObject flowObject;
+  private ProcessImpl proc;
+  private FlowObjectImpl flowObject;
   
   public ProcessBuilder (String procName)
   {
-    proc = new Process(procName);
+    proc = new ProcessImpl(procName);
   }
   
   public Process getProcess()
@@ -48,7 +63,7 @@
   
   public ProcessBuilder addStartEvent()
   {
-    flowObject = new StartEvent();
+    flowObject = new StartEventImpl();
     proc.addFlowObject(flowObject);
     return this;
   }
@@ -58,12 +73,12 @@
     if (flowObject instanceof SingleOutFlowSupport)
     {
       SingleOutFlowSupport outFlow = (SingleOutFlowSupport)flowObject;
-      outFlow.setOutFlow(new SequenceFlow(name));
+      outFlow.setOutFlow(new SequenceFlowImpl(name));
     }
     else if (flowObject instanceof MultipleOutFlowSupport)
     {
       MultipleOutFlowSupport outFlow = (MultipleOutFlowSupport)flowObject;
-      outFlow.addOutFlow(new SequenceFlow(name));
+      outFlow.addOutFlow(new SequenceFlowImpl(name));
     }
     else
     {
@@ -77,12 +92,12 @@
     if (flowObject instanceof SingleOutFlowSupport)
     {
       SingleOutFlowSupport outFlow = (SingleOutFlowSupport)flowObject;
-      outFlow.setOutFlow(new MessageFlow(name));
+      outFlow.setOutFlow(new MessageFlowImpl(name));
     }
     else if (flowObject instanceof MultipleOutFlowSupport)
     {
       MultipleOutFlowSupport outFlow = (MultipleOutFlowSupport)flowObject;
-      outFlow.addOutFlow(new MessageFlow(name));
+      outFlow.addOutFlow(new MessageFlowImpl(name));
     }
     else
     {
@@ -93,56 +108,56 @@
   
   public ProcessBuilder addTask(String name)
   {
-    flowObject = new Task(name);
+    flowObject = new TaskImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addExclusiveGateway(String name)
   {
-    flowObject = new ExclusiveGateway(name);
+    flowObject = new ExclusiveGatewayImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addInclusiveGateway(String name)
   {
-    flowObject = new InclusiveGateway(name);
+    flowObject = new InclusiveGatewayImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addComplexGateway(String name)
   {
-    flowObject = new ComplexGateway(name);
+    flowObject = new ComplexGatewayImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addParallelGateway(String name)
   {
-    flowObject = new ParallelGateway(name);
+    flowObject = new ParallelGatewayImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addSubProcess(String name)
   {
-    flowObject = new SubProcess(name);
+    flowObject = new SubProcessImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addItermediateEvent(String name)
   {
-    flowObject = new ItermediateEvent(name);
+    flowObject = new IntermediateEventImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }
   
   public ProcessBuilder addEndEvent(String name)
   {
-    flowObject = new EndEvent(name);
+    flowObject = new EndEventImpl(name);
     proc.addFlowObject(flowObject);
     return this;
   }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalHandler.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalHandler.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SignalHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,63 +1,16 @@
-/*
- * 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.jboss.bpm.model;
 
-import javax.xml.bind.annotation.XmlType;
-
-
-//$Id$
-
-/**
- * Implement to get signals on enter and exit.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "SignalHandler")
-public class SignalHandler extends Handler
+public interface SignalHandler extends Handler
 {
-  private SignalHandler delegate;
-  
+
   /** 
    * Get signal for enter 
    */
-  public Signal getEnterSignal()
-  {
-    if (delegate == null)
-    {
-      delegate = newInstance(SignalHandler.class);
-    }
-    return delegate.getEnterSignal();
-  }
+  Signal getEnterSignal();
 
   /** 
    * Get signal for exit 
    */
-  public Signal getExitSignal()
-  {
-    if (delegate == null)
-    {
-      delegate = newInstance(SignalHandler.class);
-    }
-    return delegate.getExitSignal();
-  }
-}
+  Signal getExitSignal();
+
+}
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -29,9 +29,6 @@
    * Get the out flow
    */
   Flow getInFlow();
-  
-  /**
-   * Set the in flow
-   */
+
   void setInFlow(Flow flow);
 }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -29,9 +29,6 @@
    * Get the out flow
    */
   Flow getOutFlow();
-  
-  /**
-   * Set the out flow
-   */
+
   void setOutFlow(Flow flow);
 }

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,103 +1,5 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
-
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * A Start Event indicates where a particular Process will start.
- * 
- * In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any incoming Sequence Flow. A Start Event can have a Trigger that
- * indicates how the Process starts: Message, Timer, Rule, Link, or Multiple.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "StartEvent")
-public class StartEvent extends AbstractStartEvent
+public interface StartEvent extends Event, SingleOutFlowSupport
 {
-  // provide logging
-  private static final Log log = LogFactory.getLog(StartEvent.class);
-  
-  /**
-   * Construct a StartEvent with a constant name: 'start' 
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected StartEvent()
-  {
-  }
-
-  @XmlTransient
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandler()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(getOutFlow());
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject start = this;
-    return new SignalHandler()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(start, Signal.Type.ENTER_START_EVENT);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(start, Signal.Type.EXIT_START_EVENT);
-      }
-    };
-  }
-
-  @XmlTransient
-  public ExecutionHandler getDefaultExecutionHandler()
-  {
-    return new ExecutionHandler()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in start-event");
-      }
-    };
-  }
-  
-  public String toString()
-  {
-    return "StartEvent[]";
-  }
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,123 +1,5 @@
-/*
- * 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.jboss.bpm.model;
 
-//$Id$
-
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.bpm.runtime.Token;
-
-/**
- * A Sub-Process is Process that is included within another Process.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="SubProcess")
-public class SubProcess extends AbstractSubProcess implements SingleInFlowSupport, Executable
+public interface SubProcess extends FlowObject, Executable, SingleInFlowSupport, SingleOutFlowSupport
 {
-  private Flow inFlow;
-  
-  /**
-   * Construct an anonymous process
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected SubProcess()
-  {
-  }
-
-  /**
-   * Construct a process with a given name
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected SubProcess(String name)
-  {
-    super(name);
-  }
-
-  /**
-   * Get the out flow
-   */
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-  
-  /**
-   * Set the in flow
-   */
-  @XmlTransient
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-
-  @XmlTransient
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandler()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(getOutFlow());
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject subproc = this;
-    return new SignalHandler()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(subproc, Signal.Type.ENTER_SUB_PROCESS);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(subproc, Signal.Type.EXIT_SUB_PROCESS);
-      }
-    };
-  }
-
-  @XmlTransient
-  public ExecutionHandler getDefaultExecutionHandler()
-  {
-    return new ExecutionHandler()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        startProcess(token.getExecutionContext());
-      }
-    };
-  }
-  
-  public String toString()
-  {
-    return "SubProcess[" + getName() + "]";
-  }
 }
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,132 +1,5 @@
-/*
- * 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.jboss.bpm.model;
 
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.runtime.Token;
-
-//$Id$
-
-/**
- * A Task is an Atomic Activity that is included within a Process.
- * 
- * A Task is used when the work in the Process is not broken down to a finer level of Process Model detail. Generally, an end-user and/or an application are used to
- * perform the Task when it is executed.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Task")
-public class Task extends AbstractTask implements SingleInFlowSupport, Executable
+public interface Task extends FlowObject, Executable, SingleInFlowSupport, SingleOutFlowSupport
 {
-  // provide logging
-  private static final Log log = LogFactory.getLog(Task.class);
-  
-  private Flow inFlow;
-
-  /**
-   * Construct an anonymous Task
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected Task()
-  {
-  }
-
-  /**
-   * Construct a Task with a given name
-   * Note, this MUST NOT leak into the public API.
-   */
-  protected Task(String name)
-  {
-    super(name);
-  }
-
-  /**
-   * Get the out flow
-   */
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-  
-  /**
-   * Set the in flow
-   */
-  @XmlTransient
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-  
-  @XmlTransient
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandler()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(getOutFlow());
-      }
-    };
-  }
-
-  @XmlTransient
-  public SignalHandler getDefaultSignalHandler()
-  {
-    return new SignalHandler()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(getProcess(), Signal.Type.ENTER_TASK);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(getProcess(), Signal.Type.EXIT_TASK);
-      }
-    };
-  }
-
-  @XmlTransient
-  public ExecutionHandler getDefaultExecutionHandler()
-  {
-    return new ExecutionHandler()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in task: " + getName());
-      }
-    };
-  }
-  
-  public String toString()
-  {
-    return "Task[" + getName() + "]";
-  }
-
 }
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal)

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,61 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.Activity;
-import org.jboss.bpm.model.internal.jaxb.JAXBActivity;
-
-/**
- * An activity is a generic term for work that a company or organization performs via business processes. 
- * An activity can be atomic or non-atomic (compound). 
- * The types of activities that are a part of a Process Model are: Process, Sub-Process, and Task. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class ActivityImpl extends FlowObjectImpl implements Activity
-{
-  public ActivityImpl(JAXBActivity delegate)
-  {
-    super(delegate);
-  }
-  
-  public String getName()
-  {
-    return getDelegate().getName();
-  }
-  
-  public void setName(String name)
-  {
-    if (getDelegate().getName() != null)
-      throw new IllegalStateException("Cannot rename: " + name);
-
-    getDelegate().setName(name);
-  }
-
-  private JAXBActivity getDelegate()
-  {
-    return (JAXBActivity)delegate;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,61 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.Activity;
+import org.jboss.bpm.model.internal.jaxb.JAXBActivity;
+
+/**
+ * An activity is a generic term for work that a company or organization performs via business processes. 
+ * An activity can be atomic or non-atomic (compound). 
+ * The types of activities that are a part of a Process Model are: Process, Sub-Process, and Task. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class ActivityImpl extends FlowObjectImpl implements Activity
+{
+  public ActivityImpl(JAXBActivity delegate)
+  {
+    super(delegate);
+  }
+  
+  public String getName()
+  {
+    return getDelegate().getName();
+  }
+  
+  public void setName(String name)
+  {
+    if (getDelegate().getName() != null)
+      throw new IllegalStateException("Cannot rename: " + name);
+
+    getDelegate().setName(name);
+  }
+
+  protected JAXBActivity getDelegate()
+  {
+    return (JAXBActivity)super.getDelegate();
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,52 +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.jboss.bpm.model.internal;
-
-import org.jboss.bpm.model.internal.jaxb.JAXBComplexGateway;
-
-// $Id$
-
-/**
- * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex Gateways can also be used to combine a set of linked
- * simple Gateways into a single, more compact situation. Modelers can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class ComplexGatewayImpl extends GatewayImpl
-{
-  public ComplexGatewayImpl(String name)
-  {
-    this(new JAXBComplexGateway());
-    setName(name);
-  }
-
-  public ComplexGatewayImpl(JAXBComplexGateway delegate)
-  {
-    super(delegate);
-  }
-
-  public String toString()
-  {
-    return "ComplexGateway[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ComplexGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,52 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+import org.jboss.bpm.model.internal.jaxb.JAXBComplexGateway;
+
+// $Id$
+
+/**
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex Gateways can also be used to combine a set of linked
+ * simple Gateways into a single, more compact situation. Modelers can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class ComplexGatewayImpl extends GatewayImpl
+{
+  public ComplexGatewayImpl(String name)
+  {
+    this(new JAXBComplexGateway());
+    setName(name);
+  }
+
+  public ComplexGatewayImpl(JAXBComplexGateway delegate)
+  {
+    super(delegate);
+  }
+
+  public String toString()
+  {
+    return "ComplexGateway[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,155 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.EndEvent;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Result;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBEndEvent;
-import org.jboss.bpm.runtime.Attachments;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * As the name implies, the End Event indicates where a Process will end. 
- * 
- * In terms of Sequence Flow, the End Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flow. 
- * An End Event can have a specific Result that will appear as a marker within the center of the End Event shape. 
- * End Event Results are Message, Error, Compensation, Link, and Multiple.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class EndEventImpl extends EventImpl implements EndEvent
-{
-  // provide logging
-  private static final Log log = LogFactory.getLog(EndEventImpl.class);
-  
-  private Result result;
-  private Flow inFlow;
-  
-  public EndEventImpl(String name)
-  {
-    this(new JAXBEndEvent());
-    setName(name);
-  }
-
-  public EndEventImpl(JAXBEndEvent delegate)
-  {
-    super(delegate);
-  }
-  
-  public String getName()
-  {
-    return getDelegate().getName();
-  }
-  
-  public void setName(String name)
-  {
-    getDelegate().setName(name);
-  }
-  
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-  
-  /**
-   * Set the in flow
-   */
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-  
-  public Result getResult()
-  {
-    return result;
-  }
-
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        log.debug("End reached in: " + getName());
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject end = this;
-    return new SignalHandlerImpl()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(end, Signal.Type.ENTER_END_EVENT);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(end, Signal.Type.EXIT_END_EVENT);
-      }
-    };
-  }
-
-  public ExecutionHandlerImpl getDefaultExecutionHandler()
-  {
-    return new ExecutionHandlerImpl()
-    {
-      @Override
-      public void execute(final Token token)
-      {
-        // Provide the result
-        result = new Result()
-        {
-          public Attachments getAttachments()
-          {
-            return token.getExecutionContext();
-          }
-        };
-      }
-    };
-  }
-  
-  private JAXBEndEvent getDelegate()
-  {
-    return (JAXBEndEvent)delegate;
-  }
-  
-  public String toString()
-  {
-    return "EndEvent[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,153 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.EndEvent;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Result;
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBEndEvent;
+import org.jboss.bpm.runtime.Attachments;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * As the name implies, the End Event indicates where a Process will end. 
+ * 
+ * In terms of Sequence Flow, the End Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flow. 
+ * An End Event can have a specific Result that will appear as a marker within the center of the End Event shape. 
+ * End Event Results are Message, Error, Compensation, Link, and Multiple.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class EndEventImpl extends EventImpl implements EndEvent
+{
+  // provide logging
+  private static final Log log = LogFactory.getLog(EndEventImpl.class);
+  
+  private Result result;
+  private Flow inFlow;
+  
+  public EndEventImpl(String name)
+  {
+    this(new JAXBEndEvent());
+    setName(name);
+  }
+
+  public EndEventImpl(JAXBEndEvent delegate)
+  {
+    super(delegate);
+  }
+  
+  public String getName()
+  {
+    return getDelegate().getName();
+  }
+  
+  public void setName(String name)
+  {
+    getDelegate().setName(name);
+  }
+  
+  public Flow getInFlow()
+  {
+    return inFlow;
+  }
+  
+  /**
+   * Set the in flow
+   */
+  public void setInFlow(Flow inFlow)
+  {
+    this.inFlow = inFlow;
+  }
+  
+  public Result getResult()
+  {
+    return result;
+  }
+
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        log.debug("End reached in: " + getName());
+      }
+    };
+  }
+
+  public SignalHandler getDefaultSignalHandler()
+  {
+    final FlowObject end = this;
+    return new SignalHandlerImpl()
+    {
+      public Signal getEnterSignal()
+      {
+        return new Signal(end, Signal.Type.ENTER_END_EVENT);
+      }
+
+      public Signal getExitSignal()
+      {
+        return new Signal(end, Signal.Type.EXIT_END_EVENT);
+      }
+    };
+  }
+
+  public ExecutionHandlerImpl getDefaultExecutionHandler()
+  {
+    return new ExecutionHandlerImpl()
+    {
+      @Override
+      public void execute(final Token token)
+      {
+        // Provide the result
+        result = new Result()
+        {
+          public Attachments getAttachments()
+          {
+            return token.getExecutionContext();
+          }
+        };
+      }
+    };
+  }
+  
+  protected JAXBEndEvent getDelegate()
+  {
+    return (JAXBEndEvent)super.getDelegate();
+  }
+  
+  public String toString()
+  {
+    return "EndEvent[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,85 +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.jboss.bpm.model.internal;
-
-import org.jboss.bpm.model.Event;
-import org.jboss.bpm.model.ExecutionHandler;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBEvent;
-import org.jboss.bpm.model.internal.jaxb.JAXBFlowObject;
-
-//$Id$
-
-/**
- * An Event is something that “happens” during the course of a business process. 
- * <p/>
- * These Events affect the flow of the Process and usually have a cause or an impact.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class EventImpl extends FlowObjectImpl implements Event
-{
-  private ExecutionHandler executionHandler;
-  private FlowHandler flowHandler;
-  private SignalHandler signalHandler;
-
-  public EventImpl(JAXBEvent delegate)
-  {
-    super(delegate);
-    executionHandler = new ExecutionHandlerImpl(delegate.getExecutionHandler());
-    flowHandler = new FlowHandlerImpl(delegate.getFlowHandler());
-    signalHandler = new SignalHandlerImpl(delegate.getSignalHandler());
-  }
-
-  public ExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  public void setExecutionHandler(ExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  public FlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  public void setFlowHandler(FlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  public SignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  public void setSignalHandler(SignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/EventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,84 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+import org.jboss.bpm.model.Event;
+import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBEvent;
+
+//$Id$
+
+/**
+ * An Event is something that “happens” during the course of a business process. 
+ * <p/>
+ * These Events affect the flow of the Process and usually have a cause or an impact.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class EventImpl extends FlowObjectImpl implements Event
+{
+  private ExecutionHandler executionHandler;
+  private FlowHandler flowHandler;
+  private SignalHandler signalHandler;
+
+  public EventImpl(JAXBEvent delegate)
+  {
+    super(delegate);
+    executionHandler = ExecutionHandlerImpl.adaptHandler(delegate.getExecutionHandler());
+    flowHandler = FlowHandlerImpl.adaptHandler(delegate.getFlowHandler());
+    signalHandler = SignalHandlerImpl.adaptHandler(delegate.getSignalHandler());
+  }
+
+  public ExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  public void setExecutionHandler(ExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  public FlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  public void setFlowHandler(FlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  public SignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  public void setSignalHandler(SignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,51 +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.jboss.bpm.model.internal;
-
-import org.jboss.bpm.model.internal.jaxb.JAXBExclusiveGateway;
-
-//$Id$
-
-/**
- * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class ExclusiveGatewayImpl extends GatewayImpl
-{
-  public ExclusiveGatewayImpl(String name)
-  {
-    this(new JAXBExclusiveGateway());
-    setName(name);
-  }
-
-  public ExclusiveGatewayImpl(JAXBExclusiveGateway delegate)
-  {
-    super(delegate);
-  }
-
-  public String toString()
-  {
-    return "ExclusiveGateway[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,51 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+import org.jboss.bpm.model.internal.jaxb.JAXBExclusiveGateway;
+
+//$Id$
+
+/**
+ * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class ExclusiveGatewayImpl extends GatewayImpl
+{
+  public ExclusiveGatewayImpl(String name)
+  {
+    this(new JAXBExclusiveGateway());
+    setName(name);
+  }
+
+  public ExclusiveGatewayImpl(JAXBExclusiveGateway delegate)
+  {
+    super(delegate);
+  }
+
+  public String toString()
+  {
+    return "ExclusiveGateway[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,62 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.ExecutionHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBExecutionHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBHandler;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * Implement to make the FlowObject executable
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class ExecutionHandlerImpl extends HandlerImpl implements ExecutionHandler
-{
-  private ExecutionHandlerImpl handler;
-
-  public ExecutionHandlerImpl()
-  {
-    super(new JAXBExecutionHandler());
-  }
-
-  public ExecutionHandlerImpl(JAXBHandler delegate)
-  {
-    super(delegate);
-  }
-
-  /**
-   * Execute this flow object
-   */
-  public void execute(Token token)
-  {
-    if (handler == null)
-    {
-      handler = newInstance(ExecutionHandlerImpl.class);
-    }
-    handler.execute(token);
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ExecutionHandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,66 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBExecutionHandler;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * Implement to make the FlowObject executable
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class ExecutionHandlerImpl extends HandlerImpl implements ExecutionHandler
+{
+  private ExecutionHandler handler;
+
+  public ExecutionHandlerImpl()
+  {
+    super(new JAXBExecutionHandler());
+  }
+
+  public ExecutionHandlerImpl(JAXBExecutionHandler delegate)
+  {
+    super(delegate);
+  }
+
+  /**
+   * Execute this flow object
+   */
+  public void execute(Token token)
+  {
+    if (handler == null)
+    {
+      handler = newInstance(ExecutionHandler.class);
+    }
+    handler.execute(token);
+  }
+  
+  protected static ExecutionHandler adaptHandler(JAXBExecutionHandler jaxb)
+  {
+    return jaxb != null ? new ExecutionHandlerImpl(jaxb) : null;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,58 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBFlowHandler;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class FlowHandlerImpl extends HandlerImpl implements FlowHandler
-{
-  private FlowHandler handler;
-
-  public FlowHandlerImpl()
-  {
-    super(new JAXBFlowHandler());
-  }
-
-  public FlowHandlerImpl(JAXBFlowHandler delegate)
-  {
-    super(delegate);
-  }
-
-  public void transfer(Token token)
-  {
-    if (handler == null)
-    {
-      handler = newInstance(FlowHandlerImpl.class);
-    }
-    handler.transfer(token);
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowHandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,63 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlowHandler;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * Implement to handle the outgoing Flows for an FlowObject
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class FlowHandlerImpl extends HandlerImpl implements FlowHandler
+{
+  private FlowHandler handler;
+
+  public FlowHandlerImpl()
+  {
+    super(new JAXBFlowHandler());
+  }
+
+  public FlowHandlerImpl(JAXBFlowHandler delegate)
+  {
+    super(delegate);
+  }
+
+  public void transfer(Token token)
+  {
+    if (handler == null)
+    {
+      handler = newInstance(FlowHandler.class);
+    }
+    handler.transfer(token);
+  }
+
+  public static FlowHandler adaptHandler(JAXBFlowHandler jaxb)
+  {
+    return jaxb != null ? new FlowHandlerImpl(jaxb) : null;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,103 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import java.util.List;
-
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
-import org.jboss.bpm.model.internal.jaxb.JAXBMessageFlow;
-import org.jboss.bpm.model.internal.jaxb.JAXBSequenceFlow;
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD. There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also
- * used in a generic sense (and lowercase) to describe how Tokens will traverse Sequence Flow from the Start Event to an End Event.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class FlowImpl implements Flow
-{
-  protected JAXBFlow delegate;
-  private FlowObject source;
-  private FlowObject target;
-
-  public FlowImpl(JAXBFlow delegate)
-  {
-    this.delegate = delegate;
-  }
-
-  public String getName()
-  {
-    return delegate.getName();
-  }
-
-  public String getTargetName()
-  {
-    return delegate.getTargetName();
-  }
-
-  public void setTargetName(String targetName)
-  {
-    delegate.setTargetName(targetName);
-  }
-
-  public FlowObject getSource()
-  {
-    return source;
-  }
-
-  public void setSource(FlowObject source)
-  {
-    this.source = source;
-  }
-
-  public FlowObject getTarget()
-  {
-    return target;
-  }
-
-  public void setTarget(FlowObject target)
-  {
-    this.target = target;
-  }
-
-  static void adaptFlows(List<Flow> destList, List<JAXBFlow> srcList)
-  {
-    for (JAXBFlow srcFlow : srcList)
-      destList.add(adaptFlow(srcFlow));
-  }
-
-  static Flow adaptFlow(JAXBFlow srcFlow)
-  {
-    if (srcFlow instanceof JAXBSequenceFlow)
-      return new SequenceFlowImpl((JAXBSequenceFlow)srcFlow);
-    else if (srcFlow instanceof JAXBMessageFlow)
-      return new MessageFlowImpl((JAXBMessageFlow)srcFlow);
-    else
-      throw new InvalidProcessException("Unsupported type: " + srcFlow);
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,116 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import java.util.List;
+
+import org.jboss.bpm.InvalidProcessException;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBMessageFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBSequenceFlow;
+
+/**
+ * A Flow is a graphical line connecting two objects in a BPD. There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also
+ * used in a generic sense (and lowercase) to describe how Tokens will traverse Sequence Flow from the Start Event to an End Event.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class FlowImpl implements Flow
+{
+  private JAXBFlow delegate;
+  private FlowObject source;
+  private FlowObject target;
+
+  public FlowImpl(JAXBFlow delegate)
+  {
+    this.delegate = delegate;
+  }
+
+  public String getName()
+  {
+    return delegate.getName();
+  }
+
+  public String getTargetName()
+  {
+    return delegate.getTargetName();
+  }
+
+  public void setTargetName(String targetName)
+  {
+    delegate.setTargetName(targetName);
+  }
+
+  public FlowObject getSource()
+  {
+    return source;
+  }
+
+  public void setSource(FlowObject source)
+  {
+    this.source = source;
+  }
+
+  public FlowObject getTarget()
+  {
+    return target;
+  }
+
+  public void setTarget(FlowObject target)
+  {
+    this.target = target;
+  }
+
+  protected JAXBFlow getDelegate()
+  {
+    return delegate;
+  }
+
+  static void adaptFlows(List<Flow> destList, List<JAXBFlow> srcList)
+  {
+    for (JAXBFlow srcFlow : srcList)
+    {
+      Flow flow = adaptFlow(srcFlow);
+      destList.add(flow);
+    }
+  }
+
+  static Flow adaptFlow(JAXBFlow srcFlow)
+  {
+    Flow destFlow = null;
+    if (srcFlow != null)
+    {
+      if (srcFlow instanceof JAXBSequenceFlow)
+        destFlow = new SequenceFlowImpl((JAXBSequenceFlow)srcFlow);
+      else if (srcFlow instanceof JAXBMessageFlow)
+        destFlow = new MessageFlowImpl((JAXBMessageFlow)srcFlow);
+      else
+        throw new InvalidProcessException("Unsupported type: " + srcFlow);
+    }
+    return destFlow;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,157 +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.jboss.bpm.model.internal;
-
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.NameNotUniqueException;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.MultipleInFlowSupport;
-import org.jboss.bpm.model.MultipleOutFlowSupport;
-import org.jboss.bpm.model.NamedFlowObject;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.SingleInFlowSupport;
-import org.jboss.bpm.model.SingleOutFlowSupport;
-import org.jboss.bpm.model.internal.jaxb.JAXBFlowObject;
-
-//$Id$
-
-/**
- * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class FlowObjectImpl implements FlowObject
-{
-  protected JAXBFlowObject delegate;
-  private Process process;
-
-  
-  public FlowObjectImpl(JAXBFlowObject delegate)
-  {
-    this.delegate = delegate;
-  }
-
-  public Process getProcess()
-  {
-    return process;
-  }
-
-  public void setProcess(Process process)
-  {
-    this.process = process;
-  }
-
-  /**
-   * Initialize the flow object
-   */
-  protected void initialize(ProcessImpl proc)
-  {
-    setProcess(proc);
-
-    if (this instanceof NamedFlowObject)
-    {
-      // Check required name
-      String name = ((NamedFlowObject)this).getName();
-      if (name == null)
-        throw new InvalidProcessException("Name is required for: " + this);
-
-      // Check name uniqueness
-      for (FlowObject aux : proc.getFlowObjects())
-      {
-        if (aux != this && aux instanceof NamedFlowObject)
-        {
-          String auxName = ((NamedFlowObject)aux).getName();
-          if (name.equals(auxName))
-            throw new NameNotUniqueException("NamedFlowObject: " + this);
-        }
-      }
-    }
-
-    // Initialize in/out flows
-    Flow outFlow = null;
-    if (this instanceof SingleOutFlowSupport)
-    {
-      SingleOutFlowSupport sof = (SingleOutFlowSupport)this;
-      outFlow = sof.getOutFlow();
-      initFlow(proc, (FlowImpl)outFlow);
-    }
-    else if (this instanceof MultipleOutFlowSupport)
-    {
-      MultipleOutFlowSupport mof = (MultipleOutFlowSupport)this;
-      for (Flow flow : mof.getOutFlows())
-      {
-        outFlow = flow;
-        initFlow(proc, (FlowImpl)flow);
-      }
-    }
-
-    Flow inFlow = null;
-    if (this instanceof SingleInFlowSupport)
-    {
-      SingleInFlowSupport sif = (SingleInFlowSupport)this;
-      inFlow = sif.getInFlow();
-    }
-    else if (this instanceof MultipleInFlowSupport)
-    {
-      MultipleInFlowSupport mif = (MultipleInFlowSupport)this;
-      for (Flow flow : mif.getInFlows())
-      {
-        inFlow = flow;
-      }
-    }
-
-    if (inFlow == null && outFlow == null)
-      throw new InvalidProcessException("Unconnected flow object: " + this);
-  }
-
-  private void initFlow(Process proc, FlowImpl flow)
-  {
-    if (flow != null)
-    {
-      String name = flow.getTargetName();
-      FlowObject target = proc.findFlowObject(name);
-      if (target == null)
-        throw new InvalidProcessException("Cannot find target for out flow: " + name);
-
-      if (target instanceof SingleInFlowSupport)
-      {
-        SingleInFlowSupport sif = (SingleInFlowSupport)target;
-        sif.setInFlow(flow);
-      }
-      else if (target instanceof MultipleInFlowSupport)
-      {
-        MultipleInFlowSupport mif = (MultipleInFlowSupport)target;
-        mif.addInFlow(flow);
-      }
-      else
-      {
-        throw new InvalidProcessException("Target does not support in flow: " + target);
-      }
-
-      flow.setSource(this);
-      flow.setTarget(target);
-    }
-
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,161 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+import org.jboss.bpm.InvalidProcessException;
+import org.jboss.bpm.NameNotUniqueException;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.MultipleInFlowSupport;
+import org.jboss.bpm.model.MultipleOutFlowSupport;
+import org.jboss.bpm.model.NamedFlowObject;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.SingleInFlowSupport;
+import org.jboss.bpm.model.SingleOutFlowSupport;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlowObject;
+
+//$Id$
+
+/**
+ * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class FlowObjectImpl implements FlowObject
+{
+  private JAXBFlowObject delegate;
+  private Process process;
+
+  
+  public FlowObjectImpl(JAXBFlowObject delegate)
+  {
+    this.delegate = delegate;
+  }
+
+  public Process getProcess()
+  {
+    return process;
+  }
+
+  public void setProcess(Process process)
+  {
+    this.process = process;
+  }
+
+  /**
+   * Initialize the flow object
+   */
+  protected void initialize(ProcessImpl proc)
+  {
+    setProcess(proc);
+
+    if (this instanceof NamedFlowObject)
+    {
+      // Check required name
+      String name = ((NamedFlowObject)this).getName();
+      if (name == null)
+        throw new InvalidProcessException("Name is required for: " + this);
+
+      // Check name uniqueness
+      for (FlowObject aux : proc.getFlowObjects())
+      {
+        if (aux != this && aux instanceof NamedFlowObject)
+        {
+          String auxName = ((NamedFlowObject)aux).getName();
+          if (name.equals(auxName))
+            throw new NameNotUniqueException("NamedFlowObject: " + this);
+        }
+      }
+    }
+
+    // Initialize in/out flows
+    Flow outFlow = null;
+    if (this instanceof SingleOutFlowSupport)
+    {
+      SingleOutFlowSupport sof = (SingleOutFlowSupport)this;
+      outFlow = sof.getOutFlow();
+      initFlow(proc, (FlowImpl)outFlow);
+    }
+    else if (this instanceof MultipleOutFlowSupport)
+    {
+      MultipleOutFlowSupport mof = (MultipleOutFlowSupport)this;
+      for (Flow flow : mof.getOutFlows())
+      {
+        outFlow = flow;
+        initFlow(proc, (FlowImpl)flow);
+      }
+    }
+
+    Flow inFlow = null;
+    if (this instanceof SingleInFlowSupport)
+    {
+      SingleInFlowSupport sif = (SingleInFlowSupport)this;
+      inFlow = sif.getInFlow();
+    }
+    else if (this instanceof MultipleInFlowSupport)
+    {
+      MultipleInFlowSupport mif = (MultipleInFlowSupport)this;
+      for (Flow flow : mif.getInFlows())
+      {
+        inFlow = flow;
+      }
+    }
+
+    if (inFlow == null && outFlow == null)
+      throw new InvalidProcessException("Unconnected flow object: " + this);
+  }
+
+  private void initFlow(Process proc, FlowImpl flow)
+  {
+    if (flow != null)
+    {
+      String name = flow.getTargetName();
+      FlowObject target = proc.findFlowObject(name);
+      if (target == null)
+        throw new InvalidProcessException("Cannot find target for out flow: " + name);
+
+      if (target instanceof SingleInFlowSupport)
+      {
+        SingleInFlowSupport sif = (SingleInFlowSupport)target;
+        sif.setInFlow(flow);
+      }
+      else if (target instanceof MultipleInFlowSupport)
+      {
+        MultipleInFlowSupport mif = (MultipleInFlowSupport)target;
+        mif.addInFlow(flow);
+      }
+      else
+      {
+        throw new InvalidProcessException("Target does not support in flow: " + target);
+      }
+
+      flow.setSource(this);
+      flow.setTarget(target);
+    }
+  }
+  
+  protected JAXBFlowObject getDelegate()
+  {
+    return delegate;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,175 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.ExecutionHandler;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Gateway;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBGateway;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. If the flow does not need to be
- * controlled, then a Gateway is not needed.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class GatewayImpl extends FlowObjectImpl implements Gateway
-{
-  // provide logging
-  private static final Log log = LogFactory.getLog(GatewayImpl.class);
-
-  protected List<Flow> inFlows = new ArrayList<Flow>();
-  protected List<Flow> outFlows = new ArrayList<Flow>();
-  private ExecutionHandler executionHandler;
-  private FlowHandler flowHandler;
-  private SignalHandler signalHandler;
-
-  public GatewayImpl(JAXBGateway delegate)
-  {
-    super(delegate);
-    executionHandler = new ExecutionHandlerImpl(delegate.getExecutionHandler());
-    flowHandler = new FlowHandlerImpl(delegate.getFlowHandler());
-    signalHandler = new SignalHandlerImpl(delegate.getSignalHandler());
-    FlowImpl.adaptFlows(outFlows, delegate.getOutFlows());
-  }
-
-  public String getName()
-  {
-    return getDelegate().getName();
-  }
-
-  public void setName(String name)
-  {
-    getDelegate().setName(name);
-  }
-
-  public List<Flow> getOutFlows()
-  {
-    return Collections.unmodifiableList(outFlows);
-  }
-
-  public void addOutFlow(Flow flow)
-  {
-    outFlows.add(flow);
-  }
-
-  public List<Flow> getInFlows()
-  {
-    return Collections.unmodifiableList(inFlows);
-  }
-
-  public void addInFlow(Flow inFlow)
-  {
-    this.inFlows.add(inFlow);
-  }
-
-  public ExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  public void setExecutionHandler(ExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  public FlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  public void setFlowHandler(FlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  public SignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  public void setSignalHandler(SignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        if (outFlows.size() == 1)
-          token.addTailFlow(outFlows.get(0));
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject gateway = this;
-    return new SignalHandlerImpl()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(gateway, Signal.Type.ENTER_GATEWAY);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(gateway, Signal.Type.EXIT_GATEWAY);
-      }
-    };
-  }
-
-  public ExecutionHandlerImpl getDefaultExecutionHandler()
-  {
-    return new ExecutionHandlerImpl()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in gateway: " + getName());
-      }
-    };
-  }
-
-  private JAXBGateway getDelegate()
-  {
-    return (JAXBGateway)delegate;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,178 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Gateway;
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBGateway;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. If the flow does not need to be
+ * controlled, then a Gateway is not needed.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class GatewayImpl extends FlowObjectImpl implements Gateway
+{
+  // provide logging
+  private static final Log log = LogFactory.getLog(GatewayImpl.class);
+
+  protected List<Flow> inFlows = new ArrayList<Flow>();
+  protected List<Flow> outFlows = new ArrayList<Flow>();
+  private ExecutionHandler executionHandler;
+  private FlowHandler flowHandler;
+  private SignalHandler signalHandler;
+
+  public GatewayImpl(JAXBGateway delegate)
+  {
+    super(delegate);
+    executionHandler = ExecutionHandlerImpl.adaptHandler(delegate.getExecutionHandler());
+    flowHandler = FlowHandlerImpl.adaptHandler(delegate.getFlowHandler());
+    signalHandler = SignalHandlerImpl.adaptHandler(delegate.getSignalHandler());
+    FlowImpl.adaptFlows(outFlows, delegate.getOutFlows());
+  }
+
+  public String getName()
+  {
+    return getDelegate().getName();
+  }
+
+  public void setName(String name)
+  {
+    getDelegate().setName(name);
+  }
+
+  public List<Flow> getOutFlows()
+  {
+    return Collections.unmodifiableList(outFlows);
+  }
+
+  public void addOutFlow(Flow flow)
+  {
+    outFlows.add(flow);
+    JAXBFlow jaxb = ((FlowImpl)flow).getDelegate();
+    getDelegate().getOutFlows().add(jaxb);
+  }
+
+  public List<Flow> getInFlows()
+  {
+    return Collections.unmodifiableList(inFlows);
+  }
+
+  public void addInFlow(Flow inFlow)
+  {
+    this.inFlows.add(inFlow);
+  }
+
+  public ExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  public void setExecutionHandler(ExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  public FlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  public void setFlowHandler(FlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  public SignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  public void setSignalHandler(SignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        if (outFlows.size() == 1)
+          token.addTailFlow(outFlows.get(0));
+      }
+    };
+  }
+
+  public SignalHandler getDefaultSignalHandler()
+  {
+    final FlowObject gateway = this;
+    return new SignalHandlerImpl()
+    {
+      public Signal getEnterSignal()
+      {
+        return new Signal(gateway, Signal.Type.ENTER_GATEWAY);
+      }
+
+      public Signal getExitSignal()
+      {
+        return new Signal(gateway, Signal.Type.EXIT_GATEWAY);
+      }
+    };
+  }
+
+  public ExecutionHandlerImpl getDefaultExecutionHandler()
+  {
+    return new ExecutionHandlerImpl()
+    {
+      @Override
+      public void execute(Token token)
+      {
+        log.debug("Nothing to do in gateway: " + getName());
+      }
+    };
+  }
+
+  protected JAXBGateway getDelegate()
+  {
+    return (JAXBGateway)super.getDelegate();
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,48 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.Handler;
-import org.jboss.bpm.model.internal.jaxb.JAXBHandler;
-
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class HandlerImpl implements Handler
-{
-  private JAXBHandler delegate;
-  
-  public HandlerImpl(JAXBHandler delegate)
-  {
-    this.delegate = delegate;
-  }
-
-  protected <T> T newInstance(Class<T> clazz)
-  {
-    return delegate.newInstance(clazz);
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/HandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,48 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.Handler;
+import org.jboss.bpm.model.internal.jaxb.JAXBHandler;
+
+/**
+ * Implement to handle the outgoing Flows for an FlowObject
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class HandlerImpl implements Handler
+{
+  private JAXBHandler delegate;
+  
+  public HandlerImpl(JAXBHandler delegate)
+  {
+    this.delegate = delegate;
+  }
+
+  protected <T> T newInstance(Class<T> clazz)
+  {
+    return delegate.newInstance(clazz);
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,55 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.internal.jaxb.JAXBInclusiveGateway;
-
-
-
-/**
- * This Decision represents a branching point where Alternatives are based on conditional expressions contained within outgoing Sequence Flow. 
- * However, in this case, the True evaluation of one condition expression does not exclude the evaluation of other condition expressions. 
- * All Sequence Flow with a True evaluation will be traversed by a Token. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class InclusiveGatewayImpl extends GatewayImpl
-{
-  public InclusiveGatewayImpl(String name)
-  {
-    this(new JAXBInclusiveGateway());
-    setName(name);
-  }
-
-  public InclusiveGatewayImpl(JAXBInclusiveGateway delegate)
-  {
-    super(delegate);
-  }
-
-  public String toString()
-  {
-    return "InclusiveGateway[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/InclusiveGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,55 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.internal.jaxb.JAXBInclusiveGateway;
+
+
+
+/**
+ * This Decision represents a branching point where Alternatives are based on conditional expressions contained within outgoing Sequence Flow. 
+ * However, in this case, the True evaluation of one condition expression does not exclude the evaluation of other condition expressions. 
+ * All Sequence Flow with a True evaluation will be traversed by a Token. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class InclusiveGatewayImpl extends GatewayImpl
+{
+  public InclusiveGatewayImpl(String name)
+  {
+    this(new JAXBInclusiveGateway());
+    setName(name);
+  }
+
+  public InclusiveGatewayImpl(JAXBInclusiveGateway delegate)
+  {
+    super(delegate);
+  }
+
+  public String toString()
+  {
+    return "InclusiveGateway[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,145 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.IntermediateEvent;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBIntermediateEvent;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * An Intermediate Event is an Event that occurs after a Process has been started. It will affect the Flow of the Process, but will not start or (directly) terminate
- * the Process. An Intermediate Event will show where messages or delays are expected within the Process, disrupt the Normal Flow through exception handling, or show
- * the extra flow required for compensating a transaction.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class IntermediateEventImpl extends EventImpl implements IntermediateEvent
-{
-  // provide logging
-  private static final Log log = LogFactory.getLog(IntermediateEventImpl.class);
-
-  private Flow inFlow;
-  private Flow outFlow;
-
-  public IntermediateEventImpl(String name)
-  {
-    this(new JAXBIntermediateEvent());
-    setName(name);
-  }
-
-  public IntermediateEventImpl(JAXBIntermediateEvent delegate)
-  {
-    super(delegate);
-    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
-  }
-
-  public String getName()
-  {
-    return getDelegate().getName();
-  }
-
-  public void setName(String name)
-  {
-    getDelegate().setName(name);
-  }
-
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-
-  public Flow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  public void setOutFlow(Flow outFlow)
-  {
-    this.outFlow = outFlow;
-  }
-
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(getOutFlow());
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject event = this;
-    return new SignalHandlerImpl()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(event, Signal.Type.ENTER_EVENT);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(event, Signal.Type.EXIT_EVENT);
-      }
-    };
-  }
-
-  public ExecutionHandlerImpl getDefaultExecutionHandler()
-  {
-    return new ExecutionHandlerImpl()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in start-event");
-      }
-    };
-  }
-
-  private JAXBIntermediateEvent getDelegate()
-  {
-    return (JAXBIntermediateEvent)delegate;
-  }
-
-  public String toString()
-  {
-    return "ItermediateEvent[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,148 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.IntermediateEvent;
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBIntermediateEvent;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * An Intermediate Event is an Event that occurs after a Process has been started. It will affect the Flow of the Process, but will not start or (directly) terminate
+ * the Process. An Intermediate Event will show where messages or delays are expected within the Process, disrupt the Normal Flow through exception handling, or show
+ * the extra flow required for compensating a transaction.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class IntermediateEventImpl extends EventImpl implements IntermediateEvent
+{
+  // provide logging
+  private static final Log log = LogFactory.getLog(IntermediateEventImpl.class);
+
+  private Flow inFlow;
+  private Flow outFlow;
+
+  public IntermediateEventImpl(String name)
+  {
+    this(new JAXBIntermediateEvent());
+    setName(name);
+  }
+
+  public IntermediateEventImpl(JAXBIntermediateEvent delegate)
+  {
+    super(delegate);
+    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
+  }
+
+  public String getName()
+  {
+    return getDelegate().getName();
+  }
+
+  public void setName(String name)
+  {
+    getDelegate().setName(name);
+  }
+
+  public Flow getInFlow()
+  {
+    return inFlow;
+  }
+
+  public void setInFlow(Flow inFlow)
+  {
+    this.inFlow = inFlow;
+  }
+
+  public Flow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  public void setOutFlow(Flow flow)
+  {
+    this.outFlow = flow;
+    JAXBFlow jaxb = ((FlowImpl)flow).getDelegate();
+    getDelegate().setOutFlow(jaxb);
+  }
+
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        token.addTailFlow(getOutFlow());
+      }
+    };
+  }
+
+  public SignalHandler getDefaultSignalHandler()
+  {
+    final FlowObject event = this;
+    return new SignalHandlerImpl()
+    {
+      public Signal getEnterSignal()
+      {
+        return new Signal(event, Signal.Type.ENTER_EVENT);
+      }
+
+      public Signal getExitSignal()
+      {
+        return new Signal(event, Signal.Type.EXIT_EVENT);
+      }
+    };
+  }
+
+  public ExecutionHandlerImpl getDefaultExecutionHandler()
+  {
+    return new ExecutionHandlerImpl()
+    {
+      @Override
+      public void execute(Token token)
+      {
+        log.debug("Nothing to do in start-event");
+      }
+    };
+  }
+
+  protected JAXBIntermediateEvent getDelegate()
+  {
+    return (JAXBIntermediateEvent)super.getDelegate();
+  }
+
+  public String toString()
+  {
+    return "ItermediateEvent[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,47 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.internal.jaxb.JAXBMessageFlow;
-
-/**
- * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to send and receive them. 
- * In BPMN, two separate Pools in the Diagram will represent the two entities. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class MessageFlowImpl extends FlowImpl
-{
-  public MessageFlowImpl(String targetName)
-  {
-    super(new JAXBMessageFlow());
-    setTargetName(targetName);
-  }
-  
-  protected MessageFlowImpl(JAXBMessageFlow delegate)
-  {
-    super(delegate);
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/MessageFlowImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,47 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.internal.jaxb.JAXBMessageFlow;
+
+/**
+ * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to send and receive them. 
+ * In BPMN, two separate Pools in the Diagram will represent the two entities. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class MessageFlowImpl extends FlowImpl
+{
+  public MessageFlowImpl(String targetName)
+  {
+    super(new JAXBMessageFlow());
+    setTargetName(targetName);
+  }
+  
+  protected MessageFlowImpl(JAXBMessageFlow delegate)
+  {
+    super(delegate);
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,72 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBParallelGateway;
-import org.jboss.bpm.runtime.Token;
-
-
-/**
- * Parallel Gateway is required when two or more Activities need to be executed in parallel.  
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class ParallelGatewayImpl extends GatewayImpl
-{
-  public ParallelGatewayImpl(String name)
-  {
-    this(new JAXBParallelGateway());
-    setName(name);
-  }
-
-  public ParallelGatewayImpl(JAXBParallelGateway delegate)
-  {
-    super(delegate);
-  }
-
-  /**
-   * The DefaultFlowHandler adds all out flows to the queue
-   */
-  @Override
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        for(Flow outFlow : getOutFlows())
-          token.addTailFlow(outFlow);
-      }
-    };
-  }
-
-  public String toString()
-  {
-    return "ParallelGateway[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ParallelGatewayImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,72 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBParallelGateway;
+import org.jboss.bpm.runtime.Token;
+
+
+/**
+ * Parallel Gateway is required when two or more Activities need to be executed in parallel.  
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class ParallelGatewayImpl extends GatewayImpl
+{
+  public ParallelGatewayImpl(String name)
+  {
+    this(new JAXBParallelGateway());
+    setName(name);
+  }
+
+  public ParallelGatewayImpl(JAXBParallelGateway delegate)
+  {
+    super(delegate);
+  }
+
+  /**
+   * The DefaultFlowHandler adds all out flows to the queue
+   */
+  @Override
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        for(Flow outFlow : getOutFlows())
+          token.addTailFlow(outFlow);
+      }
+    };
+  }
+
+  public String toString()
+  {
+    return "ParallelGateway[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,240 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.Future;
-
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.client.ExecutionManager;
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.EndEvent;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.NamedFlowObject;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.Result;
-import org.jboss.bpm.model.StartEvent;
-import org.jboss.bpm.model.internal.jaxb.JAXBComplexGateway;
-import org.jboss.bpm.model.internal.jaxb.JAXBEndEvent;
-import org.jboss.bpm.model.internal.jaxb.JAXBExclusiveGateway;
-import org.jboss.bpm.model.internal.jaxb.JAXBFlowObject;
-import org.jboss.bpm.model.internal.jaxb.JAXBInclusiveGateway;
-import org.jboss.bpm.model.internal.jaxb.JAXBIntermediateEvent;
-import org.jboss.bpm.model.internal.jaxb.JAXBParallelGateway;
-import org.jboss.bpm.model.internal.jaxb.JAXBProcess;
-import org.jboss.bpm.model.internal.jaxb.JAXBStartEvent;
-import org.jboss.bpm.model.internal.jaxb.JAXBSubProcess;
-import org.jboss.bpm.model.internal.jaxb.JAXBTask;
-import org.jboss.bpm.runtime.Attachments;
-
-/**
- * A Process is any Activity performed within a company or organization.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class ProcessImpl extends ActivityImpl implements Process
-{
-  private List<FlowObject> flowObjects = new ArrayList<FlowObject>();
-  private ProcessState processState = ProcessState.CREATED;
-
-  public ProcessImpl(String name)
-  {
-    this(new JAXBProcess());
-    setName(name);
-  }
-
-  public ProcessImpl(JAXBProcess delegate)
-  {
-    super(delegate);
-    setProcess(this);
-    adaptFlowObjects(delegate);
-  }
-
-  public void addFlowObject(FlowObjectImpl flowObject)
-  {
-    flowObjects.add(flowObject);
-  }
-
-  public StartEventImpl getStartEvent()
-  {
-    StartEventImpl start = null;
-    for (FlowObject aux : flowObjects)
-    {
-      if (aux instanceof StartEvent)
-      {
-        start = (StartEventImpl)aux;
-        break;
-      }
-    }
-    return start;
-  }
-
-  public List<EndEvent> getEndEvents()
-  {
-    List<EndEvent> ends = new ArrayList<EndEvent>();
-    for (FlowObject aux : flowObjects)
-    {
-      if (aux instanceof EndEvent)
-      {
-        ends.add((EndEvent)aux);
-      }
-    }
-    return Collections.unmodifiableList(ends);
-  }
-
-  public List<FlowObject> getFlowObjects()
-  {
-
-    if (processState == ProcessState.CREATED)
-      return flowObjects;
-
-    return Collections.unmodifiableList(flowObjects);
-  }
-
-  public Future<Result> startProcess()
-  {
-    return startProcess(null);
-  }
-
-  public Future<Result> startProcess(Attachments att)
-  {
-    if (processState != ProcessState.INITIALIZED)
-      throw new IllegalStateException("Cannot start process in state: " + processState);
-
-    processState = ProcessState.STARTED;
-    ExecutionManager exm = ExecutionManager.locateExecutionManager();
-    return exm.startProcess(this, att);
-  }
-
-  public FlowObject findFlowObject(String name)
-  {
-    if (name == null)
-      throw new IllegalArgumentException("Cannot find flow object with name: null");
-
-    FlowObject nfo = null;
-    for (FlowObject aux : flowObjects)
-    {
-      if (aux instanceof NamedFlowObject)
-      {
-        NamedFlowObject auxnfo = (NamedFlowObject)aux;
-        if (name.equals(auxnfo.getName()))
-        {
-          nfo = aux;
-          break;
-        }
-      }
-    }
-    return nfo;
-  }
-
-  public ProcessState getProcessState()
-  {
-    return processState;
-  }
-
-  /**
-   * Set the process state
-   */
-  public void initialize()
-  {
-    if (processState != ProcessState.CREATED)
-      throw new IllegalStateException("Cannot initialize process in state: " + processState);
-
-    // Set the anonymous default name
-    if (getName() == null)
-    {
-      ProcessManager pm = ProcessManager.locateProcessManager();
-      setName("AnonymousProcess#" + pm.getProcesses().size());
-    }
-
-    if (getStartEvent() == null)
-      throw new InvalidProcessException("Process does not have a start event");
-
-    if (getEndEvents().size() == 0)
-      throw new InvalidProcessException("Process does not have end events");
-
-    // Set the associated process
-    for (FlowObject aux : flowObjects)
-    {
-      ((FlowObjectImpl)aux).initialize(this);
-    }
-
-    processState = ProcessState.INITIALIZED;
-  }
-
-  private void adaptFlowObjects(JAXBProcess delegate)
-  {
-    for (JAXBFlowObject fo : delegate.getFlowObjects())
-    {
-      if (fo instanceof JAXBStartEvent)
-      {
-        addFlowObject(new StartEventImpl((JAXBStartEvent)fo));
-      }
-      else if (fo instanceof JAXBIntermediateEvent)
-      {
-        addFlowObject(new IntermediateEventImpl((JAXBIntermediateEvent)fo));
-      }
-      else if (fo instanceof JAXBEndEvent)
-      {
-        addFlowObject(new EndEventImpl((JAXBEndEvent)fo));
-      }
-      else if (fo instanceof JAXBSubProcess)
-      {
-        addFlowObject(new SubProcessImpl((JAXBSubProcess)fo));
-      }
-      else if (fo instanceof JAXBTask)
-      {
-        addFlowObject(new TaskImpl((JAXBTask)fo));
-      }
-      else if (fo instanceof JAXBExclusiveGateway)
-      {
-        addFlowObject(new ExclusiveGatewayImpl((JAXBExclusiveGateway)fo));
-      }
-      else if (fo instanceof JAXBInclusiveGateway)
-      {
-        addFlowObject(new InclusiveGatewayImpl((JAXBInclusiveGateway)fo));
-      }
-      else if (fo instanceof JAXBComplexGateway)
-      {
-        addFlowObject(new ComplexGatewayImpl((JAXBComplexGateway)fo));
-      }
-      else if (fo instanceof JAXBParallelGateway)
-      {
-        addFlowObject(new ParallelGatewayImpl((JAXBParallelGateway)fo));
-      }
-      else
-      {
-        throw new InvalidProcessException("Unsupported type: " + fo);
-      }
-    }
-  }
-
-  public String toString()
-  {
-    return "Process[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/ProcessImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,247 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.Future;
+
+import org.jboss.bpm.InvalidProcessException;
+import org.jboss.bpm.client.ExecutionManager;
+import org.jboss.bpm.client.ProcessManager;
+import org.jboss.bpm.model.EndEvent;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.NamedFlowObject;
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.Result;
+import org.jboss.bpm.model.StartEvent;
+import org.jboss.bpm.model.internal.jaxb.JAXBComplexGateway;
+import org.jboss.bpm.model.internal.jaxb.JAXBEndEvent;
+import org.jboss.bpm.model.internal.jaxb.JAXBExclusiveGateway;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlowObject;
+import org.jboss.bpm.model.internal.jaxb.JAXBInclusiveGateway;
+import org.jboss.bpm.model.internal.jaxb.JAXBIntermediateEvent;
+import org.jboss.bpm.model.internal.jaxb.JAXBParallelGateway;
+import org.jboss.bpm.model.internal.jaxb.JAXBProcess;
+import org.jboss.bpm.model.internal.jaxb.JAXBStartEvent;
+import org.jboss.bpm.model.internal.jaxb.JAXBSubProcess;
+import org.jboss.bpm.model.internal.jaxb.JAXBTask;
+import org.jboss.bpm.runtime.Attachments;
+
+/**
+ * A Process is any Activity performed within a company or organization.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class ProcessImpl extends ActivityImpl implements Process
+{
+  private List<FlowObject> flowObjects = new ArrayList<FlowObject>();
+  private ProcessState processState = ProcessState.CREATED;
+
+  public ProcessImpl(String name)
+  {
+    this(new JAXBProcess());
+    setName(name);
+  }
+
+  public ProcessImpl(JAXBProcess delegate)
+  {
+    super(delegate);
+    setProcess(this);
+    adaptFlowObjects(delegate);
+  }
+
+  public void addFlowObject(FlowObjectImpl flowObject)
+  {
+    flowObjects.add(flowObject);
+    JAXBFlowObject jaxb = flowObject.getDelegate();
+    getDelegate().getFlowObjects().add(jaxb);
+  }
+
+  public StartEventImpl getStartEvent()
+  {
+    StartEventImpl start = null;
+    for (FlowObject aux : flowObjects)
+    {
+      if (aux instanceof StartEvent)
+      {
+        start = (StartEventImpl)aux;
+        break;
+      }
+    }
+    return start;
+  }
+
+  public List<EndEvent> getEndEvents()
+  {
+    List<EndEvent> ends = new ArrayList<EndEvent>();
+    for (FlowObject aux : flowObjects)
+    {
+      if (aux instanceof EndEvent)
+      {
+        ends.add((EndEvent)aux);
+      }
+    }
+    return Collections.unmodifiableList(ends);
+  }
+
+  public List<FlowObject> getFlowObjects()
+  {
+
+    if (processState == ProcessState.CREATED)
+      return flowObjects;
+
+    return Collections.unmodifiableList(flowObjects);
+  }
+
+  public Future<Result> startProcess()
+  {
+    return startProcess(null);
+  }
+
+  public Future<Result> startProcess(Attachments att)
+  {
+    if (processState != ProcessState.INITIALIZED)
+      throw new IllegalStateException("Cannot start process in state: " + processState);
+
+    processState = ProcessState.STARTED;
+    ExecutionManager exm = ExecutionManager.locateExecutionManager();
+    return exm.startProcess(this, att);
+  }
+
+  public FlowObject findFlowObject(String name)
+  {
+    if (name == null)
+      throw new IllegalArgumentException("Cannot find flow object with name: null");
+
+    FlowObject nfo = null;
+    for (FlowObject aux : flowObjects)
+    {
+      if (aux instanceof NamedFlowObject)
+      {
+        NamedFlowObject auxnfo = (NamedFlowObject)aux;
+        if (name.equals(auxnfo.getName()))
+        {
+          nfo = aux;
+          break;
+        }
+      }
+    }
+    return nfo;
+  }
+
+  public ProcessState getProcessState()
+  {
+    return processState;
+  }
+
+  /**
+   * Set the process state
+   */
+  public void initialize()
+  {
+    if (processState != ProcessState.CREATED)
+      throw new IllegalStateException("Cannot initialize process in state: " + processState);
+
+    // Set the anonymous default name
+    if (getName() == null)
+    {
+      ProcessManager pm = ProcessManager.locateProcessManager();
+      setName("AnonymousProcess#" + pm.getProcesses().size());
+    }
+
+    if (getStartEvent() == null)
+      throw new InvalidProcessException("Process does not have a start event");
+
+    if (getEndEvents().size() == 0)
+      throw new InvalidProcessException("Process does not have end events");
+
+    // Set the associated process
+    for (FlowObject aux : flowObjects)
+    {
+      ((FlowObjectImpl)aux).initialize(this);
+    }
+
+    processState = ProcessState.INITIALIZED;
+  }
+
+  private void adaptFlowObjects(JAXBProcess delegate)
+  {
+    for (JAXBFlowObject fo : delegate.getFlowObjects())
+    {
+      if (fo instanceof JAXBStartEvent)
+      {
+        flowObjects.add(new StartEventImpl((JAXBStartEvent)fo));
+      }
+      else if (fo instanceof JAXBIntermediateEvent)
+      {
+        flowObjects.add(new IntermediateEventImpl((JAXBIntermediateEvent)fo));
+      }
+      else if (fo instanceof JAXBEndEvent)
+      {
+        flowObjects.add(new EndEventImpl((JAXBEndEvent)fo));
+      }
+      else if (fo instanceof JAXBSubProcess)
+      {
+        flowObjects.add(new SubProcessImpl((JAXBSubProcess)fo));
+      }
+      else if (fo instanceof JAXBTask)
+      {
+        flowObjects.add(new TaskImpl((JAXBTask)fo));
+      }
+      else if (fo instanceof JAXBExclusiveGateway)
+      {
+        flowObjects.add(new ExclusiveGatewayImpl((JAXBExclusiveGateway)fo));
+      }
+      else if (fo instanceof JAXBInclusiveGateway)
+      {
+        flowObjects.add(new InclusiveGatewayImpl((JAXBInclusiveGateway)fo));
+      }
+      else if (fo instanceof JAXBComplexGateway)
+      {
+        flowObjects.add(new ComplexGatewayImpl((JAXBComplexGateway)fo));
+      }
+      else if (fo instanceof JAXBParallelGateway)
+      {
+        flowObjects.add(new ParallelGatewayImpl((JAXBParallelGateway)fo));
+      }
+      else
+      {
+        throw new InvalidProcessException("Unsupported type: " + fo);
+      }
+    }
+  }
+
+  public JAXBProcess getDelegate()
+  {
+    return (JAXBProcess)super.getDelegate();
+  }
+  
+  public String toString()
+  {
+    return "Process[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,48 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.internal.jaxb.JAXBSequenceFlow;
-
-/**
- * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
- * Each Flow has only one source and only one target. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class SequenceFlowImpl extends FlowImpl
-{
-  public SequenceFlowImpl(String targetName)
-  {
-    super(new JAXBSequenceFlow());
-    setTargetName(targetName);
-  }
-  
-  protected SequenceFlowImpl(JAXBSequenceFlow delegate)
-  {
-    super(delegate);
-  }
- 
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SequenceFlowImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,48 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.internal.jaxb.JAXBSequenceFlow;
+
+/**
+ * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
+ * Each Flow has only one source and only one target. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class SequenceFlowImpl extends FlowImpl
+{
+  public SequenceFlowImpl(String targetName)
+  {
+    super(new JAXBSequenceFlow());
+    setTargetName(targetName);
+  }
+  
+  protected SequenceFlowImpl(JAXBSequenceFlow delegate)
+  {
+    super(delegate);
+  }
+ 
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,67 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.internal.jaxb.JAXBSignalHandler;
-
-/**
- * Implement to get signals on enter and exit.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class SignalHandlerImpl extends HandlerImpl implements SignalHandler
-{
-  private SignalHandler handler;
-  
-  public SignalHandlerImpl()
-  {
-    super(new JAXBSignalHandler());
-  }
-
-  public SignalHandlerImpl(JAXBSignalHandler delegate)
-  {
-    super(delegate);
-  }
-  
-  public Signal getEnterSignal()
-  {
-    if (handler == null)
-    {
-      handler = newInstance(SignalHandlerImpl.class);
-    }
-    return handler.getEnterSignal();
-  }
-
-  public Signal getExitSignal()
-  {
-    if (handler == null)
-    {
-      handler = newInstance(SignalHandlerImpl.class);
-    }
-    return handler.getExitSignal();
-  }
-}

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SignalHandlerImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,72 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.internal.jaxb.JAXBSignalHandler;
+
+/**
+ * Implement to get signals on enter and exit.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class SignalHandlerImpl extends HandlerImpl implements SignalHandler
+{
+  private SignalHandler handler;
+  
+  public SignalHandlerImpl()
+  {
+    super(new JAXBSignalHandler());
+  }
+
+  public SignalHandlerImpl(JAXBSignalHandler delegate)
+  {
+    super(delegate);
+  }
+  
+  public Signal getEnterSignal()
+  {
+    if (handler == null)
+    {
+      handler = newInstance(SignalHandler.class);
+    }
+    return handler.getEnterSignal();
+  }
+
+  public Signal getExitSignal()
+  {
+    if (handler == null)
+    {
+      handler = newInstance(SignalHandler.class);
+    }
+    return handler.getExitSignal();
+  }
+
+  public static SignalHandler adaptHandler(JAXBSignalHandler jaxb)
+  {
+    return jaxb != null ? new SignalHandlerImpl(jaxb) : null;
+  }
+}

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,117 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.StartEvent;
-import org.jboss.bpm.model.internal.jaxb.JAXBStartEvent;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * A Start Event indicates where a particular Process will start. In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any
- * incoming Sequence Flow. A Start Event can have a Trigger that indicates how the Process starts: Message, Timer, Rule, Link, or Multiple.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class StartEventImpl extends EventImpl implements StartEvent
-{
-  // provide logging
-  private static final Log log = LogFactory.getLog(StartEventImpl.class);
-
-  private Flow outFlow;
-
-  public StartEventImpl()
-  {
-    this(new JAXBStartEvent());
-  }
-
-  public StartEventImpl(JAXBStartEvent delegate)
-  {
-    super(delegate);
-    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
-  }
-
-  public Flow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  public void setOutFlow(Flow flow)
-  {
-    this.outFlow = flow;
-  }
-
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(outFlow);
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject start = this;
-    return new SignalHandlerImpl()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(start, Signal.Type.ENTER_START_EVENT);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(start, Signal.Type.EXIT_START_EVENT);
-      }
-    };
-  }
-
-  public ExecutionHandlerImpl getDefaultExecutionHandler()
-  {
-    return new ExecutionHandlerImpl()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in start-event");
-      }
-    };
-  }
-
-  public String toString()
-  {
-    return "StartEvent[]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,125 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.StartEvent;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBStartEvent;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * A Start Event indicates where a particular Process will start. In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any
+ * incoming Sequence Flow. A Start Event can have a Trigger that indicates how the Process starts: Message, Timer, Rule, Link, or Multiple.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class StartEventImpl extends EventImpl implements StartEvent
+{
+  // provide logging
+  private static final Log log = LogFactory.getLog(StartEventImpl.class);
+
+  private Flow outFlow;
+
+  public StartEventImpl()
+  {
+    this(new JAXBStartEvent());
+  }
+
+  public StartEventImpl(JAXBStartEvent delegate)
+  {
+    super(delegate);
+    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
+  }
+
+  public Flow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  public void setOutFlow(Flow flow)
+  {
+    this.outFlow = flow;
+    JAXBFlow jaxb = ((FlowImpl)flow).getDelegate();
+    getDelegate().setOutFlow(jaxb);
+  }
+
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        token.addTailFlow(outFlow);
+      }
+    };
+  }
+
+  public SignalHandler getDefaultSignalHandler()
+  {
+    final FlowObject start = this;
+    return new SignalHandlerImpl()
+    {
+      public Signal getEnterSignal()
+      {
+        return new Signal(start, Signal.Type.ENTER_START_EVENT);
+      }
+
+      public Signal getExitSignal()
+      {
+        return new Signal(start, Signal.Type.EXIT_START_EVENT);
+      }
+    };
+  }
+
+  public ExecutionHandlerImpl getDefaultExecutionHandler()
+  {
+    return new ExecutionHandlerImpl()
+    {
+      @Override
+      public void execute(Token token)
+      {
+        log.debug("Nothing to do in start-event");
+      }
+    };
+  }
+
+  protected JAXBStartEvent getDelegate()
+  {
+    return (JAXBStartEvent)super.getDelegate();
+  }
+
+  public String toString()
+  {
+    return "StartEvent[]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,160 +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.jboss.bpm.model.internal;
-
-//$Id$
-
-import org.jboss.bpm.model.ExecutionHandler;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.SubProcess;
-import org.jboss.bpm.model.internal.jaxb.JAXBSubProcess;
-import org.jboss.bpm.runtime.Token;
-
-/**
- * A Sub-Process is Process that is included within another Process.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class SubProcessImpl extends ProcessImpl implements SubProcess
-{
-  private Flow inFlow;
-  private Flow outFlow;
-  private ExecutionHandler executionHandler;
-  private FlowHandler flowHandler;
-  private SignalHandler signalHandler;
-
-  public SubProcessImpl(String name)
-  {
-    this(new JAXBSubProcess());
-    setName(name);
-  }
-
-  public SubProcessImpl(JAXBSubProcess delegate)
-  {
-    super(delegate);
-    executionHandler = new ExecutionHandlerImpl(delegate.getExecutionHandler());
-    flowHandler = new FlowHandlerImpl(delegate.getFlowHandler());
-    signalHandler = new SignalHandlerImpl(delegate.getSignalHandler());
-    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
-  }
-
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-
-  public Flow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  public void setOutFlow(Flow outFlow)
-  {
-    this.outFlow = outFlow;
-  }
-
-  public ExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  public void setExecutionHandler(ExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  public FlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  public void setFlowHandler(FlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  public SignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  public void setSignalHandler(SignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(outFlow);
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject subproc = this;
-    return new SignalHandlerImpl()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(subproc, Signal.Type.ENTER_SUB_PROCESS);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(subproc, Signal.Type.EXIT_SUB_PROCESS);
-      }
-    };
-  }
-
-  public ExecutionHandlerImpl getDefaultExecutionHandler()
-  {
-    return new ExecutionHandlerImpl()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        startProcess(token.getExecutionContext());
-      }
-    };
-  }
-
-  public String toString()
-  {
-    return "SubProcess[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/SubProcessImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,168 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+//$Id$
+
+import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.SubProcess;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBSubProcess;
+import org.jboss.bpm.runtime.Token;
+
+/**
+ * A Sub-Process is Process that is included within another Process.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class SubProcessImpl extends ProcessImpl implements SubProcess
+{
+  private Flow inFlow;
+  private Flow outFlow;
+  private ExecutionHandler executionHandler;
+  private FlowHandler flowHandler;
+  private SignalHandler signalHandler;
+
+  public SubProcessImpl(String name)
+  {
+    this(new JAXBSubProcess());
+    setName(name);
+  }
+
+  public SubProcessImpl(JAXBSubProcess delegate)
+  {
+    super(delegate);
+    executionHandler = ExecutionHandlerImpl.adaptHandler(delegate.getExecutionHandler());
+    flowHandler = FlowHandlerImpl.adaptHandler(delegate.getFlowHandler());
+    signalHandler = SignalHandlerImpl.adaptHandler(delegate.getSignalHandler());
+    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
+  }
+
+  public Flow getInFlow()
+  {
+    return inFlow;
+  }
+
+  public void setInFlow(Flow inFlow)
+  {
+    this.inFlow = inFlow;
+  }
+
+  public Flow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  public void setOutFlow(Flow flow)
+  {
+    this.outFlow = flow;
+    JAXBFlow jaxb = ((FlowImpl)flow).getDelegate();
+    getDelegate().setOutFlow(jaxb);
+  }
+
+  public ExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  public void setExecutionHandler(ExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  public FlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  public void setFlowHandler(FlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  public SignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  public void setSignalHandler(SignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        token.addTailFlow(outFlow);
+      }
+    };
+  }
+
+  public SignalHandler getDefaultSignalHandler()
+  {
+    final FlowObject subproc = this;
+    return new SignalHandlerImpl()
+    {
+      public Signal getEnterSignal()
+      {
+        return new Signal(subproc, Signal.Type.ENTER_SUB_PROCESS);
+      }
+
+      public Signal getExitSignal()
+      {
+        return new Signal(subproc, Signal.Type.EXIT_SUB_PROCESS);
+      }
+    };
+  }
+
+  public ExecutionHandlerImpl getDefaultExecutionHandler()
+  {
+    return new ExecutionHandlerImpl()
+    {
+      @Override
+      public void execute(Token token)
+      {
+        startProcess(token.getExecutionContext());
+      }
+    };
+  }
+
+  public JAXBSubProcess getDelegate()
+  {
+    return (JAXBSubProcess)super.getDelegate();
+  }
+  
+  public String toString()
+  {
+    return "SubProcess[" + getName() + "]";
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,174 +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.jboss.bpm.model.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.ExecutionHandler;
-import org.jboss.bpm.model.Flow;
-import org.jboss.bpm.model.FlowHandler;
-import org.jboss.bpm.model.FlowObject;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.SignalHandler;
-import org.jboss.bpm.model.Task;
-import org.jboss.bpm.model.internal.jaxb.JAXBTask;
-import org.jboss.bpm.runtime.Token;
-
-//$Id$
-
-/**
- * A Task is an Atomic Activity that is included within a Process.
- * 
- * A Task is used when the work in the Process is not broken down to a finer level of Process Model detail. Generally, an end-user and/or an application are used to
- * perform the Task when it is executed.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class TaskImpl extends ActivityImpl implements Task
-{
-  // provide logging
-  private static final Log log = LogFactory.getLog(TaskImpl.class);
- 
-  private Flow inFlow;
-  private Flow outFlow;
-  private ExecutionHandler executionHandler;
-  private FlowHandler flowHandler;
-  private SignalHandler signalHandler;
-
-  public TaskImpl(String name)
-  {
-    this(new JAXBTask());
-    setName(name);
-  }
-  
-  public TaskImpl(JAXBTask delegate)
-  {
-    super(delegate);
-    executionHandler = new ExecutionHandlerImpl(delegate.getExecutionHandler());
-    flowHandler = new FlowHandlerImpl(delegate.getFlowHandler());
-    signalHandler = new SignalHandlerImpl(delegate.getSignalHandler());
-    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
-  }
-
-  /**
-   * Get the out flow
-   */
-  public Flow getInFlow()
-  {
-    return inFlow;
-  }
-  
-  /**
-   * Set the in flow
-   */
-  public void setInFlow(Flow inFlow)
-  {
-    this.inFlow = inFlow;
-  }
-  
-  public Flow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  public void setOutFlow(Flow flow)
-  {
-    this.outFlow = flow;
-  }
-  
-  public ExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  public void setExecutionHandler(ExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  public FlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  public void setFlowHandler(FlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  public SignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  public void setSignalHandler(SignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-
-  public FlowHandler getDefaultFlowHandler()
-  {
-    return new FlowHandlerImpl()
-    {
-      @Override
-      public void transfer(Token token)
-      {
-        token.addTailFlow(outFlow);
-      }
-    };
-  }
-
-  public SignalHandler getDefaultSignalHandler()
-  {
-    final FlowObject task = this;
-    return new SignalHandlerImpl()
-    {
-      public Signal getEnterSignal()
-      {
-        return new Signal(task, Signal.Type.ENTER_TASK);
-      }
-
-      public Signal getExitSignal()
-      {
-        return new Signal(task, Signal.Type.EXIT_TASK);
-      }
-    };
-  }
-
-  public ExecutionHandlerImpl getDefaultExecutionHandler()
-  {
-    return new ExecutionHandlerImpl()
-    {
-      @Override
-      public void execute(Token token)
-      {
-        log.debug("Nothing to do in task: " + getName());
-      }
-    };
-  }
-  
-  public String toString()
-  {
-    return "Task[" + getName() + "]";
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/TaskImpl.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,182 @@
+/*
+ * 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.jboss.bpm.model.internal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.FlowHandler;
+import org.jboss.bpm.model.FlowObject;
+import org.jboss.bpm.model.Signal;
+import org.jboss.bpm.model.SignalHandler;
+import org.jboss.bpm.model.Task;
+import org.jboss.bpm.model.internal.jaxb.JAXBFlow;
+import org.jboss.bpm.model.internal.jaxb.JAXBTask;
+import org.jboss.bpm.runtime.Token;
+
+//$Id$
+
+/**
+ * A Task is an Atomic Activity that is included within a Process.
+ * 
+ * A Task is used when the work in the Process is not broken down to a finer level of Process Model detail. Generally, an end-user and/or an application are used to
+ * perform the Task when it is executed.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class TaskImpl extends ActivityImpl implements Task
+{
+  // provide logging
+  private static final Log log = LogFactory.getLog(TaskImpl.class);
+ 
+  private Flow inFlow;
+  private Flow outFlow;
+  private ExecutionHandler executionHandler;
+  private FlowHandler flowHandler;
+  private SignalHandler signalHandler;
+
+  public TaskImpl(String name)
+  {
+    this(new JAXBTask());
+    setName(name);
+  }
+  
+  public TaskImpl(JAXBTask delegate)
+  {
+    super(delegate);
+    executionHandler = ExecutionHandlerImpl.adaptHandler(delegate.getExecutionHandler());
+    flowHandler = FlowHandlerImpl.adaptHandler(delegate.getFlowHandler());
+    signalHandler = SignalHandlerImpl.adaptHandler(delegate.getSignalHandler());
+    outFlow = FlowImpl.adaptFlow(delegate.getOutFlow());
+  }
+
+  /**
+   * Get the out flow
+   */
+  public Flow getInFlow()
+  {
+    return inFlow;
+  }
+  
+  /**
+   * Set the in flow
+   */
+  public void setInFlow(Flow inFlow)
+  {
+    this.inFlow = inFlow;
+  }
+  
+  public Flow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  public void setOutFlow(Flow flow)
+  {
+    this.outFlow = flow;
+    JAXBFlow jaxb = ((FlowImpl)flow).getDelegate();
+    getDelegate().setOutFlow(jaxb);
+  }
+  
+  public ExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  public void setExecutionHandler(ExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  public FlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  public void setFlowHandler(FlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  public SignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  public void setSignalHandler(SignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+
+  public FlowHandler getDefaultFlowHandler()
+  {
+    return new FlowHandlerImpl()
+    {
+      @Override
+      public void transfer(Token token)
+      {
+        token.addTailFlow(outFlow);
+      }
+    };
+  }
+
+  public SignalHandler getDefaultSignalHandler()
+  {
+    final FlowObject task = this;
+    return new SignalHandlerImpl()
+    {
+      public Signal getEnterSignal()
+      {
+        return new Signal(task, Signal.Type.ENTER_TASK);
+      }
+
+      public Signal getExitSignal()
+      {
+        return new Signal(task, Signal.Type.EXIT_TASK);
+      }
+    };
+  }
+
+  public ExecutionHandler getDefaultExecutionHandler()
+  {
+    return new ExecutionHandlerImpl()
+    {
+      @Override
+      public void execute(Token token)
+      {
+        log.debug("Nothing to do in task: " + getName());
+      }
+    };
+  }
+  
+  protected JAXBTask getDelegate()
+  {
+    return (JAXBTask)super.getDelegate();
+  }
+
+  public String toString()
+  {
+    return "Task[" + getName() + "]";
+  }
+}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb)

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,60 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * An activity is a generic term for work that a company or organization performs via business processes. 
- * An activity can be atomic or non-atomic (compound). 
- * The types of activities that are a part of a Process Model are: Process, Sub-Process, and Task. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="Activity")
-public class JAXBActivity extends JAXBFlowObject
-{
-  private String name;
-  
-  /**
-   * Get the name
-   */
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * Set the name. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  @XmlAttribute(required = true)
-  public void setName(String name)
-  {
-    this.name = name;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBActivity.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,60 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * An activity is a generic term for work that a company or organization performs via business processes. 
+ * An activity can be atomic or non-atomic (compound). 
+ * The types of activities that are a part of a Process Model are: Process, Sub-Process, and Task. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="Activity")
+public class JAXBActivity extends JAXBFlowObject
+{
+  private String name;
+  
+  /**
+   * Get the name
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Set the name. 
+   * Note, this MUST NOT leak into the public API.
+   */
+  @XmlAttribute(required = true)
+  public void setName(String name)
+  {
+    this.name = name;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,42 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlType;
-
-
-// $Id$
-
-/**
- * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. 
- * 
- * Complex Gateways can also be used to combine a set of linked simple Gateways into a single, 
- * more compact situation. Modelers can provide complex expressions that determine the merging and/or 
- * splitting behavior of the Gateway. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="ComplexGateway")
-public class JAXBComplexGateway extends JAXBGateway
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBComplexGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,42 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+// $Id$
+
+/**
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. 
+ * 
+ * Complex Gateways can also be used to combine a set of linked simple Gateways into a single, 
+ * more compact situation. Modelers can provide complex expressions that determine the merging and/or 
+ * splitting behavior of the Gateway. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="ComplexGateway")
+public class JAXBComplexGateway extends JAXBGateway
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,60 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-// $Id$
-
-/**
- * As the name implies, the End Event indicates where a Process will end.
- * 
- * In terms of Sequence Flow, the End Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flow. An End Event can have a specific Result
- * that will appear as a marker within the center of the End Event shape. End Event Results are Message, Error, Compensation, Link, and Multiple.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "EndEvent")
-public class JAXBEndEvent extends JAXBEvent
-{
-  private String name;
-
-  /**
-   * Get the name
-   */
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * Set the name. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  @XmlAttribute(required = true)
-  public void setName(String name)
-  {
-    this.name = name;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEndEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,60 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+// $Id$
+
+/**
+ * As the name implies, the End Event indicates where a Process will end.
+ * 
+ * In terms of Sequence Flow, the End Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flow. An End Event can have a specific Result
+ * that will appear as a marker within the center of the End Event shape. End Event Results are Message, Error, Compensation, Link, and Multiple.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "EndEvent")
+public class JAXBEndEvent extends JAXBEvent
+{
+  private String name;
+
+  /**
+   * Get the name
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Set the name. 
+   * Note, this MUST NOT leak into the public API.
+   */
+  @XmlAttribute(required = true)
+  public void setName(String name)
+  {
+    this.name = name;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,92 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * An Event is something that “happens” during the course of a business process. These Events affect the flow of the Process and usually have a cause or an impact.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "AbstractEvent")
-public class JAXBEvent extends JAXBFlowObject
-{
-  private JAXBExecutionHandler executionHandler;
-  private JAXBFlowHandler flowHandler;
-  private JAXBSignalHandler signalHandler;
-
-  /**
-   * Get the ExecutionHandler for this Event
-   */
-  public JAXBExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  /**
-   * Set the ExecutionHandler for this Event
-   */
-  @XmlElement(name = "execution-handler", required = false)
-  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  /**
-   * Get the FlowHandler for this Event
-   */
-  public JAXBFlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  /**
-   * Set the FlowHandler for this Event
-   */
-  @XmlElement(name = "flow-handler", required = false)
-  public void setFlowHandler(JAXBFlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  /**
-   * Get the SignalHandler for this Event
-   */
-  public JAXBSignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  /**
-   * Set the SignalHandler for this Event
-   */
-  @XmlElement(name = "signal-handler", required = false)
-  public void setSignalHandler(JAXBSignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,92 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * An Event is something that “happens” during the course of a business process. These Events affect the flow of the Process and usually have a cause or an impact.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "AbstractEvent")
+public class JAXBEvent extends JAXBFlowObject
+{
+  private JAXBExecutionHandler executionHandler;
+  private JAXBFlowHandler flowHandler;
+  private JAXBSignalHandler signalHandler;
+
+  /**
+   * Get the ExecutionHandler for this Event
+   */
+  public JAXBExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  /**
+   * Set the ExecutionHandler for this Event
+   */
+  @XmlElement(name = "execution-handler", required = false)
+  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  /**
+   * Get the FlowHandler for this Event
+   */
+  public JAXBFlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  /**
+   * Set the FlowHandler for this Event
+   */
+  @XmlElement(name = "flow-handler", required = false)
+  public void setFlowHandler(JAXBFlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  /**
+   * Get the SignalHandler for this Event
+   */
+  public JAXBSignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  /**
+   * Set the SignalHandler for this Event
+   */
+  @XmlElement(name = "signal-handler", required = false)
+  public void setSignalHandler(JAXBSignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,38 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="ExclusiveGateway")
-public class JAXBExclusiveGateway extends JAXBGateway
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExclusiveGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,38 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="ExclusiveGateway")
+public class JAXBExclusiveGateway extends JAXBGateway
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,38 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * Implement to make the FlowObject executable
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "ExecutionHandler")
-public class JAXBExecutionHandler extends JAXBHandler
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBExecutionHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,38 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Implement to make the FlowObject executable
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "ExecutionHandler")
+public class JAXBExecutionHandler extends JAXBHandler
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,74 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-// $Id$
-
-/**
- * A Flow is a graphical line connecting two objects in a BPD.
- * 
- * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also used in a generic sense (and lowercase) to describe how
- * Tokens will traverse Sequence Flow from the Start Event to an End Event.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Flow")
-public class JAXBFlow
-{
-  private String name;
-  private String targetName;
-
-  /* (non-Javadoc)
-   * @see org.jboss.bpm.model.xxx#getName()
-   */
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * Set the optional name Note, this MUST NOT leak into the public API.
-   */
-  @XmlAttribute(required = false)
-  public void setName(String name)
-  {
-    this.name = name;
-  }
-
-  public String getTargetName()
-  {
-    return targetName;
-  }
-
-  /**
-   * Set the target name Note, this MUST NOT leak into the public API.
-   */
-  @XmlAttribute(name = "to", required = true)
-  public void setTargetName(String targetName)
-  {
-    this.targetName = targetName;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,68 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+// $Id$
+
+/**
+ * A Flow is a graphical line connecting two objects in a BPD.
+ * 
+ * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. Flow is also used in a generic sense (and lowercase) to describe how
+ * Tokens will traverse Sequence Flow from the Start Event to an End Event.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "Flow")
+public class JAXBFlow
+{
+  private String name;
+  private String targetName;
+
+  public String getName()
+  {
+    return name;
+  }
+
+  @XmlAttribute(required = false)
+  public void setName(String name)
+  {
+    this.name = name;
+  }
+
+  public String getTargetName()
+  {
+    return targetName;
+  }
+
+  /**
+   * Set the target name Note, this MUST NOT leak into the public API.
+   */
+  @XmlAttribute(name = "to", required = true)
+  public void setTargetName(String targetName)
+  {
+    this.targetName = targetName;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,38 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "FlowHandler")
-public class JAXBFlowHandler extends JAXBHandler
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,38 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Implement to handle the outgoing Flows for an FlowObject
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "FlowHandler")
+public class JAXBFlowHandler extends JAXBHandler
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,38 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id: $
-
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "FlowObject")
-public class JAXBFlowObject
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBFlowObject.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,38 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id: $
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "FlowObject")
+public class JAXBFlowObject
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,130 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. If the flow does not need to be
- * controlled, then a Gateway is not needed.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Gateway")
-public class JAXBGateway extends JAXBFlowObject
-{
-  private String name;
-  private JAXBExecutionHandler executionHandler;
-  private JAXBFlowHandler flowHandler;
-  private JAXBSignalHandler signalHandler;
-  
-  @XmlElements( { 
-    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
-    @XmlElement(name = "message", type = JAXBMessageFlow.class) 
-    })
-  private List<JAXBFlow> outFlows = new ArrayList<JAXBFlow>();
-  
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * Set the name. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  @XmlAttribute(required = true)
-  public void setName(String name)
-  {
-    this.name = name;
-  }
-  
-  public List<JAXBFlow> getOutFlows()
-  {
-    return outFlows;
-  }
-
-  public void setOutFlow(List<JAXBFlow> outFlow)
-  {
-    this.outFlows = outFlow;
-  }
-
-  /**
-   * Get the ExecutionHandler for this Event
-   */
-  public JAXBExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  /**
-   * Set the ExecutionHandler for this Event
-   */
-  @XmlElement(name = "execution-handler", required = false)
-  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  /**
-   * Get the FlowHandler for this Event
-   */
-  public JAXBFlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  /**
-   * Set the FlowHandler for this Event
-   */
-  @XmlElement(name = "flow-handler", required = false)
-  public void setFlowHandler(JAXBFlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  /**
-   * Get the SignalHandler for this Event
-   */
-  public JAXBSignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  /**
-   * Set the SignalHandler for this Event
-   */
-  @XmlElement(name = "signal-handler", required = false)
-  public void setSignalHandler(JAXBSignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,130 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. If the flow does not need to be
+ * controlled, then a Gateway is not needed.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "Gateway")
+public class JAXBGateway extends JAXBFlowObject
+{
+  private String name;
+  private JAXBExecutionHandler executionHandler;
+  private JAXBFlowHandler flowHandler;
+  private JAXBSignalHandler signalHandler;
+  
+  @XmlElements( { 
+    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
+    @XmlElement(name = "message", type = JAXBMessageFlow.class) 
+    })
+  private List<JAXBFlow> outFlows = new ArrayList<JAXBFlow>();
+  
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Set the name. 
+   * Note, this MUST NOT leak into the public API.
+   */
+  @XmlAttribute(required = true)
+  public void setName(String name)
+  {
+    this.name = name;
+  }
+  
+  public List<JAXBFlow> getOutFlows()
+  {
+    return outFlows;
+  }
+
+  public void setOutFlow(List<JAXBFlow> outFlow)
+  {
+    this.outFlows = outFlow;
+  }
+
+  /**
+   * Get the ExecutionHandler for this Event
+   */
+  public JAXBExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  /**
+   * Set the ExecutionHandler for this Event
+   */
+  @XmlElement(name = "execution-handler", required = false)
+  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  /**
+   * Get the FlowHandler for this Event
+   */
+  public JAXBFlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  /**
+   * Set the FlowHandler for this Event
+   */
+  @XmlElement(name = "flow-handler", required = false)
+  public void setFlowHandler(JAXBFlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  /**
+   * Get the SignalHandler for this Event
+   */
+  public JAXBSignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  /**
+   * Set the SignalHandler for this Event
+   */
+  @XmlElement(name = "signal-handler", required = false)
+  public void setSignalHandler(JAXBSignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,89 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.bpm.NotImplementedException;
-
-/**
- * Implement to handle the outgoing Flows for an FlowObject
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Handler")
-public abstract class JAXBHandler
-{
-  private String className;
-  private String beanRef;
-
-  public String getClassName()
-  {
-    return className;
-  }
-
-  @XmlAttribute(name = "class", required = false)
-  public void setClassName(String className)
-  {
-    this.className = className;
-  }
-
-  public String getBeanRef()
-  {
-    return beanRef;
-  }
-
-  @XmlAttribute(name = "bean", required = false)
-  public void setBeanRef(String beanRef)
-  {
-    this.beanRef = beanRef;
-  }
-  
-  @SuppressWarnings("unchecked")
-  public <T> T newInstance(Class<T> clazz)
-  {
-    try
-    {
-      if (className != null)
-      {
-        ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-        return (T)ctxLoader.loadClass(className).newInstance();
-      }
-      else if (beanRef != null)
-      {
-        throw new NotImplementedException();
-      }
-      else
-      {
-        throw new IllegalStateException("There is no 'class' nor 'bean' attribute set for this handler");
-      }
-    }
-    catch (Exception ex)
-    {
-      throw new IllegalStateException("Cannot instanciate the handler", ex);
-    }
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,89 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.bpm.NotImplementedException;
+
+/**
+ * Implement to handle the outgoing Flows for an FlowObject
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "Handler")
+public abstract class JAXBHandler
+{
+  private String className;
+  private String beanRef;
+
+  public String getClassName()
+  {
+    return className;
+  }
+
+  @XmlAttribute(name = "class", required = false)
+  public void setClassName(String className)
+  {
+    this.className = className;
+  }
+
+  public String getBeanRef()
+  {
+    return beanRef;
+  }
+
+  @XmlAttribute(name = "bean", required = false)
+  public void setBeanRef(String beanRef)
+  {
+    this.beanRef = beanRef;
+  }
+  
+  @SuppressWarnings("unchecked")
+  public <T> T newInstance(Class<T> clazz)
+  {
+    try
+    {
+      if (className != null)
+      {
+        ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+        return (T)ctxLoader.loadClass(className).newInstance();
+      }
+      else if (beanRef != null)
+      {
+        throw new NotImplementedException();
+      }
+      else
+      {
+        throw new IllegalStateException("There is no 'class' nor 'bean' attribute set for this handler");
+      }
+    }
+    catch (Exception ex)
+    {
+      throw new IllegalStateException("Cannot instanciate the handler", ex);
+    }
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,40 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlType;
-
-
-// $Id$
-
-/**
- * This Decision represents a branching point where Alternatives are based on conditional expressions contained within outgoing Sequence Flow. 
- * However, in this case, the True evaluation of one condition expression does not exclude the evaluation of other condition expressions. 
- * All Sequence Flow with a True evaluation will be traversed by a Token. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="InclusiveGateway")
-public class JAXBInclusiveGateway extends JAXBGateway
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBInclusiveGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,40 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+// $Id$
+
+/**
+ * This Decision represents a branching point where Alternatives are based on conditional expressions contained within outgoing Sequence Flow. 
+ * However, in this case, the True evaluation of one condition expression does not exclude the evaluation of other condition expressions. 
+ * All Sequence Flow with a True evaluation will be traversed by a Token. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="InclusiveGateway")
+public class JAXBInclusiveGateway extends JAXBGateway
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,80 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlType;
-
-
-// $Id$
-
-/**
- * An Intermediate Event is an Event that occurs after a Process has been started. 
- * 
- * It will affect the Flow of the Process, but will not start or (directly) terminate the Process. 
- * An Intermediate Event will show where messages or delays are expected within the Process, 
- * disrupt the Normal Flow through exception handling, or show the extra flow required for compensating a transaction.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="ItermediateEvent")
-public class JAXBIntermediateEvent extends JAXBEvent
-{
-  private String name;
-  
-  @XmlElements( { 
-    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
-    @XmlElement(name = "message", type = JAXBMessageFlow.class) 
-    })
-  private JAXBFlow outFlow;
-  
-  public String getName()
-  {
-    return name;
-  }
-
-  /**
-   * Set the name. 
-   * Note, this MUST NOT leak into the public API.
-   */
-  @XmlAttribute(required = true)
-  public void setName(String name)
-  {
-    if (this.name != null)
-      throw new IllegalStateException("Cannot rename: " + name);
-
-    this.name = name;
-  }
-  
-  public JAXBFlow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  public void setOutFlow(JAXBFlow outFlow)
-  {
-    this.outFlow = outFlow;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBIntermediateEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,82 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+
+// $Id$
+
+/**
+ * An Intermediate Event is an Event that occurs after a Process has been started. 
+ * 
+ * It will affect the Flow of the Process, but will not start or (directly) terminate the Process. 
+ * An Intermediate Event will show where messages or delays are expected within the Process, 
+ * disrupt the Normal Flow through exception handling, or show the extra flow required for compensating a transaction.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="ItermediateEvent")
+public class JAXBIntermediateEvent extends JAXBEvent
+{
+  private String name;
+  
+  @XmlElements( { 
+    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
+    @XmlElement(name = "message", type = JAXBMessageFlow.class) 
+    })
+  private JAXBFlow outFlow;
+  
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Set the name. 
+   * Note, this MUST NOT leak into the public API.
+   */
+  @XmlAttribute(required = true)
+  public void setName(String name)
+  {
+    if (this.name != null)
+      throw new IllegalStateException("Cannot rename: " + name);
+
+    this.name = name;
+  }
+  
+  public JAXBFlow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  @XmlTransient
+  public void setOutFlow(JAXBFlow outFlow)
+  {
+    this.outFlow = outFlow;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,39 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
- * Each Flow has only one source and only one target. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="MessageFlow")
-public class JAXBMessageFlow extends JAXBFlow
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBMessageFlow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,39 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
+ * Each Flow has only one source and only one target. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="MessageFlow")
+public class JAXBMessageFlow extends JAXBFlow
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,38 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlType;
-
-
-// $Id$
-
-/**
- * Parallel Gateway is required when two or more Activities need to be executed in parallel.  
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="ParallelGateway")
-public class JAXBParallelGateway extends JAXBGateway
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBParallelGateway.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,38 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+// $Id$
+
+/**
+ * Parallel Gateway is required when two or more Activities need to be executed in parallel.  
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="ParallelGateway")
+public class JAXBParallelGateway extends JAXBGateway
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,64 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * A Process is any Activity performed within a company or organization.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Process")
- at XmlRootElement(name = "process")
-public class JAXBProcess extends JAXBActivity
-{
-  @XmlElements( { 
-    @XmlElement(name = "start", type = JAXBStartEvent.class), 
-    @XmlElement(name = "event", type = JAXBIntermediateEvent.class), 
-    @XmlElement(name = "task", type = JAXBTask.class),
-    @XmlElement(name = "exclusive-gateway", type = JAXBExclusiveGateway.class),
-    @XmlElement(name = "inclusive-gateway", type = JAXBInclusiveGateway.class),
-    @XmlElement(name = "complex-gateway", type = JAXBComplexGateway.class),
-    @XmlElement(name = "parallel-gateway", type = JAXBParallelGateway.class),
-    @XmlElement(name = "sub-process", type = JAXBSubProcess.class), 
-    @XmlElement(name = "end", type = JAXBEndEvent.class) 
-    })
-  private List<JAXBFlowObject> flowObjects = new ArrayList<JAXBFlowObject>();
-
-  /**
-   * Get the list of flow objects
-   */
-  public List<JAXBFlowObject> getFlowObjects()
-  {
-    return flowObjects;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBProcess.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,64 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A Process is any Activity performed within a company or organization.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "Process")
+ at XmlRootElement(name = "process")
+public class JAXBProcess extends JAXBActivity
+{
+  @XmlElements( { 
+    @XmlElement(name = "start", type = JAXBStartEvent.class), 
+    @XmlElement(name = "event", type = JAXBIntermediateEvent.class), 
+    @XmlElement(name = "task", type = JAXBTask.class),
+    @XmlElement(name = "exclusive-gateway", type = JAXBExclusiveGateway.class),
+    @XmlElement(name = "inclusive-gateway", type = JAXBInclusiveGateway.class),
+    @XmlElement(name = "complex-gateway", type = JAXBComplexGateway.class),
+    @XmlElement(name = "parallel-gateway", type = JAXBParallelGateway.class),
+    @XmlElement(name = "sub-process", type = JAXBSubProcess.class), 
+    @XmlElement(name = "end", type = JAXBEndEvent.class) 
+    })
+  private List<JAXBFlowObject> flowObjects = new ArrayList<JAXBFlowObject>();
+
+  /**
+   * Get the list of flow objects
+   */
+  public List<JAXBFlowObject> getFlowObjects()
+  {
+    return flowObjects;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,39 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
- * Each Flow has only one source and only one target. 
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name="SequenceFlow")
-public class JAXBSequenceFlow extends JAXBFlow
-{
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSequenceFlow.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,39 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
+ * Each Flow has only one source and only one target. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name="SequenceFlow")
+public class JAXBSequenceFlow extends JAXBFlow
+{
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,39 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlType;
-
-
-
-//$Id$
-
-/**
- * Implement to get signals on enter and exit.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "SignalHandler")
-public class JAXBSignalHandler extends JAXBHandler
-{
-}

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSignalHandler.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,39 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+
+//$Id$
+
+/**
+ * Implement to get signals on enter and exit.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "SignalHandler")
+public class JAXBSignalHandler extends JAXBHandler
+{
+}

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,56 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * A Start Event indicates where a particular Process will start. In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any
- * incoming Sequence Flow. A Start Event can have a Trigger that indicates how the Process starts: Message, Timer, Rule, Link, or Multiple.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "AbstractStartEvent")
-public class JAXBStartEvent extends JAXBEvent
-{
-  @XmlElements( { 
-    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
-    @XmlElement(name = "message", type = JAXBMessageFlow.class) })
-  private JAXBFlow outFlow;
-
-  public JAXBFlow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  @XmlTransient
-  public void setOutFlow(JAXBFlow outFlow)
-  {
-    this.outFlow = outFlow;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBStartEvent.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,56 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A Start Event indicates where a particular Process will start. In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any
+ * incoming Sequence Flow. A Start Event can have a Trigger that indicates how the Process starts: Message, Timer, Rule, Link, or Multiple.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "AbstractStartEvent")
+public class JAXBStartEvent extends JAXBEvent
+{
+  @XmlElements( { 
+    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
+    @XmlElement(name = "message", type = JAXBMessageFlow.class) })
+  private JAXBFlow outFlow;
+
+  public JAXBFlow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  @XmlTransient
+  public void setOutFlow(JAXBFlow outFlow)
+  {
+    this.outFlow = outFlow;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,110 +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.jboss.bpm.model.internal.jaxb;
-
-//$Id$
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * A Sub-Process is Process that is included within another Process.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "SubProcess")
-public class JAXBSubProcess extends JAXBProcess
-{
-  private JAXBExecutionHandler executionHandler;
-  private JAXBFlowHandler flowHandler;
-  private JAXBSignalHandler signalHandler;
-
-  @XmlElements( { 
-    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
-    @XmlElement(name = "message", type = JAXBMessageFlow.class) })
-  private JAXBFlow outFlow;
-
-  public JAXBFlow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  @XmlTransient
-  public void setOutFlow(JAXBFlow outFlow)
-  {
-    this.outFlow = outFlow;
-  }
-
-  /**
-   * Get the ExecutionHandler for this Event
-   */
-  public JAXBExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  /**
-   * Set the ExecutionHandler for this Event
-   */
-  @XmlElement(name = "execution-handler", required = false)
-  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  /**
-   * Get the FlowHandler for this Event
-   */
-  public JAXBFlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  /**
-   * Set the FlowHandler for this Event
-   */
-  @XmlElement(name = "flow-handler", required = false)
-  public void setFlowHandler(JAXBFlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  /**
-   * Get the SignalHandler for this Event
-   */
-  public JAXBSignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  /**
-   * Set the SignalHandler for this Event
-   */
-  @XmlElement(name = "signal-handler", required = false)
-  public void setSignalHandler(JAXBSignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBSubProcess.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,110 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+//$Id$
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A Sub-Process is Process that is included within another Process.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "SubProcess")
+public class JAXBSubProcess extends JAXBProcess
+{
+  private JAXBExecutionHandler executionHandler;
+  private JAXBFlowHandler flowHandler;
+  private JAXBSignalHandler signalHandler;
+
+  @XmlElements( { 
+    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
+    @XmlElement(name = "message", type = JAXBMessageFlow.class) })
+  private JAXBFlow outFlow;
+
+  public JAXBFlow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  @XmlTransient
+  public void setOutFlow(JAXBFlow outFlow)
+  {
+    this.outFlow = outFlow;
+  }
+
+  /**
+   * Get the ExecutionHandler for this Event
+   */
+  public JAXBExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  /**
+   * Set the ExecutionHandler for this Event
+   */
+  @XmlElement(name = "execution-handler", required = false)
+  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  /**
+   * Get the FlowHandler for this Event
+   */
+  public JAXBFlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  /**
+   * Set the FlowHandler for this Event
+   */
+  @XmlElement(name = "flow-handler", required = false)
+  public void setFlowHandler(JAXBFlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  /**
+   * Get the SignalHandler for this Event
+   */
+  public JAXBSignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  /**
+   * Set the SignalHandler for this Event
+   */
+  @XmlElement(name = "signal-handler", required = false)
+  public void setSignalHandler(JAXBSignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,113 +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.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-//$Id$
-
-/**
- * A Task is an Atomic Activity that is included within a Process.
- * 
- * A Task is used when the work in the Process is not broken down to a finer level of Process Model detail. Generally, an end-user and/or an application are used to
- * perform the Task when it is executed.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
- at XmlType(name = "Task")
-public class JAXBTask extends JAXBActivity
-{
-  private JAXBExecutionHandler executionHandler;
-  private JAXBFlowHandler flowHandler;
-  private JAXBSignalHandler signalHandler;
-  
-  @XmlElements( { 
-    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
-    @XmlElement(name = "message", type = JAXBMessageFlow.class) })
-  private JAXBFlow outFlow;
-
-  public JAXBFlow getOutFlow()
-  {
-    return outFlow;
-  }
-
-  @XmlTransient
-  public void setOutFlow(JAXBFlow outFlow)
-  {
-    this.outFlow = outFlow;
-  }
-
-  /**
-   * Get the ExecutionHandler for this Event
-   */
-  public JAXBExecutionHandler getExecutionHandler()
-  {
-    return executionHandler;
-  }
-
-  /**
-   * Set the ExecutionHandler for this Event
-   */
-  @XmlElement(name = "execution-handler", required = false)
-  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
-  {
-    this.executionHandler = executionHandler;
-  }
-
-  /**
-   * Get the FlowHandler for this Event
-   */
-  public JAXBFlowHandler getFlowHandler()
-  {
-    return flowHandler;
-  }
-
-  /**
-   * Set the FlowHandler for this Event
-   */
-  @XmlElement(name = "flow-handler", required = false)
-  public void setFlowHandler(JAXBFlowHandler flowHandler)
-  {
-    this.flowHandler = flowHandler;
-  }
-
-  /**
-   * Get the SignalHandler for this Event
-   */
-  public JAXBSignalHandler getSignalHandler()
-  {
-    return signalHandler;
-  }
-
-  /**
-   * Set the SignalHandler for this Event
-   */
-  @XmlElement(name = "signal-handler", required = false)
-  public void setSignalHandler(JAXBSignalHandler signalHandler)
-  {
-    this.signalHandler = signalHandler;
-  }
-}
\ No newline at end of file

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/JAXBTask.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,113 @@
+/*
+ * 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.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+//$Id$
+
+/**
+ * A Task is an Atomic Activity that is included within a Process.
+ * 
+ * A Task is used when the work in the Process is not broken down to a finer level of Process Model detail. Generally, an end-user and/or an application are used to
+ * perform the Task when it is executed.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+ at XmlType(name = "Task")
+public class JAXBTask extends JAXBActivity
+{
+  private JAXBExecutionHandler executionHandler;
+  private JAXBFlowHandler flowHandler;
+  private JAXBSignalHandler signalHandler;
+  
+  @XmlElements( { 
+    @XmlElement(name = "sequence", type = JAXBSequenceFlow.class), 
+    @XmlElement(name = "message", type = JAXBMessageFlow.class) })
+  private JAXBFlow outFlow;
+
+  public JAXBFlow getOutFlow()
+  {
+    return outFlow;
+  }
+
+  @XmlTransient
+  public void setOutFlow(JAXBFlow outFlow)
+  {
+    this.outFlow = outFlow;
+  }
+
+  /**
+   * Get the ExecutionHandler for this Event
+   */
+  public JAXBExecutionHandler getExecutionHandler()
+  {
+    return executionHandler;
+  }
+
+  /**
+   * Set the ExecutionHandler for this Event
+   */
+  @XmlElement(name = "execution-handler", required = false)
+  public void setExecutionHandler(JAXBExecutionHandler executionHandler)
+  {
+    this.executionHandler = executionHandler;
+  }
+
+  /**
+   * Get the FlowHandler for this Event
+   */
+  public JAXBFlowHandler getFlowHandler()
+  {
+    return flowHandler;
+  }
+
+  /**
+   * Set the FlowHandler for this Event
+   */
+  @XmlElement(name = "flow-handler", required = false)
+  public void setFlowHandler(JAXBFlowHandler flowHandler)
+  {
+    this.flowHandler = flowHandler;
+  }
+
+  /**
+   * Get the SignalHandler for this Event
+   */
+  public JAXBSignalHandler getSignalHandler()
+  {
+    return signalHandler;
+  }
+
+  /**
+   * Set the SignalHandler for this Event
+   */
+  @XmlElement(name = "signal-handler", required = false)
+  public void setSignalHandler(JAXBSignalHandler signalHandler)
+  {
+    this.signalHandler = signalHandler;
+  }
+}
\ No newline at end of file

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,131 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2008.07.11 at 09:21:08 AM CEST 
-//
-
-package org.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlRegistry;
-
-
-/**
- * This object contains factory methods for each Java content interface and Java element interface generated in the api.bpm.jboss.org package.
- * <p>
- * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist
- * of schema derived interfaces and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of
- * these are provided in this class.
- * 
- */
- at XmlRegistry
-public class ObjectFactory
-{
-  /**
-   * Create an instance of {@link ExclusiveGatewayImpl }
-   * 
-   */
-  public JAXBExclusiveGateway createExclusiveGateway()
-  {
-    return new JAXBExclusiveGateway();
-  }
-
-  /**
-   * Create an instance of {@link TaskImpl }
-   * 
-   */
-  public JAXBTask createTask()
-  {
-    return new JAXBTask();
-  }
-
-  /**
-   * Create an instance of {@link ProcessImpl }
-   * 
-   */
-  public JAXBProcess createProcess()
-  {
-    return new JAXBProcess();
-  }
-
-  /**
-   * Create an instance of {@link ParallelGatewayImpl }
-   * 
-   */
-  public JAXBParallelGateway createParallelGateway()
-  {
-    return new JAXBParallelGateway();
-  }
-
-  /**
-   * Create an instance of {@link MessageFlowImpl }
-   * 
-   */
-  public JAXBMessageFlow createMessageFlow()
-  {
-    return new JAXBMessageFlow();
-  }
-
-  /**
-   * Create an instance of {@link EndEventImpl }
-   * 
-   */
-  public JAXBEndEvent createEndEvent()
-  {
-    return new JAXBEndEvent();
-  }
-
-  /**
-   * Create an instance of {@link SubProcessImpl }
-   * 
-   */
-  public JAXBSubProcess createSubProcess()
-  {
-    return new JAXBSubProcess();
-  }
-
-  /**
-   * Create an instance of {@link SequenceFlowImpl }
-   * 
-   */
-  public JAXBSequenceFlow createSequenceFlow()
-  {
-    return new JAXBSequenceFlow();
-  }
-
-  /**
-   * Create an instance of {@link ComplexGatewayImpl }
-   * 
-   */
-  public JAXBComplexGateway createComplexGateway()
-  {
-    return new JAXBComplexGateway();
-  }
-
-  /**
-   * Create an instance of {@link InclusiveGatewayImpl }
-   * 
-   */
-  public JAXBInclusiveGateway createInclusiveGateway()
-  {
-    return new JAXBInclusiveGateway();
-  }
-
-  /**
-   * Create an instance of {@link IntermediateEventImpl }
-   * 
-   */
-  public JAXBIntermediateEvent createItermediateEvent()
-  {
-    return new JAXBIntermediateEvent();
-  }
-
-  /**
-   * Create an instance of {@link StartEventImpl }
-   * 
-   */
-  public JAXBStartEvent createStartEvent()
-  {
-    return new JAXBStartEvent();
-  }
-}

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/ObjectFactory.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,131 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2008.07.11 at 09:21:08 AM CEST 
+//
+
+package org.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each Java content interface and Java element interface generated in the api.bpm.jboss.org package.
+ * <p>
+ * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist
+ * of schema derived interfaces and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of
+ * these are provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory
+{
+  /**
+   * Create an instance of {@link ExclusiveGatewayImpl }
+   * 
+   */
+  public JAXBExclusiveGateway createExclusiveGateway()
+  {
+    return new JAXBExclusiveGateway();
+  }
+
+  /**
+   * Create an instance of {@link TaskImpl }
+   * 
+   */
+  public JAXBTask createTask()
+  {
+    return new JAXBTask();
+  }
+
+  /**
+   * Create an instance of {@link ProcessImpl }
+   * 
+   */
+  public JAXBProcess createProcess()
+  {
+    return new JAXBProcess();
+  }
+
+  /**
+   * Create an instance of {@link ParallelGatewayImpl }
+   * 
+   */
+  public JAXBParallelGateway createParallelGateway()
+  {
+    return new JAXBParallelGateway();
+  }
+
+  /**
+   * Create an instance of {@link MessageFlowImpl }
+   * 
+   */
+  public JAXBMessageFlow createMessageFlow()
+  {
+    return new JAXBMessageFlow();
+  }
+
+  /**
+   * Create an instance of {@link EndEventImpl }
+   * 
+   */
+  public JAXBEndEvent createEndEvent()
+  {
+    return new JAXBEndEvent();
+  }
+
+  /**
+   * Create an instance of {@link SubProcessImpl }
+   * 
+   */
+  public JAXBSubProcess createSubProcess()
+  {
+    return new JAXBSubProcess();
+  }
+
+  /**
+   * Create an instance of {@link SequenceFlowImpl }
+   * 
+   */
+  public JAXBSequenceFlow createSequenceFlow()
+  {
+    return new JAXBSequenceFlow();
+  }
+
+  /**
+   * Create an instance of {@link ComplexGatewayImpl }
+   * 
+   */
+  public JAXBComplexGateway createComplexGateway()
+  {
+    return new JAXBComplexGateway();
+  }
+
+  /**
+   * Create an instance of {@link InclusiveGatewayImpl }
+   * 
+   */
+  public JAXBInclusiveGateway createInclusiveGateway()
+  {
+    return new JAXBInclusiveGateway();
+  }
+
+  /**
+   * Create an instance of {@link IntermediateEventImpl }
+   * 
+   */
+  public JAXBIntermediateEvent createItermediateEvent()
+  {
+    return new JAXBIntermediateEvent();
+  }
+
+  /**
+   * Create an instance of {@link StartEventImpl }
+   * 
+   */
+  public JAXBStartEvent createStartEvent()
+  {
+    return new JAXBStartEvent();
+  }
+}

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java
===================================================================
--- api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java	2008-07-14 14:05:46 UTC (rev 1625)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -1,26 +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.
- */
- at XmlSchema(namespace="urn:api.bpm.jboss:jpdl-0.1")
-package org.jboss.bpm.model.internal.jaxb;
-
-import javax.xml.bind.annotation.XmlSchema;
-

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java (from rev 1625, api/branches/tdiesler/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/internal/jaxb/package-info.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+ at XmlSchema(namespace="urn:api.bpm.jboss:jpdl-0.1")
+package org.jboss.bpm.model.internal.jaxb;
+
+import javax.xml.bind.annotation.XmlSchema;
+

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -28,6 +28,7 @@
 
 import org.jboss.bpm.model.Flow;
 import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.internal.FlowImpl;
 
 /**
  * A Token is a descriptive construct used to describe how the flow of a Process will proceed at runtime.

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessMarshaller.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessMarshaller.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessMarshaller.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -24,15 +24,16 @@
 // $Id$
 
 import java.io.IOException;
-import java.io.StringWriter;
 import java.io.Writer;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 
-import org.jboss.bpm.model.ObjectFactory;
 import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.internal.jaxb.JAXBProcess;
+import org.jboss.bpm.model.internal.jaxb.ObjectFactory;
+import org.jboss.bpm.model.internal.ProcessImpl;
 
 /**
  * A JAXB marshaller for a Process
@@ -49,7 +50,8 @@
     marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
     marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
 
-    marshaller.marshal(proc, out);
+    JAXBProcess jaxbProc = ((ProcessImpl)proc).getDelegate();
+    marshaller.marshal(jaxbProc, out);
     
     // Add xmlns:xsi to the top level element and remove it from all others
     //StringWriter strwr = new StringWriter();

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessUnmarshaller.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessUnmarshaller.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/util/ProcessUnmarshaller.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -29,7 +29,9 @@
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;
 
-import org.jboss.bpm.model.ObjectFactory;
+import org.jboss.bpm.model.internal.ProcessImpl;
+import org.jboss.bpm.model.internal.jaxb.JAXBProcess;
+import org.jboss.bpm.model.internal.jaxb.ObjectFactory;
 import org.jboss.bpm.model.Process;
 
 /**
@@ -45,7 +47,8 @@
     JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
     Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
     unmarshaller.setProperty("com.sun.xml.bind.ObjectFactory",new ObjectFactory());
-    Process proc = (Process)unmarshaller.unmarshal(xml);
+    JAXBProcess jaxbProc = (JAXBProcess)unmarshaller.unmarshal(xml);
+    ProcessImpl proc = new ProcessImpl(jaxbProc);
     proc.initialize();
     return proc;
   }

Modified: api/trunk/modules/api/src/test/java/org/jboss/bpm/model/ProcessMarshallerTest.java
===================================================================
--- api/trunk/modules/api/src/test/java/org/jboss/bpm/model/ProcessMarshallerTest.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/api/src/test/java/org/jboss/bpm/model/ProcessMarshallerTest.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -51,15 +51,15 @@
     marshaller.marshallProcess(inProc, strwr);
     String xml = strwr.toString();
 
-    //System.out.println(xml);
+    System.out.println(xml);
 
     ProcessUnmarshaller unmarshaller = new ProcessUnmarshaller();
     Process outProc = unmarshaller.unmarshallProcess(new StringReader(xml));
     StartEvent start = outProc.getStartEvent();
     Task task = (Task)outProc.findFlowObject("task");
-    ParallelGateway split = (ParallelGateway)outProc.findFlowObject("split");
-    ParallelGateway join = (ParallelGateway)outProc.findFlowObject("join");
-    ItermediateEvent event = (ItermediateEvent)outProc.findFlowObject("event");
+    Gateway split = (Gateway)outProc.findFlowObject("split");
+    Gateway join = (Gateway)outProc.findFlowObject("join");
+    IntermediateEvent event = (IntermediateEvent)outProc.findFlowObject("event");
     SubProcess subproc = (SubProcess)outProc.findFlowObject("subproc");
     EndEvent end = (EndEvent)outProc.findFlowObject("end");
     
@@ -87,7 +87,7 @@
     Flow of3 = split.getOutFlows().get(0);
     Flow of4 = split.getOutFlows().get(1);
     Flow of5 = subproc.getOutFlow();
-    Flow of6 = event.getOutFlows().get(0);
+    Flow of6 = event.getOutFlow();
     Flow of7 = join.getOutFlows().get(0);
     
     assertNotNull(of1);
@@ -99,13 +99,12 @@
     assertNotNull(of7);
 
     assertEquals(2, split.getOutFlows().size());
-    assertEquals(1, event.getOutFlows().size());
     assertEquals(1, join.getOutFlows().size());
 
     Flow if1 = task.getInFlow();
     Flow if2 = split.getInFlows().get(0);
     Flow if3 = subproc.getInFlow();
-    Flow if4 = event.getInFlows().get(0);
+    Flow if4 = event.getInFlow();
     Flow if5 = join.getInFlows().get(0);
     Flow if6 = join.getInFlows().get(1);
     Flow if7 = end.getInFlow();

Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/TaskA.java
===================================================================
--- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/TaskA.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/TaskA.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -23,7 +23,7 @@
 
 // $Id$
 
-import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.internal.ExecutionHandlerImpl;
 import org.jboss.bpm.runtime.ExecutionContext;
 import org.jboss.bpm.runtime.Token;
 
@@ -33,7 +33,7 @@
  * @author Thomas.Diesler at jboss.com
  * @since 04-Jul-2008
  */
-public class TaskA extends ExecutionHandler
+public class TaskA extends ExecutionHandlerImpl
 {
   @Override
   public void execute(Token token)

Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java
===================================================================
--- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java	2008-07-14 14:08:16 UTC (rev 1626)
+++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/task/TaskA.java	2008-07-14 15:16:28 UTC (rev 1627)
@@ -23,7 +23,7 @@
 
 // $Id$
 
-import org.jboss.bpm.model.ExecutionHandler;
+import org.jboss.bpm.model.internal.ExecutionHandlerImpl;
 import org.jboss.bpm.runtime.ExecutionContext;
 import org.jboss.bpm.runtime.Token;
 
@@ -33,7 +33,7 @@
  * @author Thomas.Diesler at jboss.com
  * @since 04-Jul-2008
  */
-public class TaskA extends ExecutionHandler
+public class TaskA extends ExecutionHandlerImpl
 {
   @Override
   public void execute(Token token)




More information about the jbpm-commits mailing list