[jbpm-commits] JBoss JBPM SVN: r1895 - in jbossbpm/spec/trunk/modules: ri/src/main/java/org/jboss/bpm/model/internal and 8 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Aug 14 15:43:53 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-08-14 15:43:52 -0400 (Thu, 14 Aug 2008)
New Revision: 1895

Added:
   jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java
   jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/
   jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationAPITest.java
   jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java
   jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java
   jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/
   jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization-api10.xml
   jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn
   jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn_diagram
   jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.png
Removed:
   jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/cts/gateway/parallel/
   jbossbpm/spec/trunk/modules/testsuite/src/test/resources/cts/gateway/parallel/
Modified:
   jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
   jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
   jbossbpm/spec/trunk/modules/testsuite/pom.xml
Log:
Add pattern synchronization

Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java	2008-08-14 16:07:59 UTC (rev 1894)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java	2008-08-14 19:43:52 UTC (rev 1895)
@@ -63,7 +63,7 @@
    */
   public void addSignalListener(String procName, SignalListener listener)
   {
-    log.debug("addSignalListener: " + listener);
+    log.debug("addSignalListener: " + procName + "=" + listener);
     Set<SignalListener> set = listeners.get(procName);
     if (set == null)
     {
@@ -78,7 +78,7 @@
    */
   public void removeSignalListener(String procName, SignalListener listener)
   {
-    log.debug("removeSignalListener: " + listener);
+    log.debug("removeSignalListener: " + procName + "=" + listener);
     Set<SignalListener> set = listeners.get(procName);
     if (set != null)
     {
@@ -100,7 +100,7 @@
    */
   public void throwSignal(String procName, Signal signal)
   {
-    log.debug("throwSignal: " + signal);
+    log.debug("throwSignal: " + procName + "=" + signal);
     
     // Throw Signal to listeners associated with the process
     Set<SignalListener> set = listeners.get(procName);

Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java	2008-08-14 16:07:59 UTC (rev 1894)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java	2008-08-14 19:43:52 UTC (rev 1895)
@@ -147,6 +147,7 @@
         {
           if (startSignal.getSignalType() == signal.getSignalType() && startSignal.getMessage().equals(signal.getMessage()))
           {
+            log.debug("catchSignal: " + signal);
             if (proc.getProcessStatus() == ProcessStatus.Active)
             {
               log.debug("Start process from signal: " + signal);
@@ -163,6 +164,11 @@
             }
           }
         }
+        
+        public String toString()
+        {
+          return start + "." + startSignal;
+        }
       };
       SignalManager signalManager = SignalManager.locateSignalManager();
       signalManager.addSignalListener(getProcess().getName(), listener);

Modified: jbossbpm/spec/trunk/modules/testsuite/pom.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/pom.xml	2008-08-14 16:07:59 UTC (rev 1894)
+++ jbossbpm/spec/trunk/modules/testsuite/pom.xml	2008-08-14 19:43:52 UTC (rev 1895)
@@ -106,7 +106,7 @@
             <configuration>
               <artifacts>
                 <artifact>
-                  <file>target/${project.artifactId}-${project.version}.zip
+                  <file>target/${project.artifactId}-${project.version}.zip 
                   </file>
                   <type>zip</type>
                 </artifact>
@@ -120,5 +120,45 @@
 
   <!-- Profiles -->
   <profiles>
+  
+    <!-- 
+    Name:  patterns
+    Descr: Run the pattern tests  
+    -->
+    <profile>
+      <id>cts</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <includes>
+                <include>org/jboss/bpm/cts/**</include>
+              </includes>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  
+    <!-- 
+    Name:  patterns
+    Descr: Run the pattern tests  
+    -->
+    <profile>
+      <id>pattern</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <includes>
+                <include>org/jboss/bpm/pattern/**</include>
+              </includes>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 </project>
\ No newline at end of file

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java	2008-08-14 19:43:52 UTC (rev 1895)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.pattern.control.parallelsplit;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.StringWriter;
+
+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
+  {
+    Process proc = super.getProcess();
+    
+    // Marshall the process to a string
+    StringWriter strwr = new StringWriter();
+    marshallProcess(proc, strwr);
+    String procXML = strwr.toString();
+
+    // Recreate the process from the marshalled process
+    ProcessManager procManager = ProcessManager.locateProcessManager();
+    proc = procManager.createProcess(procXML);
+    
+    return proc;
+  }
+}


Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/parallelsplit/ParallelSplitMarshallerTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationAPITest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationAPITest.java	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationAPITest.java	2008-08-14 19:43:52 UTC (rev 1895)
@@ -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.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 SynchronizationAPITest extends SynchronizationTest
+{
+  @Override
+  public Process getProcess() throws IOException
+  {
+    URL jpdlURL = getResourceURL("pattern/control/synchronization/synchronization-api10.xml");
+    ProcessManager pm = ProcessManager.locateProcessManager();
+    Process proc = pm.createProcess(jpdlURL);
+    return proc;
+  }
+}


Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationAPITest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java	2008-08-14 19:43:52 UTC (rev 1895)
@@ -0,0 +1,57 @@
+/*
+ * 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.io.StringWriter;
+
+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
+  {
+    Process proc = super.getProcess();
+    
+    // Marshall the process to a string
+    StringWriter strwr = new StringWriter();
+    marshallProcess(proc, strwr);
+    String procXML = strwr.toString();
+    
+    // Recreate the process from the marshalled process
+    ProcessManager procManager = ProcessManager.locateProcessManager();
+    proc = procManager.createProcess(procXML);
+    
+    return proc;
+  }
+}


Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationMarshallerTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java	2008-08-14 19:43:52 UTC (rev 1895)
@@ -0,0 +1,205 @@
+/*
+ * 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.SignalListener;
+import org.jboss.bpm.client.SignalManager;
+import org.jboss.bpm.model.EventBuilder;
+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.runtime.ExecutionContext;
+import org.jboss.bpm.runtime.ExecutionHandler;
+import org.jboss.bpm.runtime.Token;
+import org.jboss.bpm.test.DefaultEngineTestCase;
+
+/**
+ * Parallel gateway that that has multiple incoming sequence flows. Each token arriving from an incoming sequence flow
+ * is stored in the gateway until a token has arrived from each incoming sequence flow. The tokens are merged together
+ * and leave the gateway as a one.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 06-Aug-2008
+ */
+public class SynchronizationTest extends DefaultEngineTestCase
+{
+  public void testParallelMerge() throws Exception
+  {
+    Process proc = getProcess();
+    proc.startProcess();
+
+    // Add a signal listener that sends the other start trigger signal
+    SignalManager signalManager = SignalManager.locateSignalManager();
+    Signal startTrigger = new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "B");
+    signalManager.addSignalListener(null, new MergeListener(proc.getName(), startTrigger));
+
+    // Send start trigger signal
+    signalManager.throwSignal(proc.getName(), new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "A"));
+
+    // Wait for the process to end
+    proc.waitForEnd();
+
+    // Verify the result
+    assertEquals("TaskA:TaskB", TaskC.taskValue);
+  }
+
+  public void testMergeTimeout() throws Exception
+  {
+    Process proc = getProcess();
+    proc.startProcess();
+
+    // Send start trigger signal
+    SignalManager signalManager = SignalManager.locateSignalManager();
+    signalManager.throwSignal(proc.getName(), new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "A"));
+
+    // Wait for the process to end
+    try
+    {
+      proc.waitForEnd(1000);
+      fail("timeout expected");
+    }
+    catch (RuntimeException rte)
+    {
+      // expected
+    }
+  }
+
+  public void testInvalidToken() throws Exception
+  {
+    Process proc = getProcess();
+    proc.startProcess();
+
+    // Add a signal listener that sends the other start trigger signal
+    SignalManager signalManager = SignalManager.locateSignalManager();
+    Signal startTrigger = new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "A");
+    signalManager.addSignalListener(null, new MergeListener(proc.getName(), startTrigger));
+
+    // Send start trigger signal
+    signalManager.throwSignal(proc.getName(), new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "A"));
+
+    try
+    {
+      proc.waitForEnd();
+      fail("Expected: Unexpected token from: SequenceFlow[TaskA->Merge]");
+    }
+    catch (RuntimeException rte)
+    {
+      // expected
+    }
+
+    // Restart the process
+    proc.startProcess();
+    
+    // Add a signal listener that sends the other start trigger signal
+    startTrigger = new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "B");
+    signalManager.addSignalListener(null, new MergeListener(proc.getName(), startTrigger));
+
+    // Send start trigger signal
+    signalManager.throwSignal(proc.getName(), new Signal(getName(), SignalType.SYSTEM_START_TRIGGER, "A"));
+
+    // Wait for the process to end
+    proc.waitForEnd();
+
+    // Verify the result
+    assertEquals("TaskA:TaskB", TaskC.taskValue);
+  }
+
+  public Process getProcess() throws IOException
+  {
+    ProcessBuilder procBuilder = ProcessBuilderFactory.newInstance().newProcessBuilder();
+    EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA");
+    eventBuilder.addSignalTrigger(SignalType.SYSTEM_START_TRIGGER, "A").addSequenceFlow("TaskA");
+    procBuilder.addTask("TaskA").addExecutionHandler(TaskA.class).addSequenceFlow("Merge");
+    eventBuilder = procBuilder.addStartEvent("StartB");
+    eventBuilder.addSignalTrigger(SignalType.SYSTEM_START_TRIGGER, "B").addSequenceFlow("TaskB");
+    procBuilder.addTask("TaskB").addExecutionHandler(TaskB.class).addSequenceFlow("Merge");
+    procBuilder.addGateway("Merge", GatewayType.Parallel).addSequenceFlow("TaskC");
+    procBuilder.addTask("TaskC").addExecutionHandler(TaskC.class).addSequenceFlow("End");
+    procBuilder.addEndEvent("End");
+    Process proc = procBuilder.getProcess();
+    return proc;
+  }
+
+  public static class MergeListener implements SignalListener
+  {
+    private String fromRef;
+    private Signal nextSignal;
+
+    public MergeListener(String fromRef, Signal nextSignal)
+    {
+      this.fromRef = fromRef;
+      this.nextSignal = nextSignal;
+    }
+
+    public void catchSignal(Signal signal)
+    {
+      if (signal.getSignalType() == SignalType.SYSTEM_GATEWAY_ENTER)
+      {
+        if (nextSignal != null)
+        {
+          SignalManager signalManager = SignalManager.locateSignalManager();
+          signalManager.throwSignal(fromRef, nextSignal);
+          nextSignal = null;
+        }
+      }
+    }
+  }
+
+  @SuppressWarnings("serial")
+  public static class TaskA implements ExecutionHandler
+  {
+    public void execute(Token token)
+    {
+      ExecutionContext exContext = token.getExecutionContext();
+      exContext.addAttachment("taskA", "TaskA");
+    }
+  }
+
+  @SuppressWarnings("serial")
+  public static class TaskB implements ExecutionHandler
+  {
+    public void execute(Token token)
+    {
+      ExecutionContext exContext = token.getExecutionContext();
+      exContext.addAttachment("taskB", "TaskB");
+    }
+  }
+
+  @SuppressWarnings("serial")
+  public static class TaskC implements ExecutionHandler
+  {
+    public static Object taskValue;
+
+    public void execute(Token token)
+    {
+      ExecutionContext exContext = token.getExecutionContext();
+      taskValue = exContext.getAttachment("taskA") + ":" + exContext.getAttachment("taskB");
+    }
+  }
+}


Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/pattern/control/synchronization/SynchronizationTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization-api10.xml
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization-api10.xml	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization-api10.xml	2008-08-14 19:43:52 UTC (rev 1895)
@@ -0,0 +1,34 @@
+<ns2:process name="Synchronization" xmlns:ns2="urn:bpm.jboss:pdl-0.1">
+  <start name="StartA">
+    <seqflow to="TaskA" />
+    <signal-trigger>
+      <signal type="SYSTEM_START_TRIGGER">
+        <message>A</message>
+      </signal>
+    </signal-trigger>
+  </start>
+  <task taskType="None" name="TaskA">
+    <seqflow to="Merge" />
+    <execution-handler class="org.jboss.bpm.pattern.control.synchronization.SynchronizationTest$TaskA" />
+  </task>
+  <start name="StartB">
+    <seqflow to="TaskB" />
+    <signal-trigger>
+      <signal type="SYSTEM_START_TRIGGER">
+        <message>B</message>
+      </signal>
+    </signal-trigger>
+  </start>
+  <task taskType="None" name="TaskB">
+    <seqflow to="Merge" />
+    <execution-handler class="org.jboss.bpm.pattern.control.synchronization.SynchronizationTest$TaskB" />
+  </task>
+  <parallel-gateway name="Merge">
+    <seqflow to="TaskC" />
+  </parallel-gateway>
+  <task taskType="None" name="TaskC">
+    <seqflow to="End" />
+    <execution-handler class="org.jboss.bpm.pattern.control.synchronization.SynchronizationTest$TaskC" />
+  </task>
+  <end name="End" />
+</ns2:process>
\ No newline at end of file


Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization-api10.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn	2008-08-14 19:43:52 UTC (rev 1895)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:BpmnDiagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmi:id="_AXFyUWOSEd2mS_8SFTXMeQ" iD="_AXFyUGOSEd2mS_8SFTXMeQ">
+  <pools xmi:type="bpmn:Pool" xmi:id="_AXHAcWOSEd2mS_8SFTXMeQ" iD="_AXHAcGOSEd2mS_8SFTXMeQ" name="Pool">
+    <vertices xmi:type="bpmn:Activity" xmi:id="_EPuQwWOSEd2mS_8SFTXMeQ" iD="_EPuQwGOSEd2mS_8SFTXMeQ" outgoingEdges="_YRqagWo0Ed2rarCPPgIl8w" incomingEdges="_YxTj4Wo0Ed2rarCPPgIl8w _ZZSw8Wo0Ed2rarCPPgIl8w" activityType="GatewayParallel"/>
+    <vertices xmi:type="bpmn:Activity" xmi:id="_FY9wwWOSEd2mS_8SFTXMeQ" iD="_FY9wwGOSEd2mS_8SFTXMeQ" outgoingEdges="_YxTj4Wo0Ed2rarCPPgIl8w" name="StartA" activityType="EventStartSignal"/>
+    <vertices xmi:type="bpmn:Activity" xmi:id="_FobwIWOSEd2mS_8SFTXMeQ" iD="_FobwIGOSEd2mS_8SFTXMeQ" outgoingEdges="_ZZSw8Wo0Ed2rarCPPgIl8w" name="StartB" activityType="EventStartSignal"/>
+    <vertices xmi:type="bpmn:Activity" xmi:id="_LFtRIWOSEd2mS_8SFTXMeQ" iD="_LFtRIGOSEd2mS_8SFTXMeQ" incomingEdges="_YRqagWo0Ed2rarCPPgIl8w" activityType="EventEndEmpty"/>
+    <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_YRqagWo0Ed2rarCPPgIl8w" iD="_YRqagGo0Ed2rarCPPgIl8w" source="_EPuQwWOSEd2mS_8SFTXMeQ" target="_LFtRIWOSEd2mS_8SFTXMeQ"/>
+    <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_YxTj4Wo0Ed2rarCPPgIl8w" iD="_YxTj4Go0Ed2rarCPPgIl8w" source="_FY9wwWOSEd2mS_8SFTXMeQ" target="_EPuQwWOSEd2mS_8SFTXMeQ"/>
+    <sequenceEdges xmi:type="bpmn:SequenceEdge" xmi:id="_ZZSw8Wo0Ed2rarCPPgIl8w" iD="_ZZSw8Go0Ed2rarCPPgIl8w" source="_FobwIWOSEd2mS_8SFTXMeQ" target="_EPuQwWOSEd2mS_8SFTXMeQ"/>
+  </pools>
+</bpmn:BpmnDiagram>

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn_diagram
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn_diagram	                        (rev 0)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.bpmn_diagram	2008-08-14 19:43:52 UTC (rev 1895)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation" xmi:id="_AXGZYGOSEd2mS_8SFTXMeQ" type="Bpmn" name="synchronization.bpmn_diagram" measurementUnit="Pixel">
+  <children xmi:type="notation:Node" xmi:id="_AXIOkGOSEd2mS_8SFTXMeQ" type="1001">
+    <children xmi:type="notation:Node" xmi:id="_AXI1oGOSEd2mS_8SFTXMeQ" type="4008"/>
+    <children xmi:type="notation:Node" xmi:id="_AXI1oWOSEd2mS_8SFTXMeQ" type="5001">
+      <children xmi:type="notation:Node" xmi:id="_EPve4GOSEd2mS_8SFTXMeQ" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_EPwF8GOSEd2mS_8SFTXMeQ" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_EPve4WOSEd2mS_8SFTXMeQ" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_EPve4mOSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_EPve42OSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_EPve5GOSEd2mS_8SFTXMeQ" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="synchronization.bpmn#_EPuQwWOSEd2mS_8SFTXMeQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EPve5WOSEd2mS_8SFTXMeQ" x="132" y="72"/>
+      </children>
+      <children xmi:type="notation:Node" xmi:id="_FY--4GOSEd2mS_8SFTXMeQ" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_FY_l8GOSEd2mS_8SFTXMeQ" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_FY--4WOSEd2mS_8SFTXMeQ" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_FY--4mOSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_FY--42OSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_FY--5GOSEd2mS_8SFTXMeQ" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="synchronization.bpmn#_FY9wwWOSEd2mS_8SFTXMeQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FY--5WOSEd2mS_8SFTXMeQ" x="36" y="24" width="50"/>
+      </children>
+      <children xmi:type="notation:Node" xmi:id="_Foc-QGOSEd2mS_8SFTXMeQ" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_FodlUGOSEd2mS_8SFTXMeQ" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_Foc-QWOSEd2mS_8SFTXMeQ" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_Foc-QmOSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_Foc-Q2OSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_Foc-RGOSEd2mS_8SFTXMeQ" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="synchronization.bpmn#_FobwIWOSEd2mS_8SFTXMeQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Foc-RWOSEd2mS_8SFTXMeQ" x="36" y="144"/>
+      </children>
+      <children xmi:type="notation:Node" xmi:id="_LFt4MGOSEd2mS_8SFTXMeQ" type="2001">
+        <children xmi:type="notation:Node" xmi:id="_LFufRWOSEd2mS_8SFTXMeQ" type="4001"/>
+        <styles xmi:type="notation:FontStyle" xmi:id="_LFufQGOSEd2mS_8SFTXMeQ" fontName="Arial"/>
+        <styles xmi:type="notation:DescriptionStyle" xmi:id="_LFufQWOSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:FillStyle" xmi:id="_LFufQmOSEd2mS_8SFTXMeQ"/>
+        <styles xmi:type="notation:LineStyle" xmi:id="_LFufQ2OSEd2mS_8SFTXMeQ" lineColor="0"/>
+        <element xmi:type="bpmn:Activity" href="synchronization.bpmn#_LFtRIWOSEd2mS_8SFTXMeQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LFufRGOSEd2mS_8SFTXMeQ" x="252" y="84"/>
+      </children>
+      <styles xmi:type="notation:DrawerStyle" xmi:id="_AXI1omOSEd2mS_8SFTXMeQ"/>
+      <styles xmi:type="notation:SortingStyle" xmi:id="_AXI1o2OSEd2mS_8SFTXMeQ"/>
+      <styles xmi:type="notation:FilteringStyle" xmi:id="_AXI1pGOSEd2mS_8SFTXMeQ"/>
+    </children>
+    <styles xmi:type="notation:FontStyle" xmi:id="_AXIOkWOSEd2mS_8SFTXMeQ" fontName="Arial"/>
+    <styles xmi:type="notation:DescriptionStyle" xmi:id="_AXIOkmOSEd2mS_8SFTXMeQ"/>
+    <styles xmi:type="notation:FillStyle" xmi:id="_AXIOk2OSEd2mS_8SFTXMeQ" fillColor="16771304"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_AXIOlGOSEd2mS_8SFTXMeQ" lineColor="11119017"/>
+    <element xmi:type="bpmn:Pool" href="synchronization.bpmn#_AXHAcWOSEd2mS_8SFTXMeQ"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AXI1pWOSEd2mS_8SFTXMeQ" x="16" y="16" width="357" height="213"/>
+  </children>
+  <styles xmi:type="notation:PageStyle" xmi:id="_AXGZYWOSEd2mS_8SFTXMeQ"/>
+  <styles xmi:type="notation:GuideStyle" xmi:id="_AXGZYmOSEd2mS_8SFTXMeQ"/>
+  <styles xmi:type="notation:DescriptionStyle" xmi:id="_AXGZY2OSEd2mS_8SFTXMeQ"/>
+  <element xmi:type="bpmn:BpmnDiagram" href="synchronization.bpmn#_AXFyUWOSEd2mS_8SFTXMeQ"/>
+  <edges xmi:type="notation:Edge" xmi:id="_YRv6EGo0Ed2rarCPPgIl8w" type="3001" source="_EPve4GOSEd2mS_8SFTXMeQ" target="_LFt4MGOSEd2mS_8SFTXMeQ">
+    <children xmi:type="notation:Node" xmi:id="_YRzkcGo0Ed2rarCPPgIl8w" type="4012">
+      <styles xmi:type="notation:FillStyle" xmi:id="_YRzkcWo0Ed2rarCPPgIl8w" fillColor="16776959"/>
+      <styles xmi:type="notation:LineStyle" xmi:id="_YRzkcmo0Ed2rarCPPgIl8w" lineColor="16776959"/>
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_YRzkc2o0Ed2rarCPPgIl8w" y="-10"/>
+    </children>
+    <styles xmi:type="notation:RoutingStyle" xmi:id="_YRv6EWo0Ed2rarCPPgIl8w" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_YRv6Emo0Ed2rarCPPgIl8w" fontName="Arial"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_YRv6E2o0Ed2rarCPPgIl8w" lineColor="0"/>
+    <element xmi:type="bpmn:SequenceEdge" href="synchronization.bpmn#_YRqagWo0Ed2rarCPPgIl8w"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YRv6FGo0Ed2rarCPPgIl8w" points="[24, 1, -218, -1]$[243, -13, 1, -15]"/>
+  </edges>
+  <edges xmi:type="notation:Edge" xmi:id="_YxWnMGo0Ed2rarCPPgIl8w" type="3001" source="_FY--4GOSEd2mS_8SFTXMeQ" target="_EPve4GOSEd2mS_8SFTXMeQ">
+    <children xmi:type="notation:Node" xmi:id="_YxXOQGo0Ed2rarCPPgIl8w" type="4012">
+      <styles xmi:type="notation:FillStyle" xmi:id="_YxXOQWo0Ed2rarCPPgIl8w" fillColor="16776959"/>
+      <styles xmi:type="notation:LineStyle" xmi:id="_YxXOQmo0Ed2rarCPPgIl8w" lineColor="16776959"/>
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_YxXOQ2o0Ed2rarCPPgIl8w" y="-10"/>
+    </children>
+    <styles xmi:type="notation:RoutingStyle" xmi:id="_YxWnMWo0Ed2rarCPPgIl8w" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_YxWnMmo0Ed2rarCPPgIl8w" fontName="Arial"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_YxWnM2o0Ed2rarCPPgIl8w" lineColor="0"/>
+    <element xmi:type="bpmn:SequenceEdge" href="synchronization.bpmn#_YxTj4Wo0Ed2rarCPPgIl8w"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YxWnNGo0Ed2rarCPPgIl8w" points="[15, 2, -199, -56]$[222, 41, 8, -17]"/>
+  </edges>
+  <edges xmi:type="notation:Edge" xmi:id="_ZZT_EGo0Ed2rarCPPgIl8w" type="3001" source="_Foc-QGOSEd2mS_8SFTXMeQ" target="_EPve4GOSEd2mS_8SFTXMeQ">
+    <children xmi:type="notation:Node" xmi:id="_ZZUmIGo0Ed2rarCPPgIl8w" type="4012">
+      <styles xmi:type="notation:FillStyle" xmi:id="_ZZUmIWo0Ed2rarCPPgIl8w" fillColor="16776959"/>
+      <styles xmi:type="notation:LineStyle" xmi:id="_ZZUmImo0Ed2rarCPPgIl8w" lineColor="16776959"/>
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_ZZUmI2o0Ed2rarCPPgIl8w" y="-10"/>
+    </children>
+    <styles xmi:type="notation:RoutingStyle" xmi:id="_ZZT_EWo0Ed2rarCPPgIl8w" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
+    <styles xmi:type="notation:FontStyle" xmi:id="_ZZT_Emo0Ed2rarCPPgIl8w" fontName="Arial"/>
+    <styles xmi:type="notation:LineStyle" xmi:id="_ZZT_E2o0Ed2rarCPPgIl8w" lineColor="0"/>
+    <element xmi:type="bpmn:SequenceEdge" href="synchronization.bpmn#_ZZSw8Wo0Ed2rarCPPgIl8w"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZZT_FGo0Ed2rarCPPgIl8w" points="[15, -5, -199, 57]$[198, -53, -16, 9]"/>
+  </edges>
+</notation:Diagram>

Added: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.png
===================================================================
(Binary files differ)


Property changes on: jbossbpm/spec/trunk/modules/testsuite/src/test/resources/pattern/control/synchronization/synchronization.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream




More information about the jbpm-commits mailing list