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

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Sep 30 04:08:50 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-09-30 04:08:49 -0400 (Tue, 30 Sep 2008)
New Revision: 2444

Added:
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilderService.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilderService.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java
Removed:
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/engine/
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitSTPTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/sequence/
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataMarshallerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataDescriptorTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataMarshallerTest.java
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/runtime/ExecutionHandler.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/FlowHandler.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java
   projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
   projects/spec/trunk/modules/cts/pom.xml
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/executioncontext/ExecutionContextTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/processmanager/ProcessManagerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/signalmanager/SignalManagerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/persistence/PersistenceServiceTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/ProcessBuilderTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/TestProcessBuilder.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/SignalServiceTest.java
   projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EndEventImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EventImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/ProcessImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/StartEventImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/TaskImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java
   projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/PersistenceServiceImpl.java
   projects/spec/trunk/modules/impl/src/main/resources/jbpm-cfg-beans.xml
Log:
Restore CTS test cases from Alpha1

Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.jbpm.api.client;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.model.Message;
+
+//$Id$
+
+/**
+ * A MessageListener that can be registered with the ProcessEngine
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface MessageListener
+{
+  /**
+   * Get the id for this listener
+   */
+  ObjectName getID();
+  
+  /** 
+   * Catch a message from the process that this listener is registered with 
+   */
+  void catchMessage(Message message);
+}
\ No newline at end of file


Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.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/EventBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -0,0 +1,45 @@
+/*
+ * 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.Signal.SignalType;
+
+/**
+ * The EventBuilder can be used to build an Event dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface EventBuilder extends ProcessBuilder
+{
+  /**
+   * Add a signal ref to the last added EventDetail
+   */
+  EventBuilder addSignalRef(SignalType signalType, String signalMessage);
+
+  /**
+   * Add a message ref to the last added EventDetail
+   */
+  EventBuilder addMessageRef(String msgName);
+}
\ No newline at end of file


Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.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/GatewayBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.api.model.builder;
+
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+
+
+//$Id$
+
+/**
+ * The GatewayBuilder can be used to build a Gateway dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface GatewayBuilder extends ProcessBuilder
+{
+  /**
+   * Add the default {@link Gate}
+   */
+  GatewayBuilder addDefaultGate(String targetName);
+  
+  /**
+   * Add a conditional {@link Gate}
+   */
+  GatewayBuilder addConditionalGate(String targetName, ExpressionLanguage exprLang, String exprBody);
+
+  /**
+   * Add an unconditional {@link Gate}
+   */
+  GatewayBuilder addGate(String targetName);
+}
\ No newline at end of file


Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.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/MessageBuilderService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilderService.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilderService.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.jbpm.api.model.builder;
+
+//$Id$
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.service.Service;
+
+/**
+ * The MessageBuilder can be used to build a {@link Message} dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class MessageBuilderService implements Service
+{
+  /**
+   * Locate the default MessageBuilder
+   */
+  public static MessageBuilder locateMessageBuilder()
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
+    MessageBuilderService builderService = engine.getService(MessageBuilderService.class);
+    return builderService.getMessageBuilder();
+  }
+  
+  /**
+   * Get the MessageBuilder
+   */
+  public abstract MessageBuilder getMessageBuilder();
+}
\ No newline at end of file


Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilderService.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-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -23,9 +23,15 @@
 
 //$Id$
 
+import org.jbpm.api.model.Message;
 import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
 import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.StartEvent.TriggerType;
 import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.runtime.ExecutionHandler;
+import org.jbpm.api.runtime.FlowHandler;
+import org.jbpm.api.runtime.SignalHandler;
 
 /**
  * The ProcessBuilder can be used to build a {@link Process} dynamically.
@@ -56,9 +62,14 @@
   /**
    * Add a SartEvent with a given name
    */
-  ProcessBuilder addStartEvent(String name);
+  EventBuilder addStartEvent(String name);
 
   /**
+   * Add a SartEvent with a given name and TriggerType
+   */
+  EventBuilder addStartEvent(String name, TriggerType triggerType);
+
+  /**
    * Add an IntermediateEvent with a given name
    */
   ProcessBuilder addEvent(String name);
@@ -66,20 +77,51 @@
   /**
    * Add an EndEvent with a given name
    */
-  ProcessBuilder addEndEvent(String name);
+  EventBuilder addEndEvent(String name);
 
   /**
+   * Add an EndEvent with a given name and ResultType
+   */
+  EventBuilder addEndEvent(String name, ResultType resultType);
+
+  /**
    * Add a Task of {@link TaskType} NONE with a given name
    */
-  ProcessBuilder addTask(String name);
+  TaskBuilder addTask(String name);
 
   /**
    * Add a Task of {@link TaskType} with a given name
    */
-  ProcessBuilder addTask(String name, TaskType type);
+  TaskBuilder addTask(String name, TaskType type);
 
   /**
    * Add a Gateway with a given name
    */
-  ProcessBuilder addGateway(String name, GatewayType type);
+  GatewayBuilder addGateway(String name, GatewayType type);
+  
+  /**
+   * Add a {@link Message} with a given name.
+   */
+  MessageBuilder addMessage(String name);
+  
+  /**
+   * Add a process property
+   */
+  ProcessBuilder addProperty(String name, String value);
+  
+  
+  /**
+   * Add an {@link ExecutionHandler} with a given Class
+   */
+  <T extends ExecutionHandler> ProcessBuilder addExecutionHandler(Class<T> clazz);
+
+  /**
+   * Add an {@link FlowHandler} with a given Class
+   */
+  <T extends FlowHandler> ProcessBuilder addFlowHandler(Class<T> clazz);
+
+  /**
+   * Add an {@link SignalHandler} with a given Class
+   */
+  <T extends SignalHandler> ProcessBuilder addSignalHandler(Class<T> clazz);
 }
\ No newline at end of file

Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilderService.java (from rev 2438, 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/ProcessBuilderService.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilderService.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.jbpm.api.model.builder;
+
+//$Id$
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.service.Service;
+
+/**
+ * The ProcessBuilder can be used to build a {@link Process} dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class ProcessBuilderService implements Service
+{
+  /**
+   * Locate the default ProcessBuilder
+   */
+  public static ProcessBuilder locateProcessBuilder()
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
+    ProcessBuilderService builderService = engine.getService(ProcessBuilderService.class);
+    return builderService.getProcessBuilder();
+  }
+  
+  /**
+   * Get the ProcessBuilder
+   */
+  public abstract ProcessBuilder getProcessBuilder();
+}
\ No newline at end of file

Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -0,0 +1,41 @@
+/*
+ * 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$
+
+/**
+ * The TaskBuilder can be used to build a Task dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface TaskBuilder extends ProcessBuilder
+{
+  /**
+   * Add a {@link Message} reference.
+   * <p/>
+   * The {@link Message} must be defined at {@link Process} level
+   */
+  TaskBuilder addMessageRef(String msgName);
+}
\ No newline at end of file


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

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/ExecutionHandler.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/ExecutionHandler.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/ExecutionHandler.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -21,6 +21,8 @@
  */
 package org.jbpm.api.runtime;
 
+import java.io.Serializable;
+
 //$Id$
 
 
@@ -31,7 +33,7 @@
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
-public interface ExecutionHandler
+public interface ExecutionHandler extends Serializable
 {
   /**
    * Execute the associated business logic.

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/FlowHandler.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/FlowHandler.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/FlowHandler.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -23,6 +23,8 @@
 
 // $Id$
 
+import java.io.Serializable;
+
 import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Node;
 
@@ -33,7 +35,7 @@
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
-public interface FlowHandler
+public interface FlowHandler extends Serializable
 {
   /**
    * Execute the FlowHandler.

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -23,6 +23,8 @@
 
 // $Id$
 
+import java.io.Serializable;
+
 import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Node;
 import org.jbpm.api.model.Signal;
@@ -34,7 +36,7 @@
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
-public interface SignalHandler
+public interface SignalHandler extends Serializable
 {
   /** 
    * Get signal for enter 

Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java	                        (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.jbpm.api.service;
+
+//$Id$
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.client.MessageListener;
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.Event;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Node;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Participant;
+import org.jbpm.api.model.Task;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The ProcessEngine sends messages through the MessageService. 
+ * <p/> 
+ * A {@link Message} has an ID and is targeted to a
+ * specific Participant. A component can register a {@link MessageListener} with the MessageService.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public abstract class MessageService implements Service
+{
+  // Provide logging
+  final Logger log = LoggerFactory.getLogger(MessageService.class);
+
+  // The set of registered message listeners
+  private Map<ObjectName, MessageListener> listeners = new HashMap<ObjectName, MessageListener>();
+
+  /**
+   * Locate the default MessageService
+   */
+  public static MessageService locateMessageService()
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
+    return engine.getService(MessageService.class);
+  }
+
+  /**
+   * Add a MessageListener
+   */
+  public void addMessageListener(MessageListener listener)
+  {
+    synchronized (listeners)
+    {
+      if (hasMessageListener(listener.getID()))
+        throw new IllegalStateException("Listener already registered: " + listener.getID());
+
+      log.debug("addMessageListener: " + listener.getID());
+      listeners.put(listener.getID(), listener);
+    }
+  }
+
+  /**
+   * Get the set of registered MessageListeners 
+   */
+  public Set<MessageListener> getMessageListeners()
+  {
+    synchronized (listeners)
+    {
+      HashSet<MessageListener> set = new HashSet<MessageListener>(listeners.values());
+      return Collections.unmodifiableSet(set);
+    }
+  }
+
+  /**
+   * Get a MessageListener for a given ID
+   * 
+   * @return null if there is none
+   */
+  public MessageListener getMessageListener(ObjectName listenerID)
+  {
+    synchronized (listeners)
+    {
+      return listeners.get(listenerID);
+    }
+  }
+
+  /**
+   * True if there is a MessageListener for a given ID
+   */
+  public boolean hasMessageListener(ObjectName listenerID)
+  {
+    return getMessageListener(listenerID) != null;
+  }
+
+  /**
+   * Remove an MessageListener
+   */
+  public void removeMessageListener(ObjectName listenerID)
+  {
+    synchronized (listeners)
+    {
+      log.debug("removeMessageListener: " + listenerID);
+      listeners.remove(listenerID);
+    }
+  }
+
+  /**
+   * Send a message to a given {@link Task} or {@link Event}
+   */
+  public void sendMessage(ObjectName procID, String targetName, Message msg)
+  {
+    ProcessService procService = ProcessService.locateProcessService();
+    Process proc = procService.getProcessByKey(procID);
+    if (proc == null)
+      throw new IllegalStateException("Cannot obtain registered process: " + procID);
+
+    Node targetNode = proc.getNode(targetName);
+    if (targetNode == null)
+      throw new IllegalArgumentException("Cannot find message target: " + targetName);
+    if (targetNode instanceof MessageListener == false)
+      throw new IllegalArgumentException("Message target is not a valid message receiver: " + targetName);
+
+    log.debug("sendMessage to " + targetNode + " => " + msg);
+    MessageListener msgListener = (MessageListener)targetNode;
+    msgListener.catchMessage(msg);
+  }
+  
+  /**
+   * Send a message to a given {@link MessageListener}
+   */
+  public void sendMessage(Message msg)
+  {
+    Participant toRef = msg.getToRef();
+    if (toRef == null)
+      throw new IllegalArgumentException("Target entity cannot be null");
+    
+    MessageListener msgListener = getMessageListener(toRef.getName());
+    if (msgListener == null)
+      throw new IllegalStateException("No message listener registered for: " + toRef);
+
+    log.debug("sendMessage to '" + toRef + "' => " + msg);
+    msgListener.catchMessage(msg);
+  }
+}
\ No newline at end of file


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

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,6 +25,7 @@
 
 import javax.management.ObjectName;
 
+import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Process;
 
 /**
@@ -33,12 +34,30 @@
  * @author thomas.diesler at jboss.com
  * @since 17-Sep-2008
  */
-public interface PersistenceService extends Service
+public abstract class PersistenceService implements Service
 {
-  ObjectName saveProcess(Process proc);
+  /**
+   * Locate the default PersistenceService
+   */
+  public static PersistenceService locatePersistenceService()
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
+    return engine.getService(PersistenceService.class);
+  }
+  
+  /**
+   * Save the Process to persistent storage
+   */
+  public abstract ObjectName saveProcess(Process proc);
 
-  Process loadProcess(ObjectName key);
+  /**
+   * Load the Process from persistent storage
+   */
+  public abstract Process loadProcess(ObjectName key);
 
-  void deleteProcess(Process proc);
-
+  /**
+   * Delete the Process from persistent storage
+   */
+  public abstract void deleteProcess(Process proc);
+  
 }
\ No newline at end of file

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -57,6 +57,15 @@
   {
   }
 
+  /**
+   * Locate the default ProcessService
+   */
+  public static ProcessService locateProcessService()
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
+    return engine.getService(ProcessService.class);
+  }
+  
   /** 
    * Deploy a new process to the process service. 
    */

Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -27,6 +27,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.client.SignalListener;
 import org.jbpm.api.model.Signal;
 import org.slf4j.Logger;
@@ -48,6 +49,15 @@
   private Set<SignalListener> listeners = new HashSet<SignalListener>();
 
   /**
+   * Locate the default SignalService
+   */
+  public static SignalService locateSignalService()
+  {
+    ProcessEngine engine = ProcessEngine.getProcessEngine();
+    return engine.getService(SignalService.class);
+  }
+  
+  /**
    * Add a SignalListener for a given source
    */
   public void addSignalListener(SignalListener listener)

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-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -34,10 +34,15 @@
 import junit.framework.TestCase;
 
 import org.jbpm.api.Constants;
+import org.jbpm.api.client.MessageListener;
 import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
 import org.jbpm.api.model.Signal;
 import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.service.MessageService;
+import org.jbpm.api.service.ProcessService;
 import org.jbpm.api.service.SignalService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,6 +63,10 @@
   private SignalListener signalListener;
   // The signals caught by this test case
   private List<Signal> signals = new ArrayList<Signal>();
+  // The embedded MessageListener
+  private MessageListener messageListener;
+  // The messages caught by this test case
+  private List<Message> messages = new ArrayList<Message>();
 
   @Override
   protected void setUp() throws Exception
@@ -74,18 +83,35 @@
     {
       signals.clear();
     }
+    
+    // Setup the MessageListener
+    clearAllMessageListeners();
+    MessageService msgService = MessageService.locateMessageService();
+    msgService.addMessageListener(getMessageListener());
   }
 
   @Override
   protected void tearDown() throws Exception
   {
-    super.tearDown();
-    
     // Tear down the SignalListener
     ProcessEngine engine = ProcessEngine.getProcessEngine();
     SignalService sigService = engine.getService(SignalService.class);
     sigService.removeSignalListener(getSignalListener());
     
+    // Tear down the MessageListener
+    MessageService msgService = MessageService.locateMessageService();
+    msgService.removeMessageListener(getTestID());
+
+    // Check that there are no registered processes left
+    ProcessService procManager = ProcessService.locateProcessService();
+    Set<Process> procs = procManager.getProcesses();
+    if (procs.size() > 0)
+    {
+      String logMsg = "Registered processes on tear down of " + getName() + ": " + procs;
+      System.out.println(logMsg);
+      log.warn(logMsg);
+    }
+
     // Check that there are no registered signal listeners left
     Set<SignalListener> sigListeners = sigService.getSignalListeners();
     if (sigListeners.size() > 0)
@@ -95,6 +121,16 @@
       log.warn(logMsg);
     }
     
+    // Check that there are no registered message listeners left
+    Set<MessageListener> msgListeners = msgService.getMessageListeners();
+    if (msgListeners.size() > 0)
+    {
+      String logMsg = "Registered message listeners on tear down of " + getName() + ": " + msgListeners;
+      System.out.println(logMsg);
+      log.warn(logMsg);
+    }
+
+    super.tearDown();
     log.debug("### END " + getLongName());
   }
 
@@ -136,6 +172,14 @@
     }
   }
 
+  public List<Message> getMessages()
+  {
+    synchronized (messages)
+    {
+      return Collections.unmodifiableList(messages);
+    }
+  }
+  
   public List<Signal> getSignals(Signal.SignalType type)
   {
     synchronized (signals)
@@ -161,6 +205,16 @@
     }
   }
   
+  private void clearAllMessageListeners()
+  {
+    MessageService msgService = MessageService.locateMessageService();
+    Set<MessageListener> msgListeners = msgService.getMessageListeners();
+    for (MessageListener msgListener : msgListeners)
+    {
+      msgService.removeMessageListener(msgListener.getID());
+    }
+  }
+
   public SignalListener getSignalListener()
   {
     if (signalListener == null)
@@ -188,4 +242,28 @@
     }
     return signalListener;
   }
+
+  public MessageListener getMessageListener()
+  {
+    if (messageListener == null)
+    {
+      messageListener = new MessageListener()
+      {
+        public ObjectName getID()
+        {
+          return getTestID();
+        }
+
+        public void catchMessage(Message message)
+        {
+          synchronized (messages)
+          {
+            log.debug("catchMessage: " + message);
+            messages.add(message);
+          }
+        }
+      };
+    }
+    return messageListener;
+  }
 }

Modified: projects/spec/trunk/modules/cts/pom.xml
===================================================================
--- projects/spec/trunk/modules/cts/pom.xml	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/pom.xml	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
+  <!-- ====================================================================== -->
+  <!--                                                                        -->
+  <!--  JBoss, the OpenSource J2EE webOS                                      -->
+  <!--                                                                        -->
+  <!--  Distributable under LGPL license.                                     -->
+  <!--  See terms of license at http://www.gnu.org.                           -->
+  <!--                                                                        -->
+  <!-- ====================================================================== -->
 
-<!-- $Id$ -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <!-- $Id$ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <name>JBoss jBPM4 - CTS</name>
   <groupId>org.jbpm.jbpm4</groupId>
@@ -29,7 +30,7 @@
   <properties>
     <mysql.connector.version>5.1.6</mysql.connector.version>
   </properties>
-  
+
   <!-- Dependencies -->
   <dependencies>
     <dependency>
@@ -50,7 +51,7 @@
       <artifactId>slf4j-log4j12</artifactId>
     </dependency>
   </dependencies>
-  
+
   <!-- DependencyManagement -->
   <dependencyManagement>
     <dependencies>
@@ -61,16 +62,48 @@
       </dependency>
     </dependencies>
   </dependencyManagement>
-  
+
   <!-- Plugins -->
   <build>
     <plugins>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>org/jboss/bpm/cts/activity/ActivityInputSetTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/activity/ActivityOutputSetTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/activity/ActivityPropertyTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/endevent/EndEventMessageTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/executioncontext/ExecutionContextTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/processmanager/ProcessManagerTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/process/ProcessPropertyTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/signalmanager/SignalManagerTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/startevent/StartEventSignalTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/task/ReceiveTaskTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/task/SendTaskTest.java</exclude>
+            <exclude>org/jboss/bpm/cts/task/TaskExecutionHandlerTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/control/multichoice/MultiChoiceTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/control/simplemerge/SimpleMergeTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/data/casedata/CaseDataTest.java</exclude>
+            <exclude>org/jboss/bpm/pattern/data/taskdata/TaskDataTest.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
-  
+
   <!-- Profiles -->
   <profiles>
-  
+
     <!--
     Name: no-impl
     Descr: The default implementation profile
@@ -90,7 +123,7 @@
         </dependency>
       </dependencies>
     </profile>
-    
+
     <!-- 
       Name:  no-database
       Descr: Setup the default database   
@@ -113,7 +146,7 @@
         </dependency>
       </dependencies>
     </profile>
-    
+
   </profiles>
-  
+
 </project>
\ No newline at end of file

Copied: projects/spec/trunk/modules/cts/src/test/java/org/jboss (from rev 2416, projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss)

Copied: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm (from rev 2443, projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm)

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.activity;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Activity InputSet
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ActivityInputSetDescriptorTest extends ActivityInputSetTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/activity/activity-inputset-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.activity;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Activity InputSet
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ActivityInputSetMarshallerTest extends ActivityInputSetTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityInputSetTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,15 +25,14 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.EventDetail.EventDetailType;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * InputSets define the data requirements for input to the activity. Zero or more InputSets MAY be defined. Each
@@ -45,7 +44,7 @@
  * @author thomas.diesler at jboss.com
  * @since 15-Aug-2008
  */
-public class ActivityInputSetTest extends DefaultEngineTestCase
+public class ActivityInputSetTest extends CTSTestCase
 {
   public void testValidProps() throws Exception
   {
@@ -58,7 +57,7 @@
 
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("kermit", endMessage.getPropertyValue("frog"));
+    assertEquals("kermit", endMessage.getProperty("frog").getValue());
   }
 
   public void testInvalidProps() throws Exception
@@ -81,11 +80,11 @@
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("ActivityInputSet").addStartEvent("Start").addSequenceFlow("TaskA");
-    TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
-    taskBuilder.addInputSet().addPropertyInput("frog").addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetailType.Message).addMessageRef("EndMessage");
+    //TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
+    //taskBuilder.addInputSet().addPropertyInput("frog").addSequenceFlow("End");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("frog", null, true);
     Process proc = procBuilder.getProcess();

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,54 +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.cts.activity;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Activity OutputSet
- * 
- * https://jira.jboss.org/jira/browse/JBPM-1703
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ActivityOutputSetMarshallerTest extends ActivityOutputSetTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityOutputSetTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,14 +25,13 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.EventDetail.EventDetailType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * OutputSets define the data requirements for output from the activity. Zero or more OutputSets MAY be defined. At the
@@ -45,7 +44,7 @@
  * @author thomas.diesler at jboss.com
  * @since 15-Aug-2008
  */
-public class ActivityOutputSetTest extends DefaultEngineTestCase
+public class ActivityOutputSetTest extends CTSTestCase
 {
   public void testValidProps() throws Exception
   {
@@ -56,16 +55,16 @@
 
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("kermit", endMessage.getPropertyValue("frog"));
+    assertEquals("kermit", endMessage.getProperty("frog").getValue());
   }
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("ActivityInputSet").addStartEvent("Start").addSequenceFlow("TaskA");
-    TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
-    taskBuilder.addOutputSet().addPropertyOutput("frog", "kermit").addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetailType.Message).addMessageRef("EndMessage");
+    //TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
+    //taskBuilder.addOutputSet().addPropertyOutput("frog", "kermit").addSequenceFlow("End");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("frog", null, true);
     Process proc = procBuilder.getProcess();

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,49 +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.cts.activity;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * 
- * An ActivityPropertyTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ActivityPropertyDescriptorTest extends ActivityPropertyTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/activity/activity-property-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,53 +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.cts.activity;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * 
- * An ActivityPropertyTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ActivityPropertyMarshallerTest extends ActivityPropertyTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/activity/ActivityPropertyTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,16 +25,14 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Modeler-defined Properties MAY be added to an activity. These Properties are "local" to the activity. These
@@ -46,7 +44,7 @@
  * @author thomas.diesler at jboss.com
  * @since 15-Aug-2008
  */
-public class ActivityPropertyTest extends DefaultEngineTestCase
+public class ActivityPropertyTest extends CTSTestCase
 {
   public void testActivityPropertyRead() throws Exception
   {
@@ -56,17 +54,17 @@
     
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("bar", endMessage.getPropertyValue("propValue"));
+    assertEquals("bar", endMessage.getProperty("propValue").getValue());
   }
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("ActivityProperties").addStartEvent("Start").addSequenceFlow("TaskA");
     TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
     taskBuilder.addProperty("foo", "bar").addSequenceFlow("End");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "ActivityProperties_TaskA_foo", "propValue");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetail.EventDetailType.Message).addMessageRef("EndMessage");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "ActivityProperties_TaskA_foo", "propValue");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("propValue", null, true);
     Process proc = procBuilder.getProcess();

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.endevent;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test end event with message result
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class EndEventMessageDescriptorTest extends EndEventMessageTest
-{
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/endevent/endevent-message-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.endevent;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test end event with message result
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class EndEventMessageMarshallerTest extends EndEventMessageTest
-{
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/endevent/EndEventMessageTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,14 +25,14 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.EventDetail.EventDetailType;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test end event with message result
@@ -40,7 +40,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class EndEventMessageTest extends DefaultEngineTestCase
+public class EndEventMessageTest extends CTSTestCase
 {
   public void testStart() throws Exception
   {
@@ -56,15 +56,15 @@
 
     // Verify the result
     Message endMessage = getMessages().get(0);
-    assertEquals("the frog", endMessage.getPropertyValue("kermit"));
+    assertEquals("the frog", endMessage.getProperty("kermit").getValue());
   }
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("EndEventMessage").addStartEvent("Start");
     procBuilder.addSequenceFlow("TaskA").addTask("TaskA").addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("kermit", null, true);
     Process proc = procBuilder.getProcess();

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/executioncontext/ExecutionContextTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/executioncontext/ExecutionContextTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/executioncontext/ExecutionContextTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -23,9 +23,9 @@
 
 // $Id$
 
-import org.jboss.bpm.runtime.BasicExecutionContext;
-import org.jboss.bpm.runtime.ExecutionContext;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.runtime.BasicExecutionContext;
+import org.jbpm.api.runtime.ExecutionContext;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test the execution context
@@ -33,7 +33,7 @@
  * @author thomas.diesler at jboss.com
  * @since 03-Jul-2008
  */
-public class ExecutionContextTest extends DefaultEngineTestCase
+public class ExecutionContextTest extends CTSTestCase
 {
   public void testStringKey() throws Exception 
   {

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.exclusive;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ExclusiveMergeTest using the Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ExclusiveGatewayMergeDescriptorTest extends ExclusiveGatewayMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/gateway/exclusive/exclusive-merge-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.exclusive;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ExclusiveMergeTest using the process Marshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ExclusiveGatewayMergeMarshallerTest extends ExclusiveGatewayMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,22 +25,21 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.StartEvent.TriggerType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Exclusive data-based gateway that has multiple incoming sequence flows. The first token arriving from one of the
@@ -50,14 +49,14 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class ExclusiveGatewayMergeTest extends DefaultEngineTestCase
+public class ExclusiveGatewayMergeTest extends CTSTestCase
 {
   public void testGateA() throws Exception
   {
     Process proc = getProcess();
 
     // Add a signal listener that sends the other start trigger signal
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
     sigManager.addSignalListener(sigListener);
 
@@ -78,7 +77,7 @@
     // Verify the result
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValue"));
+    assertEquals("TaskA", endMessage.getProperty("taskValue").getValue());
   }
 
   public void testGateB() throws Exception
@@ -86,7 +85,7 @@
     Process proc = getProcess();
 
     // Add a signal listener that sends the other start trigger signal
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
     sigManager.addSignalListener(sigListener);
 
@@ -107,7 +106,7 @@
     // Verify the result
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("TaskB", endMessage.getPropertyValue("taskValue"));
+    assertEquals("TaskB", endMessage.getProperty("taskValue").getValue());
   }
 
   public void testInvalidToken() throws Exception
@@ -115,7 +114,7 @@
     Process proc = getProcess();
 
     // Add a signal listener that sends the other start trigger signal
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
     sigManager.addSignalListener(sigListener);
 
@@ -161,24 +160,24 @@
     // Verify the result
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValue"));
+    assertEquals("TaskA", endMessage.getProperty("taskValue").getValue());
   }
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
     TaskBuilder taskBuilder = procBuilder.addSequenceFlow("TaskA").addTask("TaskA");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValue");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValue");
     taskBuilder.addSequenceFlow("Merge");
-    eventBuilder = procBuilder.addStartEvent("StartB");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
+    eventBuilder = procBuilder.addStartEvent("StartB", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
     taskBuilder = procBuilder.addSequenceFlow("TaskB").addTask("TaskB");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValue");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValue");
     taskBuilder.addSequenceFlow("Merge");
     procBuilder.addGateway("Merge", GatewayType.Exclusive).addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetail.EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("taskValue", null, true);
     Process proc = procBuilder.getProcess();
@@ -203,8 +202,8 @@
     {
       if (nextSignal != null)
       {
-        SignalManager signalManager = SignalManager.locateSignalManager();
-        signalManager.throwSignal(nextSignal);
+        SignalService sigService = SignalService.locateSignalService();
+        sigService.throwSignal(nextSignal);
         nextSignal = null;
       }
     }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.exclusive;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ExclusiveSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ExclusiveGatewaySplitDescriptorTest extends ExclusiveGatewaySplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/gateway/exclusive/exclusive-split-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.exclusive;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ExclusiveSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ExclusiveGatewaySplitMarshallerTest extends ExclusiveGatewaySplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,15 +26,15 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.model.GatewayBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Exclusive data-based gateway that has conditional outgoing sequence flows. 
@@ -43,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class ExclusiveGatewaySplitTest extends DefaultEngineTestCase
+public class ExclusiveGatewaySplitTest extends CTSTestCase
 {
   public void testGateA() throws Exception
   {
@@ -93,7 +93,7 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess(getName()).addStartEvent("Start").addSequenceFlow("Split");
     GatewayBuilder gatewayBuilder = procBuilder.addGateway("Split", GatewayType.Exclusive);
     gatewayBuilder.addConditionalGate("EndA", ExpressionLanguage.MVEL, "foo < 10");

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.inclusive;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * InclusiveMergeTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class InclusiveGatewayMergeDescriptorTest extends InclusiveGatewayMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/gateway/inclusive/inclusive-merge-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.inclusive;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * InclusiveMergeTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class InclusiveGatewayMergeMarshallerTest extends InclusiveGatewayMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewayMergeTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,17 +26,17 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.StartEvent.TriggerType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Inclusive gateway that has multiple incoming sequence flows. All tokens arriving from incoming sequence flows
@@ -45,29 +45,29 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class InclusiveGatewayMergeTest extends DefaultEngineTestCase
+public class InclusiveGatewayMergeTest extends CTSTestCase
 {
   public void testGateA() throws Exception
   {
     Process proc = getProcess();
 
     // Add a signal listener that sends the other start trigger signal
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigService = SignalService.locateSignalService();
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
-    sigManager.addSignalListener(sigListener);
+    sigService.addSignalListener(sigListener);
 
     try
     {
       // Send start trigger signals
       proc.startProcess();
-      sigManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+      sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
 
       // Wait for the process to end
       proc.waitForEnd();
     }
     finally
     {
-      sigManager.removeSignalListener(sigListener);
+      sigService.removeSignalListener(sigListener);
     }
 
     List<Signal> endSignals = getSignals(Signal.SignalType.SYSTEM_END_EVENT_EXIT);
@@ -76,11 +76,11 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
-    eventBuilder = procBuilder.addSequenceFlow("Merge").addStartEvent("StartB");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
+    eventBuilder = procBuilder.addSequenceFlow("Merge").addStartEvent("StartB", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
     procBuilder.addSequenceFlow("Merge").addGateway("Merge", GatewayType.Inclusive).addSequenceFlow("End");
     procBuilder.addEndEvent("End");
     Process proc = procBuilder.getProcess();
@@ -105,8 +105,8 @@
     {
       if (nextSignal != null)
       {
-        SignalManager signalManager = SignalManager.locateSignalManager();
-        signalManager.throwSignal(nextSignal);
+        SignalService sigService = SignalService.locateSignalService();
+        sigService.throwSignal(nextSignal);
         nextSignal = null;
       }
     }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.inclusive;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * InclusiveSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class InclusiveGatewaySplitDescriptorTest extends InclusiveGatewaySplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/gateway/inclusive/inclusive-split-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}
\ No newline at end of file

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.inclusive;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * InclusiveSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class InclusiveGatewaySplitMarshallerTest extends InclusiveGatewaySplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}
\ No newline at end of file

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/inclusive/InclusiveGatewaySplitTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,15 +26,15 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.model.GatewayBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Inclusive gateway that has conditional outgoing sequence flows. 
@@ -43,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class InclusiveGatewaySplitTest extends DefaultEngineTestCase
+public class InclusiveGatewaySplitTest extends CTSTestCase
 {
   public void testGateA() throws Exception
   {
@@ -74,7 +74,7 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("InclusiveGatewaySplitTest").addStartEvent("Start").addSequenceFlow("Split");
     GatewayBuilder gatewayBuilder = procBuilder.addGateway("Split", GatewayType.Inclusive);
     gatewayBuilder.addConditionalGate("EndA", ExpressionLanguage.MVEL, "foo < 10");

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,49 +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.cts.gateway.parallel;
-
-//$Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-
-/**
- * ParallelMergeTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelGatewayMergeDescriptorTest extends ParallelGatewayMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/gateway/parallel/parallel-merge-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,53 +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.cts.gateway.parallel;
-
-//$Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-
-/**
- * ParallelMergeTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelGatewayMergeMarshallerTest extends ParallelGatewayMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewayMergeTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,22 +25,21 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.EventDetail.EventDetailType;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.StartEvent.TriggerType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Parallel gateway that that has multiple incoming sequence flows. Each token arriving from an incoming sequence flow
@@ -50,14 +49,14 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class ParallelGatewayMergeTest extends DefaultEngineTestCase
+public class ParallelGatewayMergeTest extends CTSTestCase
 {
   public void testParallelMerge() throws Exception
   {
     Process proc = getProcess();
 
     // Add a signal listener that sends the other start trigger signal
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
     sigManager.addSignalListener(sigListener);
 
@@ -77,8 +76,8 @@
 
     // Verify the result
     Message endMessage = getMessages().get(0);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValueA"));
-    assertEquals("TaskB", endMessage.getPropertyValue("taskValueB"));
+    assertEquals("TaskA", endMessage.getProperty("taskValueA").getValue());
+    assertEquals("TaskB", endMessage.getProperty("taskValueB").getValue());
   }
 
   public void testMergeTimeout() throws Exception
@@ -87,8 +86,8 @@
 
     // Start the process and send start trigger signal
     proc.startProcess();
-    SignalManager signalManager = SignalManager.locateSignalManager();
-    signalManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+    SignalService sigService = SignalService.locateSignalService();
+    sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
 
     // Wait for the process to end
     try
@@ -107,7 +106,7 @@
     Process proc = getProcess();
 
     // Add a signal listener that sends the other start trigger signal
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
     sigManager.addSignalListener(sigListener);
 
@@ -152,25 +151,25 @@
 
     // Verify the result
     Message endMessage = getMessages().get(0);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValueA"));
-    assertEquals("TaskB", endMessage.getPropertyValue("taskValueB"));
+    assertEquals("TaskA", endMessage.getProperty("taskValueA").getValue());
+    assertEquals("TaskB", endMessage.getProperty("taskValueB").getValue());
   }
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA");
-    eventBuilder.addEventDetail(EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
     TaskBuilder taskBuilder = procBuilder.addSequenceFlow("TaskA").addTask("TaskA");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValueA");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValueA");
     taskBuilder.addSequenceFlow("Merge");
-    eventBuilder = procBuilder.addStartEvent("StartB");
-    eventBuilder.addEventDetail(EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
+    eventBuilder = procBuilder.addStartEvent("StartB", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
     taskBuilder = procBuilder.addSequenceFlow("TaskB").addTask("TaskB");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValueB");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValueB");
     taskBuilder.addSequenceFlow("Merge");
     procBuilder.addGateway("Merge", GatewayType.Parallel).addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("taskValueA", null, true).addProperty("taskValueB", null, true);
     Process proc = procBuilder.getProcess();
@@ -195,8 +194,8 @@
     {
       if (nextSignal != null)
       {
-        SignalManager signalManager = SignalManager.locateSignalManager();
-        signalManager.throwSignal(nextSignal);
+        SignalService sigService = SignalService.locateSignalService();
+        sigService.throwSignal(nextSignal);
         nextSignal = null;
       }
     }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.parallel;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ParallelSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelGatewaySplitDescriptorTest extends ParallelGatewaySplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/gateway/parallel/parallel-split-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.gateway.parallel;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ParallelSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelGatewaySplitMarshallerTest extends ParallelGatewaySplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/gateway/parallel/ParallelGatewaySplitTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -28,13 +28,13 @@
 
 import javax.management.ObjectName;
 
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Gateway.GatewayType;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Parallel gateway that has uncontrolled outgoing sequence flows. All of them are taken, which leads to parallel paths
@@ -43,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class ParallelGatewaySplitTest extends DefaultEngineTestCase
+public class ParallelGatewaySplitTest extends CTSTestCase
 {
   public void testParallelSplit() throws Exception
   {
@@ -63,7 +63,7 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("ParallelGatewaySplit").addStartEvent("Start").addSequenceFlow("Split");
     procBuilder.addGateway("Split", GatewayType.Parallel).addSequenceFlow("EndA").addSequenceFlow("EndB");
     Process proc = procBuilder.addEndEvent("EndA").addEndEvent("EndB").getProcess();

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,69 +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.cts.process;
-
-// $Id$
-
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.test.DefaultEngineTestCase;
-
-/**
- * Test the intergety of various process definitions
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class ProcessIntegrityTest extends DefaultEngineTestCase
-{
-  public void testNoStartState() throws Exception
-  {
-    try
-    {
-      // Create a Process through the ProcessBuilder
-      ProcessBuilder builder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-      builder.addProcess("NoStartState").addTask("taskA").addSequenceFlow("end").addEndEvent("end").getProcess();
-      fail("InvalidProcessException expected");
-    }
-    catch (InvalidProcessException ex)
-    {
-      assertTrue("Unexpected message: " + ex.getMessage(), ex.getMessage().indexOf("start event") > 0);
-    }
-  }
-
-  public void testNoEndState() throws Exception
-  {
-    try
-    {
-      // Create a Process through the ProcessBuilder
-      ProcessBuilder builder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-      builder.addProcess("NoEndState").addStartEvent("Start").addSequenceFlow("taskA").addTask("taskA").addSequenceFlow("end").
-      addTask("end").getProcess();
-      fail("InvalidProcessException expected");
-    }
-    catch (InvalidProcessException ex)
-    {
-      assertTrue("Unexpected message: " + ex.getMessage(), ex.getMessage().indexOf("end event") > 0);
-    }
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.process;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * 
- * An ProcessPropertyTest using the Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ProcessPropertyDescriptorTest extends ProcessPropertyTest
-{
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/process/process-property-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.cts.process;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * 
- * An ProcessPropertyTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class ProcessPropertyMarshallerTest extends ProcessPropertyTest
-{
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/process/ProcessPropertyTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,15 +25,13 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Modeler-defined Properties MAY be added to a Process. These Properties are "local" to the Process. All Tasks,
@@ -47,7 +45,7 @@
  * @author thomas.diesler at jboss.com
  * @since 15-Aug-2008
  */
-public class ProcessPropertyTest extends DefaultEngineTestCase
+public class ProcessPropertyTest extends CTSTestCase
 {
   /**
    * Test the the process properties can be used by Assignments
@@ -61,16 +59,16 @@
 
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("bar", endMessage.getPropertyValue("propValue"));
+    assertEquals("bar", endMessage.getProperty("propValue").getValue());
   }
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("ProcessProperties").addStartEvent("Start").addSequenceFlow("TaskA");
-    procBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "ProcessProperties_foo", "propValue");
+    //procBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "ProcessProperties_foo", "propValue");
     procBuilder.addProperty("foo", "bar").addTask("TaskA").addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetail.EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("propValue", null, true);
     Process proc = procBuilder.getProcess();

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/processmanager/ProcessManagerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/processmanager/ProcessManagerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/processmanager/ProcessManagerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,31 +25,31 @@
 
 import javax.management.ObjectName;
 
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.service.ProcessService;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
- * Test the ProcessManager
+ * Test the ProcessService
  * 
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
-public class ProcessManagerTest extends DefaultEngineTestCase
+public class ProcessManagerTest extends CTSTestCase
 {
   public void testStartProcess() throws Exception
   {
     final Process proc = getProcess();
-    final ObjectName procID = proc.getID();
+    final ObjectName procID = proc.getKey();
 
-    final ProcessManager pm = ProcessManager.locateProcessManager();
-    assertNull("A process created through the builder is not registered automatically", pm.getProcessByID(procID));
+    final ProcessService procService = ProcessService.locateProcessService();
+    assertNull("A process created through the builder is not registered automatically", procService.getProcessByKey(procID));
 
     SignalListener sigListener = new SignalListener()
     {
@@ -60,10 +60,10 @@
 
       public void catchSignal(Signal signal)
       {
-        assertNotNull(pm.getProcessByID(procID));
+        assertNotNull(procService.getProcessByKey(procID));
       }
     };
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     sigManager.addSignalListener(sigListener);
 
     try
@@ -77,12 +77,12 @@
       sigManager.removeSignalListener(sigListener);
     }
 
-    assertNull("A terminated process is removed from the registry", pm.getProcessByID(procID));
+    assertNull("A terminated process is removed from the registry", procService.getProcessByKey(procID));
   }
 
   private Process getProcess()
   {
-    ProcessBuilder builder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess(getName()).addStartEvent("Start").addSequenceFlow("taskA");
     Process proc = builder.addTask("taskA").addSequenceFlow("end").addEndEvent("end").getProcess();
     return proc;

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/signalmanager/SignalManagerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/signalmanager/SignalManagerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/signalmanager/SignalManagerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -23,11 +23,11 @@
 
 // $Id$
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test the ProcessManager
@@ -35,9 +35,9 @@
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
-public class SignalManagerTest extends DefaultEngineTestCase
+public class SignalManagerTest extends CTSTestCase
 {
-  final SignalManager sigManager = SignalManager.locateSignalManager();
+  final SignalService sigManager = SignalService.locateSignalService();
   final Signal sigA = new Signal(getTestID(), SignalType.USER_SIGNAL, "A");
   final Signal sigB = new Signal(getTestID(), SignalType.USER_SIGNAL, "B");
 

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.startevent;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test start event with signal trigger
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class StartEventSignalDescriptorTest extends StartEventSignalTest
-{
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/startevent/startevent-signal-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.startevent;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test start event with signal trigger
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class StartEventSignalMarshallerTest extends StartEventSignalTest
-{
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/startevent/StartEventSignalTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,21 +26,20 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.EventDetail.EventDetailType;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.StartEvent.TriggerType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test start event with signal trigger
@@ -48,7 +47,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class StartEventSignalTest extends DefaultEngineTestCase
+public class StartEventSignalTest extends CTSTestCase
 {
   public void testStart() throws Exception
   {
@@ -56,15 +55,15 @@
 
     // Start the process and send start trigger signal
     proc.startProcess();
-    SignalManager signalManager = SignalManager.locateSignalManager();
-    signalManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+    SignalService sigService = SignalService.locateSignalService();
+    sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
 
     // Wait for the process to end
     proc.waitForEnd();
 
     // Verify the result
     Message endMessage = getMessages().get(0);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValue"));
+    assertEquals("TaskA", endMessage.getProperty("taskValue").getValue());
   }
 
   public void testRestart() throws Exception
@@ -73,15 +72,15 @@
 
     // Start the process and send start trigger signal
     proc.startProcess();
-    SignalManager signalManager = SignalManager.locateSignalManager();
-    signalManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+    SignalService sigService = SignalService.locateSignalService();
+    sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
 
     // Wait for the process to end
     proc.waitForEnd();
 
     // Start the process and send start trigger signal
     proc.startProcess();
-    signalManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+    sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
 
     // Wait for the process to end
     proc.waitForEnd();
@@ -89,8 +88,8 @@
     // Verify the result
     List<Message> messages = getMessages();
     assertEquals(2, messages.size());
-    assertEquals("TaskA", messages.get(0).getPropertyValue("taskValue"));
-    assertEquals("TaskA", messages.get(1).getPropertyValue("taskValue"));
+    assertEquals("TaskA", messages.get(0).getProperty("taskValue").getValue());
+    assertEquals("TaskA", messages.get(1).getProperty("taskValue").getValue());
   }
 
   public void testRestartBeforeEnd() throws Exception
@@ -99,7 +98,7 @@
 
     // Add a signal listener that sends the other start trigger signal
     TaskListener sigListener = new TaskListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     sigManager.addSignalListener(sigListener);
 
     try
@@ -119,19 +118,19 @@
     // Verify the result
     List<Message> messages = getMessages();
     assertEquals(2, messages.size());
-    assertEquals("TaskA", messages.get(0).getPropertyValue("taskValue"));
-    assertEquals("TaskA", messages.get(1).getPropertyValue("taskValue"));
+    assertEquals("TaskA", messages.get(0).getProperty("taskValue").getValue());
+    assertEquals("TaskA", messages.get(1).getProperty("taskValue").getValue());
   }
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-    EventBuilder eventBuilder = procBuilder.addProcess("StartEventSignal").addStartEvent("StartA");
-    eventBuilder.addEventDetail(EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess("StartEventSignal").addStartEvent("StartA", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
     TaskBuilder taskBuilder = procBuilder.addSequenceFlow("TaskA").addTask("TaskA");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValue");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValue");
     taskBuilder.addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("taskValue", null, true);
     Process proc = procBuilder.getProcess();
@@ -156,8 +155,8 @@
     {
       if (nextSignal != null)
       {
-        SignalManager signalManager = SignalManager.locateSignalManager();
-        signalManager.throwSignal(nextSignal);
+        SignalService sigService = SignalService.locateSignalService();
+        sigService.throwSignal(nextSignal);
         nextSignal = null;
       }
     }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Receive Task
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class ReceiveTaskDescriptorTest extends ReceiveTaskTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/task/task-receive-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Receive Task
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class ReceiveTaskMarshallerTest extends ReceiveTaskTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/ReceiveTaskTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,23 +25,23 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.client.MessageManager;
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.MessageBuilderFactory;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.EventDetail.EventDetailType;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.model.Task.TaskType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.InvalidProcessException;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.MessageBuilderService;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.service.MessageService;
+import org.jbpm.api.service.ProcessService;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test Receive Task
@@ -49,11 +49,11 @@
  * @author thomas.diesler at jboss.com
  * @since 03-Jul-2008
  */
-public class ReceiveTaskTest extends DefaultEngineTestCase
+public class ReceiveTaskTest extends CTSTestCase
 {
   public void testReceiveTaskWithNoMessage() throws Exception
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("ReceiveTaskTest").addStartEvent("Start").addSequenceFlow("TaskA");
     procBuilder.addTask("TaskA", TaskType.Receive).addSequenceFlow("End").addEndEvent("End");
     try
@@ -71,10 +71,10 @@
   {
     Process proc = getProcess();
 
-    MessageManager msgManager = MessageManager.locateMessageManager();
+    MessageService msgManager = MessageService.locateMessageService();
     try
     {
-      msgManager.sendMessage(proc.getID(), "TaskA", getMessage());
+      msgManager.sendMessage(proc.getKey(), "TaskA", getMessage());
       fail("Send to an unregistered process is expected to fail");
     }
     catch (RuntimeException ex)
@@ -86,19 +86,19 @@
   public void testSuspendedMessage() throws Exception
   {
     Process proc = getProcess();
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    procManager.registerProcess(proc);
+    ProcessService procService = ProcessService.locateProcessService();
+    procService.registerProcess(proc);
 
     // Send the message before the process is started
-    MessageManager msgManager = MessageManager.locateMessageManager();
-    msgManager.sendMessage(proc.getID(), "TaskA", getMessage());
+    MessageService msgManager = MessageService.locateMessageService();
+    msgManager.sendMessage(proc.getKey(), "TaskA", getMessage());
 
     proc.startProcess();
     proc.waitForEnd();
 
     Message endMsg = getMessages().get(0);
     assertNotNull("End message expected", endMsg);
-    assertEquals("bar", endMsg.getPropertyValue("foo"));
+    assertEquals("bar", endMsg.getProperty("foo").getValue());
   }
 
   public void testSuspendedToken() throws Exception
@@ -119,12 +119,12 @@
         if (sendMessage == true)
         {
           sendMessage = false;
-          MessageManager msgManager = MessageManager.locateMessageManager();
-          msgManager.sendMessage(proc.getID(), "TaskA", getMessage());
+          MessageService msgManager = MessageService.locateMessageService();
+          msgManager.sendMessage(proc.getKey(), "TaskA", getMessage());
         }
       }
     };
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     sigManager.addSignalListener(sigListener);
 
     try
@@ -139,27 +139,27 @@
 
     Message endMsg = getMessages().get(0);
     assertNotNull("End message expected", endMsg);
-    assertEquals("bar", endMsg.getPropertyValue("foo"));
+    assertEquals("bar", endMsg.getProperty("foo").getValue());
   }
 
   private Message getMessage()
   {
-    MessageBuilder procBuilder = MessageBuilderFactory.newInstance().newMessageBuilder();
+    MessageBuilder procBuilder = MessageBuilderService.locateMessageBuilder();
     Message msg = procBuilder.newMessage("ReceiveTaskMessage").addProperty("foo", "bar", true).getMessage();
     return msg;
   }
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     MessageBuilder msgBuilder = procBuilder.addProcess("ReceiveTaskTest").addMessage("ReceiveTaskMessage");
     msgBuilder.addProperty("foo", null, true);
     msgBuilder = procBuilder.addMessage("EndEventMessage");
     msgBuilder.addToRef(getTestID()).addProperty("foo", null, true);
     procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
     procBuilder.addTask("TaskA", TaskType.Receive).addMessageRef("ReceiveTaskMessage");
-    EventBuilder eventBuilder = procBuilder.addSequenceFlow("End").addEndEvent("End");
-    eventBuilder.addEventDetail(EventDetailType.Message).addMessageRef("EndEventMessage");
+    EventBuilder eventBuilder = procBuilder.addSequenceFlow("End").addEndEvent("End", ResultType.Message);
+    eventBuilder.addMessageRef("EndEventMessage");
     return procBuilder.getProcess();
   }
 }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/SendTaskDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Send Task
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class SendTaskDescriptorTest extends SendTaskTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/task/task-send-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/SendTaskMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test Send Task
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class SendTaskMarshallerTest extends SendTaskTest
-{
-  @Override
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/SendTaskTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/SendTaskTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,15 +26,15 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Task.TaskType;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.InvalidProcessException;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test Send Task
@@ -42,7 +42,7 @@
  * @author thomas.diesler at jboss.com
  * @since 03-Jul-2008
  */
-public class SendTaskTest extends DefaultEngineTestCase
+public class SendTaskTest extends CTSTestCase
 {
   public void testSendTask() throws Exception
   {
@@ -55,12 +55,12 @@
     
     List<Message> messages = getMessages();
     assertEquals(1, messages.size());
-    assertEquals("bar", messages.get(0).getPropertyValue("foo"));
+    assertEquals("bar", messages.get(0).getProperty("foo").getValue());
   }
 
   public void testSendTaskWithNoMessage() throws Exception
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("SendTaskTest").addStartEvent("Start").addSequenceFlow("TaskA");
     procBuilder.addTask("TaskA", TaskType.Send).addSequenceFlow("End").addEndEvent("End");
     try
@@ -76,7 +76,7 @@
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     MessageBuilder msgBuilder = procBuilder.addProcess("SendTaskTest").addMessage("SendTaskMessage");
     msgBuilder.addToRef(getTestID()).addProperty("foo", null, true);
     procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test ExecutionHandler attached to Task
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class TaskExecutionHandlerDescriptorTest extends TaskExecutionHandlerTest
-{
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("cts/task/task-executionhandler-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,49 +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.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Test ExecutionHandler attached to Task
- * 
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class TaskExecutionHandlerMarshallerTest extends TaskExecutionHandlerTest
-{
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/cts/task/TaskExecutionHandlerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,16 +25,14 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.Assignment;
-import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.runtime.ExecutionContext;
-import org.jboss.bpm.runtime.ExecutionHandler;
-import org.jboss.bpm.runtime.Token;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.runtime.ExecutionContext;
+import org.jbpm.api.runtime.ExecutionHandler;
+import org.jbpm.api.runtime.Token;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Test ExecutionHandler attached to Task
@@ -42,7 +40,7 @@
  * @author thomas.diesler at jboss.com
  * @since 03-Jul-2008
  */
-public class TaskExecutionHandlerTest extends DefaultEngineTestCase
+public class TaskExecutionHandlerTest extends CTSTestCase
 {
   public void testExecutionHandler() throws Exception
   {
@@ -58,13 +56,13 @@
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("TaskExecutionHandlerTest").addProperty("procProp", "kermit");
-    procBuilder.addAssignment(Assignment.AssignTime.Start, Expression.ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_procProp == 'kermit'", "procAssign");
+    //procBuilder.addAssignment(Assignment.AssignTime.Start, Expression.ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_procProp == 'kermit'", "procAssign");
     procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
     TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
     taskBuilder.addProperty("taskProp", "piggy").addExecutionHandler(TaskExecutionHandler.class).addSequenceFlow("End");
-    taskBuilder.addAssignment(Assignment.AssignTime.Start, Expression.ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_TaskA_taskProp == 'piggy'", "taskAssign");
+    //taskBuilder.addAssignment(Assignment.AssignTime.Start, Expression.ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_TaskA_taskProp == 'piggy'", "taskAssign");
     procBuilder.addEndEvent("End");
     return procBuilder.getProcess();
   }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.control.exclusivechoice;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ExclusiveChoiceTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ExclusiveChoiceDescriptorTest extends ExclusiveChoiceTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/control/exclusivechoice/pattern-control-exclusive-choice-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.pattern.control.exclusivechoice;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ExclusiveChoiceTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ExclusiveChoiceMarshallerTest extends ExclusiveChoiceTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/exclusivechoice/ExclusiveChoiceTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,15 +26,15 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.Gateway;
-import org.jboss.bpm.model.GatewayBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Gateway;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Exclusive data-based gateway that has conditional outgoing sequence flows. 
@@ -43,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class ExclusiveChoiceTest extends DefaultEngineTestCase
+public class ExclusiveChoiceTest extends CTSTestCase
 {
   public void testGateA() throws Exception
   {
@@ -93,11 +93,11 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess(getName()).addStartEvent("Start").addSequenceFlow("Split");
     GatewayBuilder gatewayBuilder = procBuilder.addGateway("Split", Gateway.GatewayType.Exclusive);
-    gatewayBuilder.addConditionalGate("EndA", Expression.ExpressionLanguage.MVEL, "foo < 10");
-    gatewayBuilder.addConditionalGate("EndB", Expression.ExpressionLanguage.MVEL, "foo > 10");
+    gatewayBuilder.addConditionalGate("EndA", ExpressionLanguage.MVEL, "foo < 10");
+    gatewayBuilder.addConditionalGate("EndB", ExpressionLanguage.MVEL, "foo > 10");
     procBuilder.addEndEvent("EndA").addEndEvent("EndB");
     Process proc = procBuilder.getProcess();
     return proc;

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.control.multichoice;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * MultiChoiceTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class MultiChoiceDescriptorTest extends MultiChoiceTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/control/multichoice/pattern-control-multi-choice-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}
\ No newline at end of file

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.pattern.control.multichoice;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * MultiChoiceTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class MultiChoiceMarshallerTest extends MultiChoiceTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}
\ No newline at end of file

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/multichoice/MultiChoiceTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,15 +26,15 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.Gateway;
-import org.jboss.bpm.model.GatewayBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.runtime.BasicAttachments;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Gateway;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Inclusive gateway that has conditional outgoing sequence flows. 
@@ -43,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class MultiChoiceTest extends DefaultEngineTestCase
+public class MultiChoiceTest extends CTSTestCase
 {
   public void testGateA() throws Exception
   {
@@ -74,11 +74,11 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("MultiChoiceTest").addStartEvent("Start").addSequenceFlow("Split");
     GatewayBuilder gatewayBuilder = procBuilder.addGateway("Split", Gateway.GatewayType.Inclusive);
-    gatewayBuilder.addConditionalGate("EndA", Expression.ExpressionLanguage.MVEL, "foo < 10");
-    gatewayBuilder.addConditionalGate("EndB", Expression.ExpressionLanguage.MVEL, "foo < 20");
+    gatewayBuilder.addConditionalGate("EndA", ExpressionLanguage.MVEL, "foo < 10");
+    gatewayBuilder.addConditionalGate("EndB", ExpressionLanguage.MVEL, "foo < 20");
     procBuilder.addEndEvent("EndA").addEndEvent("EndB");
     Process proc = procBuilder.getProcess();
     return proc;

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.control.parallelsplit;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ParallelSplitTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelSplitDescriptorTest extends ParallelSplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/control/parallelsplit/pattern-control-parallel-split-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.pattern.control.parallelsplit;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ParallelSplitTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelSplitMarshallerTest extends ParallelSplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitSTPTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitSTPTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitSTPTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.control.parallelsplit;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * ParallelSplitTest using the STP Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class ParallelSplitSTPTest extends ParallelSplitTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/control/parallelsplit/pattern-control-parallel-split.bpmn");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -28,13 +28,13 @@
 
 import javax.management.ObjectName;
 
-import org.jboss.bpm.model.Gateway;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Gateway;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Parallel gateway that has uncontrolled outgoing sequence flows. 
@@ -43,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class ParallelSplitTest extends DefaultEngineTestCase
+public class ParallelSplitTest extends CTSTestCase
 {
   public void testParallelSplit() throws Exception 
   {
@@ -63,7 +63,7 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     Process proc = procBuilder.addProcess(getName()).addStartEvent("Start").addSequenceFlow("Split").addGateway("Split", Gateway.GatewayType.Parallel).
     addSequenceFlow("EndA").addSequenceFlow("EndB").addEndEvent("EndA").addEndEvent("EndB").getProcess();
     return proc;

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.control.simplemerge;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * InclusiveMergeTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class SimpleMergeDescriptorTest extends SimpleMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/control/simplemerge/pattern-control-simple-merge-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.pattern.control.simplemerge;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * InclusiveMergeTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class SimpleMergeMarshallerTest extends SimpleMergeTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/simplemerge/SimpleMergeTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,17 +26,17 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Gateway;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Gateway;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.StartEvent.TriggerType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Inclusive gateway that has multiple incoming sequence flows. All tokens arriving from incoming sequence flows
@@ -45,7 +45,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class SimpleMergeTest extends DefaultEngineTestCase
+public class SimpleMergeTest extends CTSTestCase
 {
   public void testSimpleMerge() throws Exception
   {
@@ -53,7 +53,7 @@
 
     // Add a signal listener that sends the other start trigger signal
     MergeListener sigListener = new MergeListener(proc.getName(), new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));          
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     sigManager.addSignalListener(sigListener);
 
     try
@@ -76,11 +76,11 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
-    eventBuilder = procBuilder.addSequenceFlow("Merge").addStartEvent("StartB");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
+    eventBuilder = procBuilder.addSequenceFlow("Merge").addStartEvent("StartB", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
     procBuilder.addSequenceFlow("Merge").addGateway("Merge", Gateway.GatewayType.Inclusive).addSequenceFlow("End");
     procBuilder.addEndEvent("End");
     Process proc = procBuilder.getProcess();
@@ -105,8 +105,8 @@
     {
       if (nextSignal != null)
       {
-        SignalManager signalManager = SignalManager.locateSignalManager();
-        signalManager.throwSignal(nextSignal);
+        SignalService sigService = SignalService.locateSignalService();
+        sigService.throwSignal(nextSignal);
         nextSignal = null;
       }
     }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,49 +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.pattern.control.synchronization;
-
-//$Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-
-/**
- * ParallelMergeTest using the API Descriptor
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class SynchronizationDescriptorTest extends SynchronizationTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/control/synchronization/pattern-control-synchronization-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.control.synchronization;
-
-//$Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-
-/**
- * ParallelMergeTest using the ProcessMarshaller
- * 
- * @author thomas.diesler at jboss.com
- * @since 06-Aug-2008
- */
-public class SynchronizationMarshallerTest extends SynchronizationTest
-{
-  @Override
-  public Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,22 +25,21 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.client.SignalListener;
-import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.EventBuilder;
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Gateway;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Signal;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.model.Signal.SignalType;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.model.Gateway;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.StartEvent.TriggerType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.service.SignalService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Parallel gateway that that has multiple incoming sequence flows. Each token arriving from an incoming sequence flow
@@ -50,7 +49,7 @@
  * @author thomas.diesler at jboss.com
  * @since 06-Aug-2008
  */
-public class SynchronizationTest extends DefaultEngineTestCase
+public class SynchronizationTest extends CTSTestCase
 {
   public void testParallelMerge() throws Exception
   {
@@ -58,7 +57,7 @@
 
     // Add a signal listener that sends the other start trigger signal
     MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     sigManager.addSignalListener(sigListener);
 
     try
@@ -77,8 +76,8 @@
 
     // Verify the result
     Message endMessage = getMessages().get(0);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValueA"));
-    assertEquals("TaskB", endMessage.getPropertyValue("taskValueB"));
+    assertEquals("TaskA", endMessage.getProperty("taskValueA").getValue());
+    assertEquals("TaskB", endMessage.getProperty("taskValueB").getValue());
   }
 
   public void testMergeTimeout() throws Exception
@@ -87,8 +86,8 @@
 
     // Start the process and send start trigger signal
     proc.startProcess();
-    SignalManager signalManager = SignalManager.locateSignalManager();
-    signalManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+    SignalService sigService = SignalService.locateSignalService();
+    sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
 
     // Wait for the process to end
     try
@@ -109,7 +108,7 @@
     // Add a signal listener that sends the other start trigger signal
     Signal startTrigger = new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A");
     MergeListener sigListener = new MergeListener(startTrigger);
-    SignalManager sigManager = SignalManager.locateSignalManager();
+    SignalService sigManager = SignalService.locateSignalService();
     sigManager.addSignalListener(sigListener);
 
     try
@@ -154,25 +153,25 @@
 
     // Verify the result
     Message endMessage = getMessages().get(0);
-    assertEquals("TaskA", endMessage.getPropertyValue("taskValueA"));
-    assertEquals("TaskB", endMessage.getPropertyValue("taskValueB"));
+    assertEquals("TaskA", endMessage.getProperty("taskValueA").getValue());
+    assertEquals("TaskB", endMessage.getProperty("taskValueB").getValue());
   }
 
   public Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
-    EventBuilder eventBuilder = procBuilder.addProcess("Synchronization").addStartEvent("StartA");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess("Synchronization").addStartEvent("StartA", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
     TaskBuilder taskBuilder = procBuilder.addSequenceFlow("TaskA").addTask("TaskA");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValueA");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValueA");
     taskBuilder.addSequenceFlow("Merge");
-    eventBuilder = procBuilder.addStartEvent("StartB");
-    eventBuilder.addEventDetail(EventDetail.EventDetailType.Signal).addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
+    eventBuilder = procBuilder.addStartEvent("StartB", TriggerType.Signal);
+    eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
     taskBuilder = procBuilder.addSequenceFlow("TaskB").addTask("TaskB");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValueB");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValueB");
     taskBuilder.addSequenceFlow("Merge");
     procBuilder.addGateway("Merge", Gateway.GatewayType.Parallel).addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetail.EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("taskValueA", null, true).addProperty("taskValueB", null, true);
     Process proc = procBuilder.getProcess();
@@ -197,8 +196,8 @@
     {
       if (nextSignal != null)
       {
-        SignalManager signalManager = SignalManager.locateSignalManager();
-        signalManager.throwSignal(nextSignal);
+        SignalService sigService = SignalService.locateSignalService();
+        sigService.throwSignal(nextSignal);
         nextSignal = null;
       }
     }

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.pattern.data.casedata;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Data elements are supported which are specific to a process instance or case. They can be accessed by all components
- * of the process during the execution of the case. 
- * 
- * https://jira.jboss.org/jira/browse/JBPM-1519
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class CaseDataDescriptorTest extends CaseDataTest
-{
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/data/casedata/pattern-data-casedata-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,54 +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.pattern.data.casedata;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Data elements are supported which are specific to a process instance or case. They can be accessed by all components
- * of the process during the execution of the case. 
- * 
- * https://jira.jboss.org/jira/browse/JBPM-1519
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class CaseDataMarshallerTest extends CaseDataTest
-{
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    //System.out.println(procXML);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/casedata/CaseDataTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,15 +25,13 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Data elements are supported which are specific to a process instance or case. They can be accessed by all components
@@ -44,7 +42,7 @@
  * @author thomas.diesler at jboss.com
  * @since 15-Aug-2008
  */
-public class CaseDataTest extends DefaultEngineTestCase
+public class CaseDataTest extends CTSTestCase
 {
   public void testCaseProperties() throws Exception
   {
@@ -54,17 +52,17 @@
 
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("bar", endMessage.getPropertyValue("propValue"));
+    assertEquals("bar", endMessage.getProperty("propValue").getValue());
   }
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("CaseData");
-    procBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "CaseData_foo", "propValue");
+    //procBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "CaseData_foo", "propValue");
     procBuilder.addProperty("foo", "bar").addStartEvent("Start").addSequenceFlow("TaskA");
     procBuilder.addTask("TaskA").addSequenceFlow("End");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetail.EventDetailType.Message).addMessageRef("EndMessage");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("propValue", null, true);
     Process proc = procBuilder.getProcess();

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataDescriptorTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataDescriptorTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataDescriptorTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -1,50 +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.pattern.data.taskdata;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Data elements can be defined by tasks which are accessible only within the context of individual execution instances
- * of that task. 
- * 
- * https://jira.jboss.org/jira/browse/JBPM-1515
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class TaskDataDescriptorTest extends TaskDataTest
-{
-  protected Process getProcess() throws IOException
-  {
-    URL procURL = getResourceURL("pattern/data/taskdata/pattern-data-taskdata-" + getDialect() + ".xml");
-    ProcessManager pm = ProcessManager.locateProcessManager();
-    Process proc = pm.createProcess(procURL);
-    return proc;
-  }
-}
\ No newline at end of file

Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataMarshallerTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataMarshallerTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataMarshallerTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.pattern.data.taskdata;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jboss.bpm.client.ProcessManager;
-import org.jboss.bpm.model.Process;
-
-/**
- * Data elements can be defined by tasks which are accessible only within the context of individual execution instances
- * of that task. 
- * 
- * https://jira.jboss.org/jira/browse/JBPM-1515
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Aug-2008
- */
-public class TaskDataMarshallerTest extends TaskDataTest
-{
-  protected Process getProcess() throws IOException
-  {
-    // Marshall the process to a string
-    Process proc = super.getProcess();
-    String procXML = marshallProcess(proc);
-    
-    // Recreate the process from the marshalled process
-    ProcessManager procManager = ProcessManager.locateProcessManager();
-    return procManager.createProcess(procXML);
-  }
-}
\ No newline at end of file

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataTest.java
===================================================================
--- projects/spec/tags/jbpm-spec-1.0.0-Alpha1/modules/testsuite/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jboss/bpm/pattern/data/taskdata/TaskDataTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,16 +25,14 @@
 
 import java.io.IOException;
 
-import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Message;
-import org.jboss.bpm.model.MessageBuilder;
-import org.jboss.bpm.model.Process;
-import org.jboss.bpm.model.ProcessBuilder;
-import org.jboss.bpm.model.ProcessBuilderFactory;
-import org.jboss.bpm.model.TaskBuilder;
-import org.jboss.bpm.model.Assignment.AssignTime;
-import org.jboss.bpm.model.Expression.ExpressionLanguage;
-import org.jboss.bpm.test.DefaultEngineTestCase;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
+import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.test.CTSTestCase;
 
 /**
  * Data elements can be defined by tasks which are accessible only within the context of individual execution instances
@@ -45,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 15-Aug-2008
  */
-public class TaskDataTest extends DefaultEngineTestCase
+public class TaskDataTest extends CTSTestCase
 {
   public void testTaskDataRead() throws Exception
   {
@@ -55,17 +53,17 @@
     
     Message endMessage = getMessages().get(0);
     assertNotNull("EndMessage expected", endMessage);
-    assertEquals("bar", endMessage.getPropertyValue("foo"));
+    assertEquals("bar", endMessage.getProperty("foo").getValue());
   }
 
   protected Process getProcess() throws IOException
   {
-    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
     procBuilder.addProcess("TaskData").addStartEvent("Start").addSequenceFlow("TaskA");
     TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
     taskBuilder.addProperty("foo", "bar").addSequenceFlow("End");
-    taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "TaskData_TaskA_foo", "foo");
-    procBuilder.addEndEvent("End").addEventDetail(EventDetail.EventDetailType.Message).addMessageRef("EndMessage");
+    //taskBuilder.addAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "TaskData_TaskA_foo", "foo");
+    procBuilder.addEndEvent("End", ResultType.Message).addMessageRef("EndMessage");
     MessageBuilder msgBuilder = procBuilder.addMessage("EndMessage");
     msgBuilder.addToRef(getTestID()).addProperty("foo", null, true);
     Process proc = procBuilder.getProcess();

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/persistence/PersistenceServiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/persistence/PersistenceServiceTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/persistence/PersistenceServiceTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,7 +26,6 @@
 import javax.management.ObjectName;
 
 import org.jbpm.api.ProcessNotFoundException;
-import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Process;
 import org.jbpm.api.service.PersistenceService;
 import org.jbpm.api.test.CTSTestCase;
@@ -45,8 +44,7 @@
    */
   public void testSaveLoadDelete() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    PersistenceService service = engine.getService(PersistenceService.class);
+    PersistenceService service = PersistenceService.locatePersistenceService();
 
     // Save the process
     Process proc = TestProcessBuilder.getTrivalProcess();

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/ProcessBuilderTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/ProcessBuilderTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/ProcessBuilderTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -24,9 +24,9 @@
 // $Id$
 
 import org.jbpm.api.InvalidProcessException;
-import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Process;
 import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
 import org.jbpm.api.test.CTSTestCase;
 
 /**
@@ -45,8 +45,7 @@
 
   public void testNoProcessName() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess(null).addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask("Task").addSequenceFlow("End").addEndEvent("End");
     try
@@ -62,8 +61,7 @@
 
   public void testNoStartName() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent(null).addSequenceFlow("Task");
     builder.addTask("Task").addSequenceFlow("End").addEndEvent("End");
     try
@@ -79,8 +77,7 @@
 
   public void testNoTaskName() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask(null).addSequenceFlow("End").addEndEvent("End");
     try
@@ -96,8 +93,7 @@
 
   public void testNoEndName() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask("Task").addSequenceFlow("End").addEndEvent(null);
     try
@@ -113,8 +109,7 @@
 
   public void testNoStartEvent() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addTask("Task").addSequenceFlow("End").addEndEvent("End");
     try
     {
@@ -129,8 +124,7 @@
 
   public void testNoEndEvent() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask("Task");
     try
@@ -146,8 +140,7 @@
 
   public void testUnreachableNode() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task1");
     builder.addTask("Task1").addSequenceFlow("End").addTask("Task2").addSequenceFlow("End").addEndEvent("End");
     try
@@ -163,8 +156,7 @@
 
   public void testDeadEndNode() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask("Task").addEndEvent("End");
     try

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/TestProcessBuilder.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/TestProcessBuilder.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/processbuilder/TestProcessBuilder.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,13 +25,13 @@
 
 import junit.framework.TestCase;
 
-import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.EndEvent;
 import org.jbpm.api.model.Process;
 import org.jbpm.api.model.SequenceFlow;
 import org.jbpm.api.model.StartEvent;
 import org.jbpm.api.model.Task;
 import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
 
 /**
  * A catalog of CTS test processes
@@ -43,8 +43,7 @@
 {
   public static Process getTrivalProcess()
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask("Task").addSequenceFlow("End").addEndEvent("End");
     Process proc = builder.getProcess();

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/SignalServiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/SignalServiceTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/SignalServiceTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,7 +25,6 @@
 
 import java.util.List;
 
-import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Signal;
 import org.jbpm.api.model.Signal.SignalType;
 import org.jbpm.api.service.SignalService;
@@ -44,9 +43,7 @@
    */
   public void testSignalListener() throws Exception
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    SignalService sigService = engine.getService(SignalService.class);
-    
+    SignalService sigService = SignalService.locateSignalService();
     Signal signal = new Signal(getTestID(), SignalType.USER_SIGNAL, "HelloWorld");
     sigService.throwSignal(signal);
     

Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -26,11 +26,11 @@
 import java.io.IOException;
 import java.util.List;
 
-import org.jbpm.api.client.ProcessEngine;
 import org.jbpm.api.model.Process;
 import org.jbpm.api.model.Signal;
 import org.jbpm.api.model.Signal.SignalType;
 import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
 import org.jbpm.api.service.ProcessService;
 import org.jbpm.api.test.CTSTestCase;
 
@@ -48,8 +48,7 @@
     // Start the Process
     Process proc = getProcess();
     
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessService procService = engine.getService(ProcessService.class);
+    ProcessService procService = ProcessService.locateProcessService();
     procService.registerProcess(proc);
     
     proc.startProcess();
@@ -69,8 +68,7 @@
 
   public Process getProcess() throws IOException
   {
-    ProcessEngine engine = ProcessEngine.getProcessEngine();
-    ProcessBuilder builder = engine.getService(ProcessBuilder.class);
+    ProcessBuilder builder = ProcessBuilderService.locateProcessBuilder();
     builder.addProcess("Proc").addStartEvent("Start").addSequenceFlow("Task");
     builder.addTask("Task").addSequenceFlow("End").addEndEvent("End");
     Process proc = builder.getProcess();

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EndEventImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EndEventImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EndEventImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -83,6 +83,11 @@
     return resultType;
   }
   
+  public void setResultType(ResultType resultType)
+  {
+    this.resultType = resultType;
+  }
+
   @Override
   @Transient
   public ObjectName getKey()
@@ -112,6 +117,8 @@
   {
     return new SignalHandler()
     {
+      private static final long serialVersionUID = 1L;
+      
       ProcessEngine engine = ProcessEngine.getProcessEngine();
       SignalService sigService = engine.getService(SignalService.class);
       public void throwEnterSignal(Token token)
@@ -138,6 +145,8 @@
   {
     return new FlowHandler()
     {
+      private static final long serialVersionUID = 1L;
+
       public void execute(TokenExecutor tokenExecutor, Token token)
       {
         log.debug("End reached in: " + getName());

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EventImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EventImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/EventImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -83,6 +83,8 @@
   {
     return new SignalHandler()
     {
+      private static final long serialVersionUID = 1L;
+      
       ProcessEngine engine = ProcessEngine.getProcessEngine();
       SignalService sigService = engine.getService(SignalService.class);
       public void throwEnterSignal(Token token)

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -161,6 +161,11 @@
     return Collections.unmodifiableSet(properties);
   }
 
+  public void addProperty(Property prop)
+  {
+    properties.add(prop);
+  }
+  
   public List<SequenceFlow> getInFlows()
   {
     return inFlows;
@@ -171,6 +176,21 @@
     return outFlows;
   }
 
+  public <T extends ExecutionHandler> void setExecutionHandler(Class<T> clazz)
+  {
+    this.execHandler = clazz.getName();
+  }
+
+  public <T extends FlowHandler> void setFlowHandler(Class<T> clazz)
+  {
+    this.flowHandler = clazz.getName();
+  }
+
+  public <T extends SignalHandler> void setSignalHandler(Class<T> clazz)
+  {
+    this.sigHandler = clazz.getName();
+  }
+
   public ExecutionHandler getExecutionHandler(boolean defaultHandler)
   {
     if (customExecHandler == null && execHandler != null)
@@ -186,6 +206,8 @@
   {
     return new ExecutionHandler()
     {
+      private static final long serialVersionUID = 1L;
+
       public void execute(Token token)
       {
         // nothing to do
@@ -222,6 +244,8 @@
     final Node thisNode = this;
     return new FlowHandler()
     {
+      private static final long serialVersionUID = 1L;
+
       public void execute(TokenExecutor tokenExecutor, Token token)
       {
         if (getOutFlows().size() == 1)

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/ProcessImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/ProcessImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/ProcessImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -139,6 +139,11 @@
     return Collections.unmodifiableSet(properties);
   }
   
+  public void addProperty(Property prop)
+  {
+    properties.add(prop);
+  }
+  
   public void addNode(NodeImpl nodeImpl)
   {
     if (nodeImpl == null)

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/StartEventImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/StartEventImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/StartEventImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -78,6 +78,11 @@
     return triggerType;
   }
 
+  public void setTriggerType(TriggerType triggerType)
+  {
+    this.triggerType = triggerType;
+  }
+
   @Override
   public ObjectName getKey()
   {
@@ -106,6 +111,8 @@
   {
     return new SignalHandler()
     {
+      private static final long serialVersionUID = 1L;
+      
       ProcessEngine engine = ProcessEngine.getProcessEngine();
       SignalService sigService = engine.getService(SignalService.class);
       public void throwEnterSignal(Token token)

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/TaskImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/TaskImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/TaskImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -118,6 +118,8 @@
   {
     return new SignalHandler()
     {
+      private static final long serialVersionUID = 1L;
+      
       ProcessEngine engine = ProcessEngine.getProcessEngine();
       SignalService sigService = engine.getService(SignalService.class);
       public void throwEnterSignal(Token token)

Added: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java	                        (rev 0)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -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.ri.model.builder;
+
+//$Id$
+
+import org.jbpm.api.NotImplementedException;
+import org.jbpm.api.model.Event;
+import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.ri.model.NodeImpl;
+import org.jbpm.ri.model.ProcessImpl;
+
+/**
+ * The EventBuilder can be used to build an {@link Event} dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class EventBuilderImpl extends ProcessBuilderImpl implements EventBuilder
+{
+  public EventBuilderImpl(ProcessImpl proc, NodeImpl node)
+  {
+    super(proc, node);
+  }
+
+  public EventBuilder addMessageRef(String msgName)
+  {
+    throw new NotImplementedException();
+  }
+
+  public EventBuilder addSignalRef(SignalType signalType, String signalMessage)
+  {
+    throw new NotImplementedException();
+  }
+}
\ No newline at end of file


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

Added: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java	                        (rev 0)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -0,0 +1,59 @@
+/*
+ * 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.ri.model.builder;
+
+//$Id$
+
+import org.jbpm.api.NotImplementedException;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.ri.model.NodeImpl;
+import org.jbpm.ri.model.ProcessImpl;
+
+/**
+ * The GatewayBuilder can be used to build a {@link Gateway} dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class GatewayBuilderImpl extends ProcessBuilderImpl implements GatewayBuilder
+{
+  public GatewayBuilderImpl(ProcessImpl proc, NodeImpl node)
+  {
+    super(proc, node);
+  }
+
+  public GatewayBuilder addConditionalGate(String targetName, ExpressionLanguage exprLang, String exprBody)
+  {
+    throw new NotImplementedException();
+  }
+
+  public GatewayBuilder addDefaultGate(String targetName)
+  {
+    throw new NotImplementedException();
+  }
+
+  public GatewayBuilder addGate(String targetName)
+  {
+    throw new NotImplementedException();
+  }
+}
\ No newline at end of file


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

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -25,14 +25,23 @@
 
 import org.jbpm.api.NotImplementedException;
 import org.jbpm.api.model.Process;
+import org.jbpm.api.model.EndEvent.ResultType;
 import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.StartEvent.TriggerType;
 import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.MessageBuilder;
 import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.service.Service;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.runtime.ExecutionHandler;
+import org.jbpm.api.runtime.FlowHandler;
+import org.jbpm.api.runtime.SignalHandler;
 import org.jbpm.ri.model.EndEventImpl;
 import org.jbpm.ri.model.EventImpl;
 import org.jbpm.ri.model.NodeImpl;
 import org.jbpm.ri.model.ProcessImpl;
+import org.jbpm.ri.model.PropertyImpl;
 import org.jbpm.ri.model.SequenceFlowImpl;
 import org.jbpm.ri.model.StartEventImpl;
 import org.jbpm.ri.model.TaskImpl;
@@ -43,7 +52,7 @@
  * @author thomas.diesler at jboss.com
  * @since 08-Jul-2008
  */
-public class ProcessBuilderImpl implements ProcessBuilder, Service
+public class ProcessBuilderImpl implements ProcessBuilder
 {
   protected ProcessImpl proc;
   protected NodeImpl node;
@@ -52,6 +61,12 @@
   {
   }
 
+  protected ProcessBuilderImpl(ProcessImpl proc, NodeImpl node)
+  {
+    this.proc = proc;
+    this.node = node;
+  }
+
   public ProcessBuilder addProcess(String procName)
   {
     proc = new ProcessImpl(procName);
@@ -84,31 +99,48 @@
     return this;
   }
 
-  public ProcessBuilder addStartEvent(String name)
+  public EventBuilder addStartEvent(String name)
   {
-    node = new StartEventImpl(name);
-    return addNode(node);
+    addNode(node = new StartEventImpl(name));
+    return new EventBuilderImpl(proc, node);
   }
 
-  public ProcessBuilder addEvent(String name)
+  public EventBuilder addStartEvent(String name, TriggerType triggerType)
   {
-    node = new EventImpl(name);
-    return addNode(node);
+    StartEventImpl startImpl = new StartEventImpl(name);
+    startImpl.setTriggerType(triggerType);
+    addNode(node = startImpl);
+    return new EventBuilderImpl(proc, node);
   }
+  
+  public EventBuilder addEvent(String name)
+  {
+    addNode(node = new EventImpl(name));
+    return new EventBuilderImpl(proc, node);
+  }
 
-  public ProcessBuilder addEndEvent(String name)
+  public EventBuilder addEndEvent(String name)
   {
-    node = new EndEventImpl(name);
-    return addNode(node);
+    addNode(node = new EndEventImpl(name));
+    return new EventBuilderImpl(proc, node);
   }
 
-  public ProcessBuilder addTask(String name)
+  public EventBuilder addEndEvent(String name, ResultType resultType)
   {
-    return addTask(name, TaskType.None);
+    EndEventImpl endImpl = new EndEventImpl(name);
+    endImpl.setResultType(resultType);
+    addNode(node = endImpl);
+    return new EventBuilderImpl(proc, node);
   }
 
-  public ProcessBuilder addTask(String name, TaskType type)
+  public TaskBuilder addTask(String name)
   {
+    addTask(name, TaskType.None);
+    return new TaskBuilderImpl(proc, node);
+  }
+
+  public TaskBuilder addTask(String name, TaskType type)
+  {
     if (type == TaskType.None || type == null)
     {
       node = new TaskImpl(name);
@@ -145,35 +177,69 @@
     {
       throw new IllegalStateException("Task type: " + type);
     }
-    return addNode(node);
+    addNode(node);
+    return new TaskBuilderImpl(proc, node);
   }
 
-  public ProcessBuilder addGateway(String name, GatewayType type)
+  public GatewayBuilder addGateway(String name, GatewayType type)
   {
-    node = (NodeImpl)getProcessInternal().getNode(name);
-    if (node == null)
+    if (GatewayType.Exclusive == type)
     {
-      if (GatewayType.Exclusive == type)
-      {
-        throw new NotImplementedException();
-      }
-      else if (GatewayType.Inclusive == type)
-      {
-        throw new NotImplementedException();
-      }
-      else if (GatewayType.Parallel == type)
-      {
-        throw new NotImplementedException();
-      }
-      else if (GatewayType.Complex == type)
-      {
-        throw new NotImplementedException();
-      }
-      addNode(node);
+      throw new NotImplementedException();
     }
+    else if (GatewayType.Inclusive == type)
+    {
+      throw new NotImplementedException();
+    }
+    else if (GatewayType.Parallel == type)
+    {
+      throw new NotImplementedException();
+    }
+    else if (GatewayType.Complex == type)
+    {
+      throw new NotImplementedException();
+    }
+    addNode(node);
+    return new GatewayBuilderImpl(proc, node);
+  }
+
+  public <T extends ExecutionHandler> ProcessBuilder addExecutionHandler(Class<T> clazz)
+  {
+    node.setExecutionHandler(clazz);
     return this;
   }
 
+  public <T extends FlowHandler> ProcessBuilder addFlowHandler(Class<T> clazz)
+  {
+    node.setFlowHandler(clazz);
+    return this;
+  }
+
+  public <T extends SignalHandler> ProcessBuilder addSignalHandler(Class<T> clazz)
+  {
+    node.setSignalHandler(clazz);
+    return this;
+  }
+
+  public MessageBuilder addMessage(String name)
+  {
+    throw new NotImplementedException();
+  }
+
+  public ProcessBuilder addProperty(String name, String value)
+  {
+    PropertyImpl prop = new PropertyImpl(name, value);
+    if (node != null)
+    {
+      node.addProperty(prop);
+    }
+    else
+    {
+      proc.addProperty(prop);
+    }
+    return this;
+  }
+
   private ProcessBuilder addNode(NodeImpl nodeImpl)
   {
     getProcessInternal().addNode(nodeImpl);

Added: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java	                        (rev 0)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -0,0 +1,49 @@
+/*
+ * 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.ri.model.builder;
+
+//$Id$
+
+import org.jbpm.api.NotImplementedException;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.ri.model.NodeImpl;
+import org.jbpm.ri.model.ProcessImpl;
+
+/**
+ * The TaskBuilder can be used to dynamically build {@link Task}.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class TaskBuilderImpl extends ProcessBuilderImpl implements TaskBuilder
+{
+  public TaskBuilderImpl(ProcessImpl proc, NodeImpl node)
+  {
+    super(proc, node);
+  }
+
+  public TaskBuilder addMessageRef(String msgName)
+  {
+    throw new NotImplementedException();
+  }
+
+}
\ No newline at end of file


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

Added: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java	                        (rev 0)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -0,0 +1,41 @@
+/*
+ * 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.ri.service;
+
+// $Id$
+
+import org.jbpm.api.client.MessageListener;
+import org.jbpm.api.model.Message;
+import org.jbpm.api.service.MessageService;
+
+/**
+ * The ProcessEngine sends messages through the MessageService. 
+ * <p/> 
+ * A {@link Message} has an ID and is targeted to a
+ * specific Participant. A component can register a {@link MessageListener} with the MessageService.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 17-Sep-2008
+ */
+public class MessageServiceImpl extends MessageService
+{
+}


Property changes on: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/PersistenceServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/PersistenceServiceImpl.java	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/PersistenceServiceImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -49,7 +49,7 @@
  * @author thomas.diesler at jboss.com
  * @since 17-Sep-2008
  */
-public class PersistenceServiceImpl implements PersistenceService
+public class PersistenceServiceImpl extends PersistenceService
 {
   // Provide logging
   final Logger log = LoggerFactory.getLogger(PersistenceServiceImpl.class);

Added: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java	                        (rev 0)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java	2008-09-30 08:08:49 UTC (rev 2444)
@@ -0,0 +1,44 @@
+/*
+ * 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.ri.service;
+
+// $Id$
+
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.ProcessBuilderService;
+import org.jbpm.ri.model.builder.ProcessBuilderImpl;
+
+/**
+ * The ProcessBuilder can be used to build a {@link Process} dynamically.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public class ProcessBuilderServiceImpl extends ProcessBuilderService
+{
+  @Override
+  public ProcessBuilder getProcessBuilder()
+  {
+    return new ProcessBuilderImpl();
+  }
+}
\ No newline at end of file


Property changes on: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/spec/trunk/modules/impl/src/main/resources/jbpm-cfg-beans.xml
===================================================================
--- projects/spec/trunk/modules/impl/src/main/resources/jbpm-cfg-beans.xml	2008-09-30 00:03:33 UTC (rev 2443)
+++ projects/spec/trunk/modules/impl/src/main/resources/jbpm-cfg-beans.xml	2008-09-30 08:08:49 UTC (rev 2444)
@@ -9,6 +9,7 @@
       <property name="services">
         <set elementClass="org.jbpm.api.service.Service">
           <inject bean="jBPMExecutionService" />
+          <inject bean="jBPMMessageService" />
           <inject bean="jBPMPersistenceService" />
           <inject bean="jBPMProcessBuilderService" />
           <inject bean="jBPMProcessService" />
@@ -35,7 +36,8 @@
 
     <!-- Other Services -->
     <bean name="jBPMExecutionService" class="org.jbpm.ri.service.ExecutionServiceImpl" />
-    <bean name="jBPMProcessBuilderService" class="org.jbpm.ri.model.builder.ProcessBuilderImpl" />
+    <bean name="jBPMMessageService" class="org.jbpm.ri.service.MessageServiceImpl" />
+    <bean name="jBPMProcessBuilderService" class="org.jbpm.ri.service.ProcessBuilderServiceImpl" />
     <bean name="jBPMProcessService" class="org.jbpm.ri.service.ProcessServiceImpl" />
     <bean name="jBPMSignalService" class="org.jbpm.ri.service.SignalServiceImpl" />
     




More information about the jbpm-commits mailing list