[jbpm-commits] JBoss JBPM SVN: r2678 - in projects/spec/trunk/modules: api/src/main/java/org/jbpm/api and 16 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Oct 30 11:02:36 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-10-30 11:02:36 -0400 (Thu, 30 Oct 2008)
New Revision: 2678

Added:
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java
   projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/
   projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn
   projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn_diagram
   projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.png
Modified:
   projects/spec/trunk/modules/api/.classpath
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DialectHandler.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
   projects/spec/trunk/modules/cts/.project
   projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/DialectHandlerImpl.java
   projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java
   projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java
   projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBTask.java
   projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/package-info.java
   projects/spec/trunk/modules/dialects/jpdl32/src/main/java/org/jbpm/dialect/jpdl32/DialectHandlerImpl.java
   projects/spec/trunk/modules/dialects/stp/src/main/java/org/jbpm/dialect/stp/DialectHandlerImpl.java
   projects/spec/trunk/modules/dialects/xpdl21/src/main/java/org/jbpm/dialect/xpdl21/DialectHandlerImpl.java
   projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java
Log:
WIP - TxGroup

Modified: projects/spec/trunk/modules/api/.classpath
===================================================================
--- projects/spec/trunk/modules/api/.classpath	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/.classpath	2008-10-30 15:02:36 UTC (rev 2678)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/java"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="output" path="target/classes"/>

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/Constants.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -32,5 +32,12 @@
  */
 public interface Constants 
 {
-  static final String ID_DOMAIN = "jboss.jbpm";
+  /** The default objcet name domain */
+  String ID_DOMAIN = "jboss.jbpm";
+
+  /** The key for the Tx attribute property in a TxGroup */
+  String TX_ATTRIBUTE = "jbpm.tx.attribute";
+  
+  /** The enumeration of Tx types */
+  enum TxType { MANDATORY, NEVER, NOTSUPPORTED, REQUIRED, REQUIRESNEW, SUPPORTS }
 }
\ No newline at end of file

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -95,7 +95,7 @@
       if (dialectHandler == null)
         throw new IllegalStateException("Cannot obtain DialectHandler for: " + nsURI);
       
-      process = dialectHandler.createProcessDefinition(procXML);
+      process = dialectHandler.createProcess(procXML);
     }
     return process;
   }

Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -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.jbpm.api.model;
+
+//$Id$
+
+import java.io.Serializable;
+
+import org.jbpm.api.model.internal.PropertySupport;
+
+/**
+ * The Group object is an Artifact that provides a visual mechanism to group elements of a diagram informally. The
+ * grouping is tied to the Category supporting element (which is an attribute of all BPMN elements). That is, a Group is a
+ * visual depiction of a single Category. The graphical elements within the Group will be assigned the Category of the
+ * Group.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 30-Oct-2008
+ */
+public interface Group extends PropertySupport, Serializable
+{
+  /**
+   * The supported group types 
+   */
+  enum GroupType { Transaction };
+  
+  /**
+   * Name is an attribute that is text description of the Group.
+   */
+  String getName();
+  
+  /**
+   * Get the group type for this group  
+   */
+  GroupType getGroupType();
+}


Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder;
+
+//$Id$
+
+import org.jbpm.api.model.Group;
+
+
+/**
+ * A GroupBuilder can be used to build a {@link Group} dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface GroupBuilder
+{
+  /**
+   * Add a message property
+   */
+  GroupBuilder addProperty(String name, Object value);
+  
+  /**
+   * Get the Group
+   */
+  Group getGroup();
+}
\ No newline at end of file


Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -32,6 +32,7 @@
 import org.jbpm.api.model.Event.EventDetailType;
 import org.jbpm.api.model.Expression.ExpressionLanguage;
 import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.Group.GroupType;
 import org.jbpm.api.model.Task.TaskType;
 import org.jbpm.api.runtime.ExecutionHandler;
 import org.jbpm.api.runtime.FlowHandler;
@@ -141,4 +142,14 @@
    * Add an {@link SignalHandler} with a given Class
    */
   <T extends SignalHandler> ProcessBuilder addSignalHandler(Class<T> clazz);
+
+  /**
+   * Add a group reference for the current node
+   */
+  ProcessBuilder addGroupRef(String name);
+  
+  /**
+   * Add a Process group
+   */
+  GroupBuilder addGroup(GroupType type, String name);
 }
\ No newline at end of file

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DialectHandler.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DialectHandler.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DialectHandler.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -28,7 +28,6 @@
 import java.net.URI;
 import java.net.URL;
 
-import org.jbpm.api.model.Process;
 import org.jbpm.api.model.ProcessDefinition;
 
 /**
@@ -49,15 +48,15 @@
   /**
    * Create a ProcessDefinition from a descriptor.
    */
-  ProcessDefinition createProcessDefinition(String pXML);
+  ProcessDefinition createProcess(String pXML);
 
   /**
    * Create a ProcessDefinition from a descriptor URL.
    */
-  ProcessDefinition createProcessDefinition(URL pURL) throws IOException;
+  ProcessDefinition createProcess(URL pURL) throws IOException;
 
   /**
-   * Marshall the process to the given writer
+   * Marshall the process definition to the given writer
    */
-  void marshallProcess(Process proc, Writer out) throws IOException;
+  void marshallProcess(ProcessDefinition procDef, Writer out) throws IOException;
 }

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -84,7 +84,7 @@
     if (dialectHandler == null)
       throw new IllegalStateException("Cannot obtain DialectHandler for: " + nsURI);
     
-    ProcessDefinition procDef = dialectHandler.createProcessDefinition(pXML);
+    ProcessDefinition procDef = dialectHandler.createProcess(pXML);
     return procDef;
   }
 
@@ -99,7 +99,7 @@
     if (dialectHandler == null)
       throw new IllegalStateException("Cannot obtain DialectHandler for: " + nsURI);
     
-    ProcessDefinition procDef = dialectHandler.createProcessDefinition(pURL);
+    ProcessDefinition procDef = dialectHandler.createProcess(pURL);
     return procDef;
   }
   

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -21,6 +21,12 @@
  */
 package org.jbpm.api.test;
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -28,6 +34,7 @@
 
 import javax.management.ObjectName;
 
+import org.jbpm.api.BPMException;
 import org.jbpm.api.client.MessageListener;
 import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.client.SignalListener;
@@ -36,6 +43,8 @@
 import org.jbpm.api.model.Signal;
 import org.jbpm.api.model.Signal.SignalType;
 import org.jbpm.api.model.builder.SignalBuilder;
+import org.jbpm.api.service.DialectHandler;
+import org.jbpm.api.service.DialectHandlerService;
 import org.jbpm.api.service.MessageService;
 import org.jbpm.api.service.ProcessDefinitionService;
 import org.jbpm.api.service.SignalBuilderService;
@@ -256,4 +265,62 @@
     }
     return messageListener;
   }
+  
+  /**
+   * Marshall the given process
+   * @param out if null, the proces is marshalled to a file
+   */
+  protected String marshallProcess(ProcessDefinition procDef, Writer out)
+  {
+    try
+    {
+      if (out == null)
+      {
+        File file = new File("target/" + getName() + "-" + getDialect() + ".xml");
+        out = new FileWriter(file);
+        System.out.println("Marshall process to: " + file.getCanonicalPath());
+      }
+
+      String procXML = marshallProcess(procDef);
+      out.write(procXML);
+      out.close();
+
+      return procXML;
+    }
+    catch (IOException ex)
+    {
+      throw new BPMException("Cannot marshall process", ex);
+    }
+  }
+
+  /**
+   * Marshall the given process definition
+   */
+  public String marshallProcess(ProcessDefinition procDef) throws IOException
+  {
+    DialectHandlerService dhService = getProcessEngine().getService(DialectHandlerService.class);
+    DialectHandler dialectHandler = dhService.getDialectHandler(getDialectURI());
+
+    StringWriter strwr = new StringWriter();
+    dialectHandler.marshallProcess(procDef, strwr);
+    return strwr.toString();
+  }
+
+  /**
+   * Get the BPM descriptor dialect ID 
+   */
+  protected String getDialect()
+  {
+    String dialect = System.getProperty("jbpm.dialect", "api10");
+    return dialect;
+  }
+  
+  /**
+   * Get the BPM descriptor dialect ID 
+   */
+  protected URI getDialectURI()
+  {
+    String dialect = System.getProperty("jbpm.dialect.uri", DialectHandler.DEFAULT_NAMESPACE_URI.toString());
+    return URI.create(dialect);
+  }
 }

Modified: projects/spec/trunk/modules/cts/.project
===================================================================
--- projects/spec/trunk/modules/cts/.project	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/cts/.project	2008-10-30 15:02:36 UTC (rev 2678)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>jbpm-cts</name>
+	<name>jbpm-spec-cts</name>
 	<comment></comment>
 	<projects>
 	</projects>
@@ -15,9 +15,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.stp.bpmn.validation.BatchValidationBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+		<nature>org.eclipse.stp.bpmn.validation.BatchValidationBuildAbleNature</nature>
 	</natures>
 </projectDescription>

Added: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java	                        (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -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.jbpm.test.cts.transaction;
+
+// $Id$
+
+import java.io.IOException;
+
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.service.ProcessDefinitionService;
+
+/**
+ * Test two tasks with Tx attribute REQUIRES
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 30-Oct-2008
+ */
+public class RequiresTxMarshallerTest extends RequiresTxTest
+{
+  protected ProcessDefinition getProcessDefinition() throws IOException
+  {
+    // Marshall the process to a string
+    ProcessDefinition procDef = super.getProcessDefinition();
+    String procXML = marshallProcess(procDef);
+
+    // System.out.println(procXML);
+
+    // Recreate the ProcessDefinition from the marshalled ProcessDefinition
+    ProcessDefinitionService pdService = getProcessEngine().getService(ProcessDefinitionService.class);
+    return pdService.createProcessDefinition(procXML);
+  }
+}


Property changes on: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxMarshallerTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java	                        (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -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.jbpm.test.cts.transaction;
+
+// $Id$
+
+import java.io.IOException;
+
+import org.jbpm.api.Constants;
+import org.jbpm.api.Constants.TxType;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Group.GroupType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test two tasks with Tx attribute REQUIRES
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 30-Oct-2008
+ */
+public class RequiresTxTest extends CTSTestCase
+{
+  public void testUserTask() throws Exception
+  {
+    ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+    Process proc = procDef.newInstance();
+
+    proc.startProcess();
+    proc.waitForEnd(1000);
+  }
+
+  protected ProcessDefinition getProcessDefinition() throws IOException
+  {
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    procBuilder.addProcess("RequiresTxTest");
+    procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
+    procBuilder.addTask("TaskA").addSequenceFlow("TaskB");
+    procBuilder.addTask("TaskB").addSequenceFlow("End").addEndEvent("End");
+    procBuilder.addGroup(GroupType.Transaction, "TxRequired").addProperty(Constants.TX_ATTRIBUTE, TxType.REQUIRED);
+    return procBuilder.getProcessDefinition();
+  }
+}


Property changes on: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/RequiresTxTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn
===================================================================
--- projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn	                        (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn	2008-10-30 15:02:36 UTC (rev 2678)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:BpmnDiagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmi:id="_Q_I4EKaNEd2GaYuuIrSLcA" iD="_Q_Hp8KaNEd2GaYuuIrSLcA">
+  <artifacts xmi:type="bpmn:Group" xmi:id="_gxR7IaaNEd2GaYuuIrSLcA" iD="_gxR7IKaNEd2GaYuuIrSLcA"/>
+  <pools xmi:type="bpmn:Pool" xmi:id="_RAQSYaaNEd2GaYuuIrSLcA" iD="_RAQSYKaNEd2GaYuuIrSLcA" name="Pool">
+    <vertices xmi:type="bpmn:Activity" xmi:id="_RBYTwKaNEd2GaYuuIrSLcA" iD="_RBXssKaNEd2GaYuuIrSLcA" outgoingEdges="_X18-4aaNEd2GaYuuIrSLcA" incomingEdges="_UUJsEaaNEd2GaYuuIrSLcA" name="TaskA" activityType="Task"/>
+    <vertices xmi:type="bpmn:Activity" xmi:id="_TXzYkaaNEd2GaYuuIrSLcA" iD="_TXzYkKaNEd2GaYuuIrSLcA" outgoingEdges="_UUJsEaaNEd2GaYuuIrSLcA" activityType="EventStartEmpty"/>
+    <vertices xmi:type="bpmn:Activity" xmi:id="_X1z08aaNEd2GaYuuIrSLcA" iD="_X1z08KaNEd2GaYuuIrSLcA" outgoingEdges="_dJnQ4aaNEd2GaYuuIrSLcA" incomingEdges="_X18-4aaNEd2GaYuuIrSLcA" name="TaskB" activityType="Task"/>
+    <vertices xmi:type="bpmn:Activity" xmi:id="_cwqlYKaNEd2GaYuuIrSLcA" iD="_cwp-UKaNEd2GaYuuIrSLcA" incomingEdges="_dJnQ4aaNEd2GaYuuIrSLcA" activityType="EventEndEmpty"/>
+    <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_UUJsEaaNEd2GaYuuIrSLcA" iD="_UUJsEKaNEd2GaYuuIrSLcA" source="_TXzYkaaNEd2GaYuuIrSLcA" target="_RBYTwKaNEd2GaYuuIrSLcA"/>
+    <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_X18-4aaNEd2GaYuuIrSLcA" iD="_X18-4KaNEd2GaYuuIrSLcA" source="_RBYTwKaNEd2GaYuuIrSLcA" target="_X1z08aaNEd2GaYuuIrSLcA"/>
+    <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_dJnQ4aaNEd2GaYuuIrSLcA" iD="_dJnQ4KaNEd2GaYuuIrSLcA" source="_X1z08aaNEd2GaYuuIrSLcA" target="_cwqlYKaNEd2GaYuuIrSLcA"/>
+  </pools>
+</bpmn:BpmnDiagram>

Added: projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn_diagram
===================================================================
--- projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn_diagram	                        (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.bpmn_diagram	2008-10-30 15:02:36 UTC (rev 2678)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation" xmi:id="_Q_k88KaNEd2GaYuuIrSLcA" type="Bpmn" name="tx-required.bpmn_diagram" measurementUnit="Pixel">
+  <children xmi:type="notation:Node" xmi:id="_RBoLYKaNEd2GaYuuIrSLcA" type="1001">
+    <children xmi:type="notation:Node" xmi:id="_RBtD4KaNEd2GaYuuIrSLcA" type="4008"/>
+    <children xmi:type="notation:Node" xmi:id="_RBu5EKaNEd2GaYuuIrSLcA" type="5001">
+      <children xmi:type="notation:Node" xmi:id="_RBx8YKaNEd2GaYuuIrSLcA" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_RBzKgKaNEd2GaYuuIrSLcA" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_RBx8YaaNEd2GaYuuIrSLcA" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_RBx8YqaNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_RBx8Y6aNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_RBx8ZKaNEd2GaYuuIrSLcA" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="tx-required.bpmn#_RBYTwKaNEd2GaYuuIrSLcA"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RBzKgaaNEd2GaYuuIrSLcA" x="84" y="48" width="111" height="61"/>
+      </children>
+      <children xmi:type="notation:Node" xmi:id="_TX7UYKaNEd2GaYuuIrSLcA" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_TX9JkKaNEd2GaYuuIrSLcA" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_TX7UYaaNEd2GaYuuIrSLcA" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_TX77cKaNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_TX77caaNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_TX77cqaNEd2GaYuuIrSLcA" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="tx-required.bpmn#_TXzYkaaNEd2GaYuuIrSLcA"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TX77c6aNEd2GaYuuIrSLcA" x="12" y="60"/>
+      </children>
+      <children xmi:type="notation:Node" xmi:id="_X11qIKaNEd2GaYuuIrSLcA" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_X12RMKaNEd2GaYuuIrSLcA" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_X11qIaaNEd2GaYuuIrSLcA" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_X11qIqaNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_X11qI6aNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_X11qJKaNEd2GaYuuIrSLcA" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="tx-required.bpmn#_X1z08aaNEd2GaYuuIrSLcA"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_X11qJaaNEd2GaYuuIrSLcA" x="228" y="48"/>
+      </children>
+      <children xmi:type="notation:Node" xmi:id="_cwrzgKaNEd2GaYuuIrSLcA" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_cwsakKaNEd2GaYuuIrSLcA" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_cwrzgaaNEd2GaYuuIrSLcA" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_cwrzgqaNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_cwrzg6aNEd2GaYuuIrSLcA"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_cwrzhKaNEd2GaYuuIrSLcA" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="tx-required.bpmn#_cwqlYKaNEd2GaYuuIrSLcA"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cwrzhaaNEd2GaYuuIrSLcA" x="384" y="60"/>
+      </children>
+      <styles xmi:type="notation:DrawerStyle" xmi:id="_RBu5EaaNEd2GaYuuIrSLcA"/>
+      <styles xmi:type="notation:SortingStyle" xmi:id="_RBu5EqaNEd2GaYuuIrSLcA"/>
+      <styles xmi:type="notation:FilteringStyle" xmi:id="_RBu5E6aNEd2GaYuuIrSLcA"/>
+    </children>
+    <styles xmi:type="notation:FontStyle" xmi:id="_RBoLYaaNEd2GaYuuIrSLcA" fontName="Arial"/>
+    <styles xmi:type="notation:DescriptionStyle" xmi:id="_RBoLYqaNEd2GaYuuIrSLcA"/>
+    <styles xmi:type="notation:FillStyle" xmi:id="_RBoLY6aNEd2GaYuuIrSLcA" fillColor="16771304"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_RBoLZKaNEd2GaYuuIrSLcA" lineColor="11119017"/>
+    <element xmi:type="bpmn:Pool" href="tx-required.bpmn#_RAQSYaaNEd2GaYuuIrSLcA"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RBvgIKaNEd2GaYuuIrSLcA" x="16" y="16" width="477" height="165"/>
+  </children>
+  <children xmi:type="notation:Node" xmi:id="_gxTwUKaNEd2GaYuuIrSLcA" type="1004">
+    <children xmi:type="notation:Node" xmi:id="_gxU-cKaNEd2GaYuuIrSLcA" type="4011"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_gxTwUaaNEd2GaYuuIrSLcA" fontName="Arial"/>
+    <styles xmi:type="notation:DescriptionStyle" xmi:id="_gxTwUqaNEd2GaYuuIrSLcA"/>
+    <styles xmi:type="notation:FillStyle" xmi:id="_gxTwU6aNEd2GaYuuIrSLcA"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_gxTwVKaNEd2GaYuuIrSLcA" lineColor="0"/>
+    <element xmi:type="bpmn:Group" href="tx-required.bpmn#_gxR7IaaNEd2GaYuuIrSLcA"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gxTwVaaNEd2GaYuuIrSLcA" x="108" y="48" width="301" height="97"/>
+  </children>
+  <styles xmi:type="notation:PageStyle" xmi:id="_Q_k88aaNEd2GaYuuIrSLcA"/>
+  <styles xmi:type="notation:GuideStyle" xmi:id="_Q_k88qaNEd2GaYuuIrSLcA"/>
+  <styles xmi:type="notation:DescriptionStyle" xmi:id="_Q_k886aNEd2GaYuuIrSLcA"/>
+  <element xmi:type="bpmn:BpmnDiagram" href="tx-required.bpmn#_Q_I4EKaNEd2GaYuuIrSLcA"/>
+  <edges xmi:type="notation:Edge" xmi:id="_UUNWcKaNEd2GaYuuIrSLcA" type="3001" source="_TX7UYKaNEd2GaYuuIrSLcA" target="_RBx8YKaNEd2GaYuuIrSLcA">
+    <children xmi:type="notation:Node" xmi:id="_UdFloKaNEd2GaYuuIrSLcA" type="4012">
+      <styles xmi:type="notation:FillStyle" xmi:id="_UdFloaaNEd2GaYuuIrSLcA" fillColor="16776959"/>
+      <styles xmi:type="notation:LineStyle" xmi:id="_UdFloqaNEd2GaYuuIrSLcA" lineColor="16776959"/>
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_UdFlo6aNEd2GaYuuIrSLcA" y="-10"/>
+    </children>
+    <styles xmi:type="notation:RoutingStyle" xmi:id="_UUNWcaaNEd2GaYuuIrSLcA" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_UUNWcqaNEd2GaYuuIrSLcA" fontName="Arial"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_UUNWc6aNEd2GaYuuIrSLcA" lineColor="0"/>
+    <element xmi:type="bpmn:SequenceEdge" href="tx-required.bpmn#_UUJsEaaNEd2GaYuuIrSLcA"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UUNWdKaNEd2GaYuuIrSLcA" points="[15, 1, -82, -8]$[44, 0, -53, -9]"/>
+  </edges>
+  <edges xmi:type="notation:Edge" xmi:id="_X1-0EKaNEd2GaYuuIrSLcA" type="3001" source="_RBx8YKaNEd2GaYuuIrSLcA" target="_X11qIKaNEd2GaYuuIrSLcA">
+    <children xmi:type="notation:Node" xmi:id="_X2ACMKaNEd2GaYuuIrSLcA" type="4012">
+      <styles xmi:type="notation:FillStyle" xmi:id="_X2ACMaaNEd2GaYuuIrSLcA" fillColor="16776959"/>
+      <styles xmi:type="notation:LineStyle" xmi:id="_X2ACMqaNEd2GaYuuIrSLcA" lineColor="16776959"/>
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_X2ACM6aNEd2GaYuuIrSLcA" y="-10"/>
+    </children>
+    <styles xmi:type="notation:RoutingStyle" xmi:id="_X1-0EaaNEd2GaYuuIrSLcA" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_X1-0EqaNEd2GaYuuIrSLcA" fontName="Arial"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_X1-0E6aNEd2GaYuuIrSLcA" lineColor="0"/>
+    <element xmi:type="bpmn:SequenceEdge" href="tx-required.bpmn#_X18-4aaNEd2GaYuuIrSLcA"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_X1-0FKaNEd2GaYuuIrSLcA" points="[-35, -28, 92, 74]$[-125, -100, 2, 2]"/>
+  </edges>
+  <edges xmi:type="notation:Edge" xmi:id="_dJpGEKaNEd2GaYuuIrSLcA" type="3001" source="_X11qIKaNEd2GaYuuIrSLcA" target="_cwrzgKaNEd2GaYuuIrSLcA">
+    <children xmi:type="notation:Node" xmi:id="_dJqUMKaNEd2GaYuuIrSLcA" type="4012">
+      <styles xmi:type="notation:FillStyle" xmi:id="_dJqUMaaNEd2GaYuuIrSLcA" fillColor="16776959"/>
+      <styles xmi:type="notation:LineStyle" xmi:id="_dJqUMqaNEd2GaYuuIrSLcA" lineColor="16776959"/>
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_dJqUM6aNEd2GaYuuIrSLcA" y="-10"/>
+    </children>
+    <styles xmi:type="notation:RoutingStyle" xmi:id="_dJpGEaaNEd2GaYuuIrSLcA" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_dJpGEqaNEd2GaYuuIrSLcA" fontName="Arial"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_dJpGE6aNEd2GaYuuIrSLcA" lineColor="0"/>
+    <element xmi:type="bpmn:SequenceEdge" href="tx-required.bpmn#_dJnQ4aaNEd2GaYuuIrSLcA"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dJptIKaNEd2GaYuuIrSLcA" points="[54, 3, -89, -8]$[128, 9, -15, -2]"/>
+  </edges>
+</notation:Diagram>

Added: projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.png
===================================================================
(Binary files differ)


Property changes on: projects/spec/trunk/modules/cts/src/test/resources/cts/transaction/tx-required.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/DialectHandlerImpl.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/DialectHandlerImpl.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/DialectHandlerImpl.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -33,7 +33,6 @@
 import javax.xml.bind.JAXBException;
 
 import org.jbpm.api.InvalidProcessException;
-import org.jbpm.api.model.Process;
 import org.jbpm.api.model.ProcessDefinition;
 import org.jbpm.api.service.DialectHandler;
 
@@ -52,7 +51,7 @@
   }
 
   @Override
-  public ProcessDefinition createProcessDefinition(String pXML)
+  public ProcessDefinition createProcess(String pXML)
   {
     try
     {
@@ -71,7 +70,7 @@
   }
 
   @Override
-  public ProcessDefinition createProcessDefinition(URL pURL) throws IOException
+  public ProcessDefinition createProcess(URL pURL) throws IOException
   {
     try
     {
@@ -85,7 +84,8 @@
     }
   }
 
-  public void marshallProcess(Process proc, Writer out) throws IOException
+  @Override
+  public void marshallProcess(ProcessDefinition proc, Writer out) throws IOException
   {
     try
     {

Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -45,7 +45,7 @@
 import org.jbpm.api.model.OutputSet;
 import org.jbpm.api.model.ParallelGateway;
 import org.jbpm.api.model.Participant;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessDefinition;
 import org.jbpm.api.model.Property;
 import org.jbpm.api.model.ReceiveTask;
 import org.jbpm.api.model.SendTask;
@@ -94,9 +94,9 @@
  */
 public class ProcessMarshaller
 {
-  public void marshallProcess(Process proc, Writer out) throws JAXBException, IOException
+  public void marshallProcess(ProcessDefinition procDef, Writer out) throws JAXBException, IOException
   {
-    JAXBProcess jaxbProc = adaptProcess(proc);
+    JAXBProcess jaxbProc = adaptProcess(procDef);
     JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
     Marshaller marshaller = jaxbContext.createMarshaller();
     marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
@@ -105,28 +105,28 @@
     marshaller.marshal(jaxbProc, out);
   }
 
-  private JAXBProcess adaptProcess(Process proc)
+  private JAXBProcess adaptProcess(ProcessDefinition procDef)
   {
     JAXBProcess jaxbProc = new JAXBProcess();
-    jaxbProc.setName(proc.getName());
+    jaxbProc.setName(procDef.getName());
 
-    for (Message msg : proc.getMessages())
+    for (Message msg : procDef.getMessages())
     {
       JAXBMessage jaxbMsg = adaptMessage(msg);
       jaxbProc.getMessages().add(jaxbMsg);
     }
-    for (Property prop : proc.getProperties())
+    for (Property prop : procDef.getProperties())
     {
       JAXBProperty jaxbProp = getJaxbProperty(prop);
       jaxbProc.getProperties().add(jaxbProp);
     }
-    for (Assignment ass : proc.getAssignments())
+    for (Assignment ass : procDef.getAssignments())
     {
       JAXBAssignment jaxbAss = getJaxbAssignment(ass);
       jaxbProc.getAssignments().add(jaxbAss);
     }
 
-    for (Node flowObject : proc.getNodes())
+    for (Node flowObject : procDef.getNodes())
     {
       JAXBFlowObject jaxbNode;
       if (flowObject instanceof Event)
@@ -172,8 +172,12 @@
       // if (start.getTriggerType().size() > 1)
       // throw new NotImplementedException("JBPM-1660", "StartTrigger Multiple");
 
-      if (detailType == EventDetailType.Message)
+      if (detailType == EventDetailType.None)
       {
+        // nothing to do
+      }
+      else if (detailType == EventDetailType.Message)
+      {
         throw new NotImplementedException("JBPM-1657", "StartTrigger Message");
       }
       else if (detailType == EventDetailType.Timer)
@@ -207,8 +211,12 @@
       // if (end.getResult().size() > 1)
       // throw new NotImplementedException("JBPM-1683", "EndEvent Multiple Result");
 
-      if (detailType == EventDetailType.Message)
+      if (detailType == EventDetailType.None)
       {
+        // nothing to do
+      }
+      else if (detailType == EventDetailType.Message)
+      {
         Message message = end.getMessageRef();
         JAXBMessageRef jaxbMessageRef = adaptMessageRef(jaxbProc, message);
         JAXBMessageEventDetail jaxbResult = new JAXBMessageEventDetail();

Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -181,11 +181,11 @@
     return ObjectNameFactory.create(objName);
   }
 
-  private void adaptJAXBEvent(ProcessBuilder procBuilder, JAXBProcess jaxbProc, JAXBEvent jaxb)
+  private void adaptJAXBEvent(ProcessBuilder procBuilder, JAXBProcess jaxbProc, JAXBEvent jaxbEvent)
   {
-    if (jaxb instanceof JAXBStartEvent)
+    if (jaxbEvent instanceof JAXBStartEvent)
     {
-      JAXBStartEvent jaxbStart = (JAXBStartEvent)jaxb;
+      JAXBStartEvent jaxbStart = (JAXBStartEvent)jaxbEvent;
       EventBuilder eventBuilder = procBuilder.addStartEvent(jaxbStart.getName());
       addOutFlow(procBuilder, jaxbStart.getOutFlow());
 
@@ -218,13 +218,13 @@
         }
       }
     }
-    else if (jaxb instanceof JAXBIntermediateEvent)
+    else if (jaxbEvent instanceof JAXBIntermediateEvent)
     {
       throw new NotImplementedException("JBPM-1661", "IntermediateEvent");
     }
-    else if (jaxb instanceof JAXBEndEvent)
+    else if (jaxbEvent instanceof JAXBEndEvent)
     {
-      JAXBEndEvent jaxbEnd = (JAXBEndEvent)jaxb;
+      JAXBEndEvent jaxbEnd = (JAXBEndEvent)jaxbEvent;
       EventBuilder eventBuilder = procBuilder.addEndEvent(jaxbEnd.getName());
 
       if (jaxbEnd.getResult().size() > 1)
@@ -266,11 +266,11 @@
     }
     else
     {
-      throw new IllegalStateException("Unsupported Event: " + jaxb);
+      throw new IllegalStateException("Unsupported Event: " + jaxbEvent);
     }
-    procBuilder.addExecutionHandler(loadHandler(ExecutionHandler.class, jaxb.getExecutionHandler()));
-    procBuilder.addFlowHandler(loadHandler(FlowHandler.class, jaxb.getFlowHandler()));
-    procBuilder.addSignalHandler(loadHandler(SignalHandler.class, jaxb.getSignalHandler()));
+    procBuilder.addExecutionHandler(loadHandler(ExecutionHandler.class, jaxbEvent.getExecutionHandler()));
+    procBuilder.addFlowHandler(loadHandler(FlowHandler.class, jaxbEvent.getFlowHandler()));
+    procBuilder.addSignalHandler(loadHandler(SignalHandler.class, jaxbEvent.getSignalHandler()));
   }
 
   private void adaptTask(ProcessBuilder procBuilder, JAXBProcess jaxbProc, JAXBTask jaxbTask)

Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBTask.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBTask.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBTask.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -43,8 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
- at XmlType(name = "Task", propOrder = { "outFlow", "implementation", "executionHandler", "flowHandler", "signalHandler",
-    "messageRef", "inputSets", "outputSets" })
+ at XmlType(name = "Task", propOrder = { "outFlow", "executionHandler", "flowHandler", "signalHandler", "messageRef", "inputSets", "outputSets" })
 public class JAXBTask extends JAXBActivity
 {
   private Task.TaskType taskType;

Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/package-info.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/package-info.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/package-info.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -19,7 +19,7 @@
  * 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:bpm.jboss:pdl-0.1")
+ at XmlSchema(namespace = "urn:jbpm.jboss:api-0.1")
 package org.jbpm.dialect.api10.model;
 
 import javax.xml.bind.annotation.XmlSchema;

Modified: projects/spec/trunk/modules/dialects/jpdl32/src/main/java/org/jbpm/dialect/jpdl32/DialectHandlerImpl.java
===================================================================
--- projects/spec/trunk/modules/dialects/jpdl32/src/main/java/org/jbpm/dialect/jpdl32/DialectHandlerImpl.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/jpdl32/src/main/java/org/jbpm/dialect/jpdl32/DialectHandlerImpl.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -34,7 +34,6 @@
 
 import org.jbpm.api.InvalidProcessException;
 import org.jbpm.api.NotImplementedException;
-import org.jbpm.api.model.Process;
 import org.jbpm.api.model.ProcessDefinition;
 import org.jbpm.api.service.DialectHandler;
 import org.jbpm.dialect.jpdl32.model.JPDL32ProcessDefinition;
@@ -56,7 +55,7 @@
   }
 
   @Override
-  public ProcessDefinition createProcessDefinition(String pXML)
+  public ProcessDefinition createProcess(String pXML)
   {
     try
     {
@@ -72,7 +71,7 @@
   }
 
   @Override
-  public ProcessDefinition createProcessDefinition(URL pURL) throws IOException
+  public ProcessDefinition createProcess(URL pURL) throws IOException
   {
     try
     {
@@ -87,7 +86,8 @@
     }
   }
 
-  public void marshallProcess(Process proc, Writer out) throws IOException
+  @Override
+  public void marshallProcess(ProcessDefinition proc, Writer out) throws IOException
   {
     throw new NotImplementedException("JBPM-1638", "DialectHandler jPDL3.2 marshallProcess");
   }

Modified: projects/spec/trunk/modules/dialects/stp/src/main/java/org/jbpm/dialect/stp/DialectHandlerImpl.java
===================================================================
--- projects/spec/trunk/modules/dialects/stp/src/main/java/org/jbpm/dialect/stp/DialectHandlerImpl.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/stp/src/main/java/org/jbpm/dialect/stp/DialectHandlerImpl.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -34,7 +34,6 @@
 import org.jbpm.api.InvalidProcessException;
 import org.jbpm.api.NotImplementedException;
 import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Process;
 import org.jbpm.api.service.DialectHandler;
 
 /**
@@ -52,7 +51,7 @@
     return NAMESPACE_URI;
   }
 
-  public ProcessDefinition createProcessDefinition(String pXML)
+  public ProcessDefinition createProcess(String pXML)
   {
     try
     {
@@ -66,7 +65,7 @@
     }
   }
 
-  public ProcessDefinition createProcessDefinition(URL pURL) throws IOException
+  public ProcessDefinition createProcess(URL pURL) throws IOException
   {
     try
     {
@@ -80,7 +79,8 @@
     }
   }
 
-  public void marshallProcess(Process proc, Writer out) throws IOException
+  @Override
+  public void marshallProcess(ProcessDefinition proc, Writer out) throws IOException
   {
     throw new NotImplementedException("JBPM-1639", "DialectHandler STP marshallProcess");
   }

Modified: projects/spec/trunk/modules/dialects/xpdl21/src/main/java/org/jbpm/dialect/xpdl21/DialectHandlerImpl.java
===================================================================
--- projects/spec/trunk/modules/dialects/xpdl21/src/main/java/org/jbpm/dialect/xpdl21/DialectHandlerImpl.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/dialects/xpdl21/src/main/java/org/jbpm/dialect/xpdl21/DialectHandlerImpl.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -35,7 +35,6 @@
 import org.jbpm.api.InvalidProcessException;
 import org.jbpm.api.NotImplementedException;
 import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Process;
 import org.jbpm.api.service.DialectHandler;
 import org.jbpm.dialect.xpdl21.model.XPDLWorkflowProcess;
 
@@ -55,7 +54,7 @@
   }
 
   @Override
-  public ProcessDefinition createProcessDefinition(String pXML)
+  public ProcessDefinition createProcess(String pXML)
   {
     try
     {
@@ -71,7 +70,7 @@
   }
 
   @Override
-  public ProcessDefinition createProcessDefinition(URL pURL) throws IOException
+  public ProcessDefinition createProcess(URL pURL) throws IOException
   {
     try
     {
@@ -87,7 +86,7 @@
   }
 
   @Override
-  public void marshallProcess(Process proc, Writer out) throws IOException
+  public void marshallProcess(ProcessDefinition proc, Writer out) throws IOException
   {
     throw new NotImplementedException("JBPM-1640", "DialectHandler XPL2.1 marshallProcess");
   }

Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java	2008-10-30 13:20:37 UTC (rev 2677)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java	2008-10-30 15:02:36 UTC (rev 2678)
@@ -237,17 +237,17 @@
 
   public <T extends ExecutionHandler> void setExecutionHandler(Class<T> clazz)
   {
-    this.execHandler = clazz.getName();
+    this.execHandler = clazz != null ? clazz.getName() : null;
   }
 
   public <T extends FlowHandler> void setFlowHandler(Class<T> clazz)
   {
-    this.flowHandler = clazz.getName();
+    this.flowHandler = clazz != null ? clazz.getName() : null;
   }
 
   public <T extends SignalHandler> void setSignalHandler(Class<T> clazz)
   {
-    this.sigHandler = clazz.getName();
+    this.sigHandler = clazz != null ? clazz.getName() : null;
   }
 
   @Override




More information about the jbpm-commits mailing list