[jbpm-commits] JBoss JBPM SVN: r1553 - in api/trunk/modules: api/src/main/java/org/jboss/bpm/client and 8 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jul 8 11:45:10 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-07-08 11:45:10 -0400 (Tue, 08 Jul 2008)
New Revision: 1553

Added:
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalListener.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorResult.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ItermediateEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageResult.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ParallelGateway.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Result.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/EndSignal.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionContext.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Signal.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/StartSignal.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
Removed:
   api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ExecutionContext.java
Modified:
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Execution.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java
   api/trunk/modules/api/src/main/java/org/jboss/bpm/test/DefaultEngineTestCase.java
   api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java
   api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java
   api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java
Log:
Align API with BPMN (WIP)

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessEngine.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -39,9 +39,13 @@
   // Injected through the MC
   protected ProcessDefinitionManager processDefinitionManager;
   // Injected through the MC
+  protected ProcessManager processManager;
+  // Injected through the MC
   protected ProcessInstanceManager processInstanceManager;
   // Injected through the MC
   protected ExecutionManager executionManager;
+  // Injected through the MC
+  protected SignalManager signalManager;
   // Flag to indicate that the Engine is shutting down
   private boolean prepareForShutdown;
 
@@ -88,6 +92,19 @@
   }
 
   /**
+   * Get the configured instance of the process definition manager
+   * 
+   * @return The process definition manager
+   */
+  public ProcessManager getProcessManager()
+  {
+    if (processManager == null)
+      throw new IllegalStateException("ProcessManager not available through kernel configuration");
+
+    return processManager;
+  }
+
+  /**
    * Get the configured instance of the process instance manager
    * 
    * @return The process instance manager
@@ -112,4 +129,12 @@
 
     return executionManager;
   }
+
+  public SignalManager getSignalManager()
+  {
+    if (signalManager == null)
+      throw new IllegalStateException("SignalManager not available through kernel configuration");
+
+    return signalManager;
+  }
 }
\ No newline at end of file

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,146 @@
+/*
+ * 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.client;
+
+// $Id$
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.bpm.EngineShutdownException;
+import org.jboss.bpm.model.Process;
+
+/**
+ * The process manager is the entry point to create, find and otherwise manage processes.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public abstract class ProcessManager
+{
+  // Injected through the MC
+  protected ProcessEngine engine;
+  // The set of process definitions
+  private Set<Process> procs = new HashSet<Process>();
+
+  // Hide public constructor
+  protected ProcessManager()
+  {
+  }
+
+  /*  Get the associated process engine */
+  public ProcessEngine getProcessEngine()
+  {
+    if (engine == null)
+      throw new IllegalStateException("ProcessEngine not available through kernel configuration");
+
+    return engine;
+  }
+
+  /*  Locate the process definition manager */
+  public static ProcessManager locateProcessManager()
+  {
+    ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+    return engine.getProcessManager();
+  }
+
+  /*
+   * Create a process defintion from a XML string in one of the supported formats
+   */
+  public final Process createProcess(String procDescriptor)
+  {
+    // TODO: test this
+    if (engine.isPrepareForShutdown())
+      throw new EngineShutdownException("Cannot create new Process while engine is shutting down");
+    
+    Process pd = createProcessOverride(procDescriptor);
+    return pd;
+  }
+
+  /*
+   * Override to implement process definition creation
+   */
+  protected abstract Process createProcessOverride(String procDescriptor);
+
+  /*
+   * Create a process defintion from an URL to a XML descritor in one of the supported formats
+   */
+  public final Process createProcess(URL procURL) throws IOException
+  {
+    // TODO: test this
+    if (engine.isPrepareForShutdown())
+      throw new EngineShutdownException("Cannot create new Process while engine is shutting down");
+    
+    Process pd = createProcessOverride(procURL);
+    return pd;
+  }
+
+  /*
+   * Override to implement process definition creation
+   */
+  protected abstract Process createProcessOverride(URL pdURL) throws IOException;
+
+  /*
+   * Get the set of registered process definitions
+   */
+  public Set<Process> getProcesss()
+  {
+    return Collections.unmodifiableSet(procs);
+  }
+
+  /*
+   * Find a process definition for a given name
+   * 
+   * @return null if the process definition is not defined
+   */
+  public Process findProcess(String name)
+  {
+    Process proc = null;
+    for (Process aux : procs)
+    {
+      if (aux.getName().equals(name))
+      {
+        proc = aux;
+        break;
+      }
+    }
+    return proc;
+  }
+
+  /*
+   * Remove a process definition and all its associated process instances
+   */
+  public void removeProcess(Process proc)
+  {
+    // Remove the preocess definition
+    procs.remove(proc.getName());
+  }
+
+  // Add a process definition
+  protected void addProcess(Process proc)
+  {
+    procs.add(proc);
+  }
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalListener.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalListener.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalListener.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.client;
+
+//$Id$
+
+import org.jboss.bpm.runtime.Signal;
+
+/**
+ * A signal listener that can be registered with the ProcessEngine
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SignalListener
+{
+  /** Catch a signal from the process that this listener is registered with */
+  void catchSignal(Signal signal);
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalListener.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,112 @@
+/*
+ * 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.client;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.bpm.runtime.Signal;
+
+/**
+ * The signal manager is the entry point for signal processing
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class SignalManager
+{
+  // Injected through the MC
+  protected ProcessEngine engine;
+  // The map of registered signal listeners
+  private Map<String,Set<SignalListener>> listeners = new HashMap<String,Set<SignalListener>>();
+
+  // Hide public constructor
+  protected SignalManager()
+  {
+  }
+
+  /**
+   * Get the associated process engine
+   */
+  public ProcessEngine getProcessEngine()
+  {
+    if (engine == null)
+      throw new IllegalStateException("ProcessEngine not available through kernel configuration");
+
+    return engine;
+  }
+
+  /**
+   * Locate the signal manager
+   */
+  public static SignalManager locateSignalManager()
+  {
+    ProcessEngine engine = ProcessEngineLocator.locateProcessEngine();
+    return engine.getSignalManager();
+  }
+  
+  /** Add a signal listener for a given process */
+  public void addListener(String procName, SignalListener listener)
+  {
+    Set<SignalListener> set = listeners.get(procName);
+    if (set == null)
+    {
+      set = new HashSet<SignalListener>();
+      listeners.put(procName, set);
+    }
+    set.add(listener);
+  }
+  
+  /** Remove an signal listener for a given process */
+  public void removeListener(String procName, SignalListener listener)
+  {
+    Set<SignalListener> set = listeners.get(procName);
+    if (set != null)
+    {
+      set.remove(listener);
+    }
+  }
+  
+  /** Remove all signal listeners for a given process */
+  public void removeListeners(String procName)
+  {
+    listeners.remove(procName);
+  }
+  
+  /** Throw a signal to all registered listeners */
+  public void throwSignal(Signal signal)
+  {
+    String procName = signal.getProcessName();
+    Set<SignalListener> set = listeners.get(procName);
+    if (set != null)
+    {
+      for (SignalListener listener : set)
+      {
+        listener.catchSignal(signal);
+      }
+    }
+  }
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/client/internal/AbstractExecution.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -25,8 +25,8 @@
 
 import org.jboss.bpm.client.ProcessInstance;
 import org.jboss.bpm.process.Execution;
-import org.jboss.bpm.process.ExecutionContext;
 import org.jboss.bpm.process.Node;
+import org.jboss.bpm.runtime.Token;
 
 /**
  * Represents an execution of a process instance. 
@@ -85,7 +85,7 @@
   /**
    * Get the context for this execution
    */
-  public abstract ExecutionContext getContext();
+  public abstract Token getContext();
 
   // Set the name for the execution
   protected abstract void setName(String name);

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * An activity is a generic term for work that a company or organization performs via business processes. 
+ * An activity can be atomic or non-atomic (compound). 
+ * The types of activities that are a part of a Process Model are: Process, Sub-Process, and Task. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Activity extends FlowObject
+{
+  /** Get the name */
+  String getName();
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Activity.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. 
+ * 
+ * Complex Gateways can also be used to combine a set of linked simple Gateways into a single, 
+ * more compact situation. Modelers can provide complex expressions that determine the merging and/or 
+ * splitting behavior of the Gateway. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ComplexGateway extends Gateway
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ComplexGateway.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -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.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * As the name implies, the End Event indicates where a Process will end. 
+ * 
+ * In terms of Sequence Flow, the End Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flow. 
+ * An End Event can have a specific Result that will appear as a marker within the center of the End Event shape. 
+ * End Event Results are Message, Error, Compensation, Link, and Multiple.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface EndEvent extends Event
+{
+  /** Get the result */
+  Result getResult();
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/EndEvent.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorResult.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorResult.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorResult.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * Represents the result of an End event as an Error. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ErrorResult extends Result
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ErrorResult.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * An Event is something that “happens” during the course of a business process. 
+ * These Events affect the flow of the Process and usually have a cause or an impact.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Event extends FlowObject
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Event.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ExclusiveGateway extends Gateway
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ExclusiveGateway.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Flow is a graphical line connecting two objects in a BPD. 
+ * 
+ * There are two types of Flow: Sequence Flow and Message Flow, each with their own line style. 
+ * Flow is also used in a generic sense (and lowercase) to describe how Tokens will traverse 
+ * Sequence Flow from the Start Event to an End Event. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Flow
+{
+  /** Get the name */
+  String getName();
+  
+  /** Get the source of this Flow */
+  FlowObject getSource();
+  
+  /** Get the target for this Flow */
+  FlowObject getTarget();
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Flow Object is one of the set of following graphical objects: Event, Activity, and Gateway. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface FlowObject
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/FlowObject.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * Gateways are modelling elements that are used to control how Sequence Flow interact as they converge and diverge within a Process. 
+ * If the flow does not need to be controlled, then a Gateway is not needed. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Gateway extends FlowObject
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Gateway.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * This Decision represents a branching point where Alternatives are based on conditional expressions contained within outgoing Sequence Flow. 
+ * However, in this case, the True evaluation of one condition expression does not exclude the evaluation of other condition expressions. 
+ * All Sequence Flow with a True evaluation will be traversed by a Token. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface InclusiveGateway extends Gateway
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/InclusiveGateway.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ItermediateEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ItermediateEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ItermediateEvent.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * An Intermediate Event is an Event that occurs after a Process has been started. 
+ * 
+ * It will affect the Flow of the Process, but will not start or (directly) terminate the Process. 
+ * An Intermediate Event will show where messages or delays are expected within the Process, 
+ * disrupt the Normal Flow through exception handling, or show the extra flow required for compensating a transaction.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ItermediateEvent extends Event
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ItermediateEvent.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Message Flow is a dashed line that is used to show the flow of messages between two entities that are prepared to send and receive them. 
+ * In BPMN, two separate Pools in the Diagram will represent the two entities. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface MessageFlow extends Flow
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageResult.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageResult.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageResult.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * Represents the result of an End event as a Message. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface MessageResult extends Result
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageResult.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ParallelGateway.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ParallelGateway.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ParallelGateway.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * Parallel Gateway is required when two or more Activities need to be executed in parallel.  
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ParallelGateway extends Gateway
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/ParallelGateway.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Process is any Activity performed within a company or organization.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Process extends Activity
+{
+  /** Get the start event */
+  StartEvent getStartEvent();
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Process.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Result.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Result.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Result.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+//$Id$
+
+import org.jboss.bpm.client.Attachments;
+
+/**
+ * A Result is consequence of reaching an End Event. 
+ * 
+ * Results can be of different types, including: Message, Error, Compensation, Link, and Multiple. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Result extends Attachments
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Result.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Sequence Flow is a solid graphical line that is used to show the order that Activities will be performed in a Process. 
+ * Each Flow has only one source and only one target. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SequenceFlow extends Flow
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -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.jboss.bpm.model;
+
+//$Id$
+
+import org.jboss.bpm.runtime.ExecutionContext;
+
+/**
+ * A Start Event indicates where a particular Process will start. 
+ * 
+ * In terms of Sequence Flow, the Start Event starts the Flow of the Process, and thus, will not have any incoming Sequence Flow. 
+ * A Start Event can have a Trigger that indicates how the Process starts: Message, Timer, Rule, Link, or Multiple.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface StartEvent extends Event
+{
+  /** Start the flow of the process */
+  void execute();
+  
+  /** Start the flow of the process, with a given execution context */
+  void execute(ExecutionContext ctx);
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/StartEvent.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+
+// $Id$
+
+/**
+ * A Sub-Process is Process that is included within another Process.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SubProcess extends Process
+{
+  /** Get the parent process */
+  Process getParentProcess();
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/SubProcess.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -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.jboss.bpm.model;
+
+//$Id$
+
+import org.jboss.bpm.runtime.ExecutionContext;
+
+/**
+ * A Task is an Atomic Activity that is included within a Process. 
+ * 
+ * A Task is used when the work in the Process is not broken down to a finer level of Process Model detail. 
+ * Generally, an end-user and/or an application are used to perform the Task when it is executed.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Task extends Activity
+{
+  /** Execute the task */
+  void execute(ExecutionContext ctx);
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/model/Task.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Execution.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Execution.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/Execution.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -24,6 +24,7 @@
 //$Id$
 
 import org.jboss.bpm.client.ProcessInstance;
+import org.jboss.bpm.runtime.Token;
 
 /**
  * Represents an execution of a process instance. 
@@ -49,7 +50,7 @@
   /**
    * Get the context for this execution
    */
-  ExecutionContext getContext();
+  Token getContext();
 
   /**
    * Get the current node for this execution

Deleted: api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ExecutionContext.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ExecutionContext.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ExecutionContext.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.process;
-
-import org.jboss.bpm.client.Attachments;
-
-//$Id$
-
-/**
- * An execution context that can take attachments.
- * 
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public abstract class ExecutionContext implements Attachments
-{
-  // Hide public constructor
-  protected ExecutionContext()
-  {
-  }
-}
\ No newline at end of file

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Activity.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -23,7 +23,6 @@
 
 //$Id$
 
-import org.jboss.bpm.process.ExecutionContext;
 import org.jboss.bpm.process.Node;
 
 /**
@@ -43,5 +42,5 @@
    * @param node The node this activity is associated with 
    * @param ctx The execution context
    */
-  void execute(Node node, ExecutionContext ctx);
+  void execute(Node node, Token ctx);
 }
\ No newline at end of file

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/EndSignal.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/EndSignal.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/EndSignal.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.runtime;
+
+//$Id$
+
+import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.Result;
+
+/**
+ * A Signal thrown when the Process ends 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class EndSignal extends Signal 
+{
+  private Result result;
+  
+  /** Create the signal for a given process */
+  public EndSignal(Process proc, Result result)
+  {
+    super(proc);
+    this.result = result;
+  }
+
+  /** Get the result */
+  public Result getResult()
+  {
+    return result;
+  }
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/EndSignal.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionContext.java (from rev 1541, api/trunk/modules/api/src/main/java/org/jboss/bpm/process/ExecutionContext.java)
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionContext.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/ExecutionContext.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.runtime;
+
+import org.jboss.bpm.client.Attachments;
+
+//$Id$
+
+/**
+ * An execution context that can take attachments.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class ExecutionContext implements Attachments
+{
+  // Hide public constructor
+  protected ExecutionContext()
+  {
+  }
+}
\ No newline at end of file

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Signal.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Signal.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Signal.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.runtime;
+
+//$Id$
+
+import org.jboss.bpm.model.Process;
+
+/**
+ * A Signal thrown by the ProcessEngine 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class Signal 
+{
+  private String shortName;
+  private String procName;
+  
+  /** Create the signal for a given process */
+  public Signal(Process proc)
+  {
+    this.procName = proc.getName();
+    
+    shortName = getClass().getName();
+    shortName = shortName.substring(shortName.lastIndexOf('.') + 1);
+  }
+
+  /** Get the short name for this signal */
+  public String getShortName()
+  {
+    return shortName;
+  }
+
+  /** Get the proccess name */
+  public String getProcessName()
+  {
+    return procName;
+  }
+  
+  public String toString()
+  {
+    return shortName + "[" + procName + "]";
+  }
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Signal.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/StartSignal.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/StartSignal.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/StartSignal.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -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.jboss.bpm.runtime;
+
+//$Id$
+
+import org.jboss.bpm.model.Process;
+
+/**
+ * A signal thrown by the Process starts 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public class StartSignal extends Signal 
+{
+  /** Create the signal for a given process */
+  public StartSignal(Process proc)
+  {
+    super(proc);
+  }
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/StartSignal.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java	                        (rev 0)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.runtime;
+
+//$Id$
+
+import org.jboss.bpm.client.Attachments;
+
+/**
+ * A Token is a descriptive construct used to describe how the flow of a Process will proceed at runtime.
+ *  
+ * By tracking how the Token traverses the Flow Objects, gets diverted through alternative paths, and gets split into parallel paths, 
+ * the normal Sequence Flow should be completely definable.
+ *  
+ * A Token will have a unique identity that can be used to separate multiple Tokens that may exist because 
+ * of concurrent process instances or the splitting of the Token for parallel processing within a single process instance. 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class Token implements Attachments
+{
+}
\ No newline at end of file


Property changes on: api/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: api/trunk/modules/api/src/main/java/org/jboss/bpm/test/DefaultEngineTestCase.java
===================================================================
--- api/trunk/modules/api/src/main/java/org/jboss/bpm/test/DefaultEngineTestCase.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/api/src/main/java/org/jboss/bpm/test/DefaultEngineTestCase.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -23,13 +23,44 @@
 
 // $Id$
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.client.SignalListener;
 import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.runtime.Signal;
 
-public abstract class DefaultEngineTestCase extends AbstractAPITestCase
+public abstract class DefaultEngineTestCase extends AbstractAPITestCase implements SignalListener
 {
+  // provide logging
+  private static final Log log = LogFactory.getLog(DefaultEngineTestCase.class);
+  
+  private List<Signal> signals = new ArrayList<Signal>();
+  
   @Override
   protected String getBeansConfig()
   {
     return ProcessEngine.JBPM_ENGINE_CONFIG;
   }
+
+  @Override
+  protected void setUp() throws Exception
+  {
+    super.setUp();
+    signals.clear();
+  }
+  
+  public void catchSignal(Signal signal)
+  {
+    signals.add(signal);
+    log.debug(signal);
+  }
+  
+  public List<Signal> getCaughtSignals()
+  {
+    return Collections.unmodifiableList(signals);
+  }
 }

Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java
===================================================================
--- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/activity/BasicActivity.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -23,9 +23,9 @@
 
 // $Id$
 
-import org.jboss.bpm.process.ExecutionContext;
 import org.jboss.bpm.process.Node;
 import org.jboss.bpm.runtime.Activity;
+import org.jboss.bpm.runtime.Token;
 
 /**
  * An Activity that adds an attachment to the execution context
@@ -35,7 +35,7 @@
  */
 public class BasicActivity implements Activity
 {
-  public void execute(Node node, ExecutionContext ctx)
+  public void execute(Node node, Token ctx)
   {
     String name = node.getName();
     ctx.addAttachment(String.class, "Activity on: " + name);

Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java
===================================================================
--- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/basic/BasicSequenceTest.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -106,4 +106,26 @@
     assertEquals(pd.findNode("end"), ex.getNode());
     assertEquals(pd.getEndNodes().iterator().next(), ex.getNode());
   }
+  
+  /*
+  public void testBasicSequence() throws Exception 
+  {
+    // Create a Process through the ProcessManager
+    ProcessManager pm = ProcessManager.locateProcessManager();
+    Process proc = pm.createProcess(jpdl);
+    
+    // Add an event listener through the EventManager
+    SignalManager em = SignalManager.locateSignalManager();
+    em.addListener(proc.getName(), this);
+    
+    // Get the start event of this Process
+    StartEvent start = proc.getStartEvent();
+    
+    // Signal the execution
+    start.execute();
+    
+    // Validate received events
+    assertEquals("xxx", getCaughtSignals());
+  }
+   */
 }

Modified: api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java
===================================================================
--- api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java	2008-07-08 15:44:39 UTC (rev 1552)
+++ api/trunk/modules/testsuite/src/test/java/org/jboss/bpm/samples/context/ContextActivity.java	2008-07-08 15:45:10 UTC (rev 1553)
@@ -23,13 +23,13 @@
 
 // $Id$
 
-import org.jboss.bpm.process.ExecutionContext;
 import org.jboss.bpm.process.Node;
 import org.jboss.bpm.runtime.Activity;
+import org.jboss.bpm.runtime.Token;
 
 public class ContextActivity implements Activity
 {
-  public void execute(Node node, ExecutionContext ctx)
+  public void execute(Node node, Token ctx)
   {
     String name = node.getName();
     ctx.addAttachment(String.class, "ActivityMessage", "Activity on '" + name + "' has: " + ctx.getAttachmentKeys());




More information about the jbpm-commits mailing list