[jbpm-commits] JBoss JBPM SVN: r2683 - in jbpm4/trunk/modules: api/src/main/java/org and 3 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Oct 30 11:14:38 EDT 2008


Author: tom.baeyens at jboss.com
Date: 2008-10-30 11:14:38 -0400 (Thu, 30 Oct 2008)
New Revision: 2683

Added:
   jbpm4/trunk/modules/api/src/main/java/org/
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html
Modified:
   jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java
Log:
unification api proposals

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Configuration.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,7 @@
+package org.jbpm;
+
+
+public abstract class Configuration {
+
+  public abstract ProcessEngine buildProcessEngine();
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Deployment.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -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.jbpm;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.zip.ZipInputStream;
+
+
+/** a deployment unit, containing all information to create a process 
+ * definition that will be deployed in the persistent store of the 
+ * Process Virtual Machine.
+ *  
+ * @author Tom Baeyens
+ */
+public interface Deployment extends Serializable {
+
+  void setName(String name);
+  void setLanguage(String language);
+
+  void addObject(String name, Object object);
+  void addResource(String resource);
+  void addFile(File file);
+  void addUrl(URL url);
+  void addInputStream(String name, InputStream inputStream);
+  void addArchiveResource(String resource);
+  void addArchiveFile(File file);
+  void addArchiveUrl(URL url);
+  void addArchive(ZipInputStream zipInputStream);
+  void addDirectory(String directory);
+  void addDirectoryCanonical(String directory);
+  void addDirectory(File directory);
+  void addDirectoryCanonical(File directory);
+
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Deployment.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/Execution.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Execution.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm;
+
+import java.io.Serializable;
+
+/** a runtime path of execution.
+ * 
+ * <h3 id="state">State of an execution</h3>
+ * 
+ * <p>The state of an execution is either active or locked.  An active execution is either 
+ * executing or waiting for an external trigger.  If an execution is not in {@link #STATE_ACTIVE},
+ * then it is locked.  A locked execution is read only.  
+ * </p>
+ * 
+ * <p>When a new execution is created, it is in {@link #STATE_ACTIVE}.  To change 
+ * the state to a locked state, use {@link #lock(String)}.  
+ * {@link #STATE_ACTIVE Some STATE_* constants} are provided that represent the 
+ * most commonly used locked states.  But the state '...' in the picture indicates 
+ * that any string can be provided as the state in the lock method.
+ * </p>
+ * 
+ * <p>If an execution is locked, methods that change the execution will throw
+ * a {@link PvmException} and the message will reference the actual locking state.
+ * {@link #fire(String, ObservableElement) Firing events}, 
+ * {@link #setVariable(String, Object) updating variables}, 
+ * {@link #setPriority(int) updating priority} and 
+ * {@link #createComment(String) adding comments} are not considered to change an 
+ * execution.  Also {@link #createProcessInstance(String) creation} and 
+ * {@link #removeExecution(Execution) removal} of child executions are unchecked, 
+ * which means that those methods can be invoked by external API clients and 
+ * node behaviour methods, even while the execution is in a locked state. 
+ * </p>    
+ * 
+ * <p>Make sure that comparisons between {@link #getState()} and the 
+ * {@link #STATE_ACTIVE STATE_* constants} are  
+ * done with .equals and not with '==' because if executions are 
+ * loaded from persistent storage, a new string is created instead 
+ * of the constants.
+ * </p>
+ * 
+ * <h3>Comments</h3>
+ * 
+ * @author Tom Baeyens
+ */
+public interface Execution extends Serializable {
+
+  /** between {@link ClientProcessDefinition#createProcessInstance() creation of 
+   * a new process instance} and the {@link ClientExecution#start() start} of that 
+   * process instance.  The motivation of this state is that variables can be 
+   * set programmatically on the process instance so that they can be used during 
+   * initializations of variables and timers */
+  String STATE_CREATED = "created";
+  
+  /** either executing or in a wait state waiting for a signal.
+   * This is the normal state of an execution and the initial state 
+   * when creating a new execution. Make sure that comparisons are 
+   * done with .equals and not with '==' because if executions are 
+   * loaded from persistent storage, a new string is created instead 
+   * of the constants. */
+  String STATE_ACTIVE = "active";
+  
+  /** parents with concurrent child executions are inactive.  
+   * When an execution has concurrent child executions, it implies that 
+   * this execution can't be active.  For example, at a fork, the parent
+   * execution can wait inactively in the fork being till all the
+   * child executions are joined.  Only leaves of the
+   * execution tree can be active. Make sure that comparisons are 
+   * done with .equals and not with '==' because if executions are 
+   * loaded from persistent storage, a new string is created instead 
+   * of the constants. */
+  String STATE_INACTIVE = "inactive";
+  
+  /** this execution has ended normally. Make sure that comparisons are 
+   * done with .equals and not with '==' because if executions are 
+   * loaded from persistent storage, a new string is created instead 
+   * of the constants. */
+  String STATE_ENDED = "ended";
+  
+  /** this execution was cancelled with the {@link #cancel()}
+   * method before normal execution ended. Make sure that comparisons are 
+   * done with .equals and not with '==' because if executions are 
+   * loaded from persistent storage, a new string is created instead 
+   * of the constants. */
+  String STATE_CANCELLED = "cancelled";
+
+  /** indicates that this execution is temporary suspended with the
+   * {@link #suspend()} method.  Human tasks of a suspended execution
+   * shouldn't show up in people's task list and timers of suspended
+   * executions shouldn't fire and the execution is locked. Make sure that comparisons are 
+   * done with .equals and not with '==' because if executions are 
+   * loaded from persistent storage, a new string is created instead 
+   * of the constants. */
+  String STATE_SUSPENDED = "suspended";
+  
+  /** indicates that this execution is doing an asynchronous continuation. */
+  String STATE_ASYNC = "async";
+  
+
+  long getDbid();
+  /** the externally given name or id of this execution. The id of a main 
+   * path of execution is null.   Can be used to differentiate concurrent 
+   * paths of execution e.g. the shipping and billing paths.  */
+  String getName();
+
+  /** the optional user provided business key that is unique within one 
+   * process definition.  This could be for instance the order number.  
+   * It's a user defined identifier for one execution within the scope of 
+   * a single process definition. */
+  String getKey();
+  
+  /** a globally unique identifier for this execution. */
+  String getId();
+  
+  /** represents the current position in the process by indicating the 
+   * name of the current node. */
+  String getNodeName();
+
+  /** the <a href="#state">state</a> of this execution.  */
+  String getState();
+
+  /** is this execution active ? This is the inverse of {@link #isLocked()}. */
+  boolean isActive();
+
+  /** is this execution {@link #lock(String) locked} ? This is the inverse of {@link #isActive()}. */
+  boolean isLocked();
+
+  /** is this execution ended or cancelled ? */
+  boolean isFinished();
+  
+  /** is this execution ended normally ? */
+  boolean isEnded();
+
+  /** is this execution suspended ? */
+  boolean isSuspended();
+
+  /** indicates low priorities with negative values and high priorities 
+   * with positive values.  The default priority is 0, which means 
+   * NORMAL. Other recognized named priorities are HIGHEST (2), HIGH (1), 
+   * LOW (-1) and LOWEST (-2). For the rest, the user can set any other 
+   * priority integer value, but then, the UI will have to display it as 
+   * an integer and not the named value.*/
+  int getPriority();
+}

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ExecutionService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm;
+
+import java.util.List;
+import java.util.Map;
+
+
+/** manages runtime process executions.
+ * 
+ * @author Tom Baeyens
+ */
+public interface ExecutionService {
+
+  /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+   * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition. */
+  Execution startExecution(String processDefinitionId);
+  
+  /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid. 
+   * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+   * @param executionKey is a user provided reference for the new execution that must be unique over all 
+   *    process versions with the same name. */
+  Execution startExecution(String processDefinitionId, String executionKey);
+
+  /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid. 
+   * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+   * @param variables are the initial values of the process variables that will be set before the execution starts. */
+  Execution startExecution(String processDefinitionId, Map<String, Object> variables);
+
+  /** starts a new execution for the ProcessDefinition with the given processDefinitionDbid.
+   * @param processDefinitionId the {@link ProcessDefinition#getId() unique id} of the process definition.
+   * @param variables are the initial values of the process variables that will be set before the execution starts.
+   * @param executionKey is a user provided reference for the new execution that must be unique over all 
+   *    process versions with the same name. */
+  Execution startExecution(String processDefinitionId, Map<String, Object> variables, String executionKey);
+
+  /** starts a new execution in the latest version of the given process definition.
+  * @param processDefinitionName is the name of the process definition for which the latest version will be taken. */ 
+  Execution startExecutionInLatest(String processDefinitionName);
+
+  /** starts a new execution in the latest version of the given processDefinitionName.
+   * @param processDefinitionName is the name of the process definition 
+   *   for which the latest version will be taken. 
+   * @param executionKey is a user provided reference for the new execution 
+   *   that must be unique over all process versions with the same name. */
+  Execution startExecutionInLatest(String processDefinitionName, String executionKey);
+
+  /** starts a new execution in the latest version of the given processDefinitionName. 
+   * @param processDefinitionName is the name of the process definition 
+   *   for which the latest version will be taken. 
+   * @param variables are the initial values of the process variables that 
+   *   will be set before the execution starts (read: before the initial 
+   *   node is executed). */
+  Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables);
+
+  /** starts a new execution in the latest version of the given processDefinitionName. 
+   * @param processDefinitionName is the name of the process definition for which the latest version will be taken. 
+   * @param variables are the initial values of the process variables that will be set before the execution starts.
+   * @param executionKey is a user provided reference for the new execution that must be unique over all 
+   *    process versions with the same name. */
+  Execution startExecutionInLatest(String processDefinitionName, Map<String, Object> variables, String executionKey);
+
+  /** the execution that is uniquely defined by the process definition and the business key. */
+  Execution findExecution(String processDefinitionName, String executionKey);
+
+  /** the execution that is uniquely defined by the process definition and the business key. */
+  Execution findExecution(String executionId);
+
+  
+  /** provides an external trigger to an execution. */
+  Execution signalExecution(String executionId);
+  
+  /** provides a named external trigger to an execution. */
+  Execution signalExecution(String executionId, String signalName);
+   
+  /** provides a named external trigger to an execution with parameters. */
+  Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
+
+  /** provides a external trigger to an execution with parameters. */
+  Execution signalExecution(String executionId, Map<String, Object> parameters);
+  
+  
+  /** provides a named external trigger to an execution. */
+  Execution signalExecutionByKey(String processDefinitionName, String executionKey);
+  
+  /** provides a named external trigger to an execution. */
+  Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName);
+  
+  /** provides a named external trigger to an execution with parameters. */
+  Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters);
+
+  /** provides a named external trigger to an execution with parameters. */
+  Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
+
+  
+  /** creates or overwrites a variable value on the referenced execution */ 
+  Execution setVariable(String executionId, String name, Object value);
+  
+  /** creates or overwrites the variable values on the referenced execution */ 
+  Execution setVariables(String executionId, Map<String, Object> variables);
+  
+  /** retrieves a variable */ 
+  Object getVariable(String executionId, String variableName);
+  
+  /** retrieves a map of variables */ 
+  Map<String, Object> getVariables(String executionId, List<String> variableNames);
+}

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ManagementService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ManagementService.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -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.jbpm;
+
+import java.util.List;
+
+import org.jbpm.job.Job;
+import org.jbpm.job.Message;
+import org.jbpm.job.Timer;
+
+
+/** operations targeted to system operators that need to keep 
+ * the process engine up and running.  This functionality is typically 
+ * exposed through a management web console. 
+ * 
+ * @author Tom Baeyens
+ */
+public interface ManagementService {
+
+  /** all the messages which are waiting to be executed. 
+   * Messages that are already acquired will not show up in the list. */
+  List<Message> getMessages(int firstResult, int maxResults);
+  
+  /** all the timers which are waiting for their due date.
+   * Timers that are already acquired will not show up in the list. */
+  List<Timer> getTimers(int firstResult, int maxResults);
+
+  /** all jobs for which all the retry attempts have failed and 
+   * which are parked, waiting for operator intervention */  
+  List<Job> getJobsWithException(int firstResult, int maxResults);
+
+  /** resets the retry count, clears the exception and executes the job. 
+   * An exception is thrown out of this method in case the execution 
+   * of the job fails.  In case the async command executor is configured 
+   * for this service, failing job execution will not result into an 
+   * exception coming out of this method. */
+  void executeJob(String jobId);
+}

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessDefinition.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessDefinition.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm;
+
+import java.io.Serializable;
+
+
+/** a graphical process which is deployed in the {@ ProcessService}.
+ * 
+ * @author Tom Baeyens
+ */
+public interface ProcessDefinition extends Serializable {
+
+  /** the optional package name of this process.  This can be used to create 
+   * hierarchy of process categories for easy lookup.   This is a 
+   * similar way of grouping and creating a structure as in Java. 
+   * We recommend the same conventions as with Java package names. */
+  String getPackageName();
+
+  /** the short display name given to this process definition. 
+   * Multiple process definitions can have the same as long 
+   * as they are given a different {@link #version}.  */
+  String getName();
+
+  /** the user defined short representation of the name. Just 
+   * like the name, multiple versions of a process definition 
+   * can have the same key. */
+  String getKey();
+
+  /** the unique id for this process definition. */
+  String getId();
+
+  /** automatically assigned during deployment of a process that 
+   * represents the sequence number for process definitions with 
+   * the same {@link ObservableElement#getName() name}. */ 
+  int getVersion();
+
+  /** the description name given to this process definition. 
+   * Multiple process definitions can have the same */
+  String getDescription();
+
+}

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessEngine.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,12 @@
+package org.jbpm;
+
+
+public interface ProcessEngine {
+
+  ProcessService getProcessService();
+  ExecutionService getExecutionService();
+  TaskService getTaskService();
+  ManagementService getManagementService();
+
+  ResourceManager getResourceManager();
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessEngine.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ProcessService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ProcessService.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm;
+
+import java.util.List;
+
+
+/** a process definition repository.
+ * 
+ * @author Tom Baeyens
+ */
+public interface ProcessService {
+  
+  Deployment createDeployment();
+
+  /** deploy a new process definition into the process repository. */
+  ProcessDefinition deploy(Deployment deployment);
+
+  /** all deployed process names. */
+  List<String> findProcessDefinitionNames();
+
+  /** all versions of the given process. */
+  List<ProcessDefinition> findProcessDefinitions(String processDefinitionName);
+
+  /** latest version of the processDefinition with the given name. */
+  ProcessDefinition findLatestProcessDefinition(String processDefinitionName);
+
+  /** specific version of a named processDefinition. */
+  ProcessDefinition findProcessDefinition(String processDefinitionName, int processDefinitionVersion);
+
+}

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/PvmException.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/PvmException.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -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.jbpm;
+
+public class PvmException extends RuntimeException {
+
+  private static final long serialVersionUID = 1L;
+
+  public PvmException() {
+    super();
+  }
+  public PvmException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+  public PvmException(String msg) {
+    super(msg);
+  }
+  public PvmException(Throwable cause) {
+    super(cause);
+  }
+}

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/ResourceManager.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,19 @@
+package org.jbpm;
+
+/** can be used to provide transactional reasources 
+ * like JDBC connection or hibernate session to 
+ * the method invocations on a service.
+ * 
+ * TODO what about subsequent service method invocations ?  
+ * will a provided resource only be used once in the next method invocation.
+ * Or will the the resource be available for the remainder of the thread.
+ * In other words: should interceptor that propagates these resources into the 
+ * environment clean them from the thread local or not ? 
+ *  
+ * @author Tom Baeyens
+ */
+public interface ResourceManager {
+
+  void addResource(Object object);
+  void addResource(String name, Object object);
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ResourceManager.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/TaskService.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,6 @@
+package org.jbpm;
+
+
+public interface TaskService {
+
+}


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Job.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.job;
+
+import java.util.Date;
+
+import org.jbpm.Execution;
+
+/** base class for timers and messages.
+ * 
+ * @author Tom Baeyens
+ */
+public interface Job {
+
+  long getDbid();
+
+  String getLockOwner();
+
+  boolean isSuspended();
+
+  Date getDueDate();
+
+  String getException();
+
+  int getRetries();
+
+  boolean isExclusive();
+
+  Execution getExecution();
+
+  Execution getProcessInstance();
+
+  Date getLockExpirationTime();
+
+}
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Job.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Message.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.job;
+
+/** an asynchronous message.
+ * 
+ * @author Tom Baeyens
+ */
+public interface Message extends Job {
+
+}
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Message.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/Timer.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -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.jbpm.job;
+
+
+/** a timer.
+ * 
+ * @author Tom Baeyens
+ */
+public interface Timer extends Job {
+
+  String getSignalName();
+
+  String getEventName();
+
+  String getRepeat();
+
+}
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/Timer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + LF

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html (from rev 2677, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/job/package.html)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1 @@
+<body>timers and asynchronous messages</body>
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/job/package.html
___________________________________________________________________
Name: svn:mergeinfo
   + 

Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html (from rev 2682, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/package.html)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html	                        (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/package.html	2008-10-30 15:14:38 UTC (rev 2683)
@@ -0,0 +1,5 @@
+<body>the primary facade interfaces to 
+{@link org.jbpm.pvm.ProcessService the process repository}, 
+{@link org.jbpm.pvm.ExecutionService the execution repository} 
+and {@link org.jbpm.pvm.ManagementService the management functionalities}.
+</body>
\ No newline at end of file

Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java	2008-10-30 15:05:34 UTC (rev 2682)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EnterpriseTimerSession.java	2008-10-30 15:14:38 UTC (rev 2683)
@@ -25,9 +25,9 @@
 import javax.ejb.RemoveException;
 
 import org.jbpm.PvmException;
+import org.jbpm.job.Timer;
 import org.jbpm.pvm.env.Environment;
 import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.job.Timer;
 import org.jbpm.pvm.session.DbSession;
 import org.jbpm.pvm.session.TimerSession;
 




More information about the jbpm-commits mailing list