[jbpm-commits] JBoss JBPM SVN: r5230 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/api/activity and 6 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Sun Jul 5 06:44:43 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-07-05 06:44:43 -0400 (Sun, 05 Jul 2009)
New Revision: 5230
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Condition.java
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Condition.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/ActivityCoordinates.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenExecution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenProcessInstance.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Assignable.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/AssignmentHandler.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Participation.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Swimlane.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/DecisionConditionActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Transition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/TransitionImpl.java
Log:
JBPM-2372 finish javadocs review
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -35,7 +35,7 @@
* to have a kind of undoable delete operation. */
String STATE_SUSPENDED = "suspended";
- /** unique identification of this deployment */
+ /** unique identification of this deployment that is used as a reference in the service methods */
String getId();
/** typically correspond to the file name or url or some other
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -26,13 +26,15 @@
import java.util.Map;
import java.util.Set;
+import org.jbpm.api.model.OpenExecution;
+
/** 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_ROOT},
- * then it is locked. A locked execution is read only.
+ * executing or waiting for an external trigger. If an execution is not in {@link #STATE_ACTIVE_ROOT}
+ * or {@link #STATE_ACTIVE_CONCURRENT} then it is locked. A locked execution is read only.
* </p>
*
* <p>When a new execution is created, it is in {@link #STATE_ACTIVE_ROOT}.
@@ -43,14 +45,9 @@
*
* <p>If an execution is locked, methods that change the execution will throw
* a {@link JbpmException} 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
- * activity behaviour methods, even while the execution is in a locked state.
+ * {@link OpenExecution#setVariable(String, Object) updating variables},
+ * {@link OpenExecution#setPriority(int) updating priority} are not considered to change an
+ * execution.
* </p>
*
* <p>Make sure that comparisons between {@link #getState()} and the
@@ -66,11 +63,9 @@
*/
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 */
+ /** between creation of a new process instance and the start of that
+ * process instance. Typically this is only a very short period that is
+ * not observable thourgh the service interfaces. */
String STATE_CREATED = "created";
/** single (non-concurrent) path of execution that is an active indicator
@@ -126,8 +121,8 @@
* of the constants. */
String STATE_INACTIVE_JOIN = "inactive-join";
- /** indicates that this execution is temporary suspended with the
- * {@link #suspend()} method. Human tasks of a suspended execution
+ /** indicates that this execution is temporary suspended. 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
@@ -155,7 +150,7 @@
* a single process definition. */
String getKey();
- /** a globally unique identifier for this execution. */
+ /** a globally unique identifier for this execution that is used as a reference in the service methods. */
String getId();
/** the <a href="#state">state</a> of this execution. */
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -24,7 +24,7 @@
import java.io.Serializable;
-/** a graphical process which is deployed in the {@ ProcessService}.
+/** a graphical process which is deployed in the {@link RepositoryService}.
*
* @author Tom Baeyens
*/
@@ -32,7 +32,7 @@
/** 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}. */
+ * as they are given a different {@link #getVersion() version}. */
String getName();
/** the user defined short representation of the name. Just
@@ -40,12 +40,12 @@
* can have the same key. */
String getKey();
- /** the unique id for this process definition. */
+ /** the unique id for this process definition that is used as a reference in the service methods. */
String getId();
/** automatically assigned during deployment of a process that
* represents the sequence number for process definitions with
- * the same {@link ObservableElement#getId() name}. */
+ * the same {@link #getName() name}. */
int getVersion();
/** references the deployment in which this process definition is
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -62,10 +62,10 @@
/** select only process definitions that are not suspended */
ProcessDefinitionQuery notSuspended();
- /** order selected process definitions ascending for certain {@link #PROPERTY_STATE properties} */
+ /** order selected process definitions ascending for certain {@link #PROPERTY_ID properties} */
ProcessDefinitionQuery orderAsc(String property);
- /** order selected process definitions descending for certain {@link #PROPERTY_STATE properties} */
+ /** order selected process definitions descending for certain {@link #PROPERTY_ID properties} */
ProcessDefinitionQuery orderDesc(String property);
/** select a specific page in the result set */
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -101,12 +101,12 @@
void deleteTask(String taskId, String reason);
/** add a role to a given task.
- * @param participation specifies the kind of involvement of the participatingUser
+ * @param participationType specifies the kind of involvement of the participatingUser
* in this task. see {@link Participation} for default constants. */
void addTaskParticipatingUser(String taskId, String userId, String participationType);
/** add a role to a given task.
- * @param participation specifies the kind of involvement of the participatingUser
+ * @param participationType specifies the kind of involvement of the participatingUser
* in this task. see {@link Participation} for default constants. */
void addTaskParticipatingGroup(String taskId, String groupId, String participationType);
@@ -115,13 +115,13 @@
/** removes a role to a given task. Nothing happens (no exception) if
* the role does not exist.
- * @param participation specifies the kind of involvement of the participatingUser
+ * @param participationType specifies the kind of involvement of the participatingUser
* in this task. see {@link Participation} for default constants. */
void removeTaskParticipatingUser(String taskId, String userId, String participationType);
/** removes a role to a given task. Nothing happens (no exception) if
* the role does not exist.
- * @param participation specifies the kind of involvement of the participatingUser
+ * @param participationType specifies the kind of involvement of the participatingUser
* in this task. see {@link Participation} for default constants. */
void removeTaskParticipatingGroup(String taskId, String groupId, String participationType);
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -22,6 +22,7 @@
package org.jbpm.api.activity;
import org.jbpm.api.Execution;
+import org.jbpm.api.ExecutionService;
import org.jbpm.api.JbpmException;
import org.jbpm.api.model.OpenExecution;
@@ -41,7 +42,7 @@
// wait state behaviour /////////////////////////////////////////////////////
/** makes this execution wait in the current activity until an external trigger is given
- * with one of the {@link #signal()} methods. */
+ * with one of the {@link ExecutionService#signalExecutionById(String) signal} methods. */
void waitForSignal();
// taking a transition //////////////////////////////////////////////////////
@@ -49,11 +50,7 @@
/** takes the default transition.
*
* <p>This method can only be called from inside
- * {@link ExternalActivityBehaviour} implementations and in rare occasions also from outside
- * of the execution (from an external client while the process is in a wait state).
- * For external clients, it is more normal to use the {@link #signal()}
- * method as in that case, it's the current activity (hence the process language)that
- * will decide how to interpret the signal.
+ * {@link ExternalActivityBehaviour} implementations.
* </p>
*
* @throws JbpmException in case there is no default transition in the current activity
@@ -62,12 +59,8 @@
/** takes the outgoing transition with the given name.
*
- * <p>This method can only be called
- * from inside {@link ExternalActivityBehaviour} implementations and in rare occasions also from
- * outside of the execution (from an external client while the process is in a wait state).
- * For external clients, it is more normal to use the {@link #signal(String)}
- * method as in that case, it's the current activity (hence the process language)that
- * will decide how to interpret the signal.</p>
+ * <p>This method can only be called from inside
+ * {@link ExternalActivityBehaviour} implementations.</p>
*
* <p>Transitions will be looked up recursively starting from the
* {@link #getActivityName() current activity} and then up the activity-parent-hierarchy</p>
@@ -75,7 +68,7 @@
* @param transitionName is the name of the transition to take. A null value will
* match the first unnamed transition.
*
- * @throws JbpmException in case no such transition is found in {@link #getActivity() the current activity}
+ * @throws JbpmException in case no such transition is found in {@link #getActivityName() the current activity}
* or in case this method is called from inside an {@link ActivityBehaviour}.*/
void take(String transitionName);
@@ -85,12 +78,8 @@
*
* <p>The activityName is looked up in the current activity's nested activities.</p>
*
- * <p>This method can only be called
- * from inside {@link ExternalActivityBehaviour} implementations and in rare occasions also from
- * outside of the execution (from an external client while the process is in a wait state).
- * For external clients, it is more normal to use the {@link #signal(String)}
- * method as in that case, it's the current activity (hence the process language)that
- * will decide how to interpret the signal.</p> */
+ * <p>This method can only be called from inside {@link ExternalActivityBehaviour}
+ * implementations.</p> */
void execute(String activityName);
// ending an execution //////////////////////////////////////////////////////
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -28,7 +28,7 @@
*/
public interface Group {
- /** unique id for the group */
+ /** unique id for the group that is used as a reference in the service methods */
String getId();
/** name for the group (should be unique within one group type) */
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -28,7 +28,7 @@
*/
public interface User {
- /** unique id for the user */
+ /** unique id for the user that is used as a reference in the service methods */
String getId();
/** given name (aka first name) */
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/ActivityCoordinates.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/ActivityCoordinates.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/ActivityCoordinates.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -21,8 +21,11 @@
*/
package org.jbpm.api.model;
+import org.jbpm.api.RepositoryService;
+
/** activity coordinates indicating the graphical position in the diagram.
*
+ * @see RepositoryService#getActivityCoordinates(String, String)
* @author Tom Baeyens
*/
public interface ActivityCoordinates {
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -30,14 +30,13 @@
* or a task.
*
* This class also supports threaded discussions with the
- * {@link #getParent() parent}-{@link #getComments() child}
- * relation.
+ * {@link #getComments() parent-child relation}.
*
* @author Tom Baeyens
*/
public interface Comment extends Discussable {
- /** the meaningless database primary key */
+ /** the unique id for this comment that is used as a reference in the service methods */
String getId();
/** the id of the user that made this comment. The term actorId is an abstract
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Condition.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Condition.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Condition.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -1,38 +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.jbpm.api.model;
-
-import java.io.Serializable;
-
-/** user code that reflects a runtime calculation of a boolean value.
- * Used for {@link Transition#getCondition() transition guard conditions} and
- * {@link Transition#getWaitCondition() transition wait states}.
- *
- * @see Transition
- *
- * @author Tom Baeyens
- */
-public interface Condition extends Serializable {
-
- /** evaluates this condition in the context of the given execution. */
- boolean evaluate(OpenExecution execution);
-}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -23,8 +23,15 @@
import java.util.List;
+import org.jbpm.api.TaskService;
-/**
+
+/** something that people can discuss like a task
+ * or a process instance.
+ *
+ * for now, only task discussions are supported in
+ * the {@link TaskService}
+ *
* @author Tom Baeyens
*/
public interface Discussable {
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenExecution.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenExecution.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -34,15 +34,17 @@
* This execution exposes the execution hierarchy,
* variable access and associated timers.
*
- * This is an execution that can be used backed by
- * an open persistence session. Typically inside of
- * an environment block. Navigation over the
- * related model objects will load the related objects
- * transparently with lazy loading.
+ * Open refers to the relations being accessible. This is related
+ * to hibernate's lazy loading capabilities. That requires an active
+ * session. Inside process execution, there is such an active session
+ * and hence the relations can be exposed. But for the client of the
+ * service methods, it's not sure if the session is still active.
+ * That is why the relations are not exposed in the return values
+ * of service methods.
*
* @author Tom Baeyens
*/
-public interface OpenExecution extends Execution, Discussable {
+public interface OpenExecution extends Execution {
/** update the state */
void setState(String state);
@@ -79,7 +81,7 @@
/** remove the key-value pair for the given key from this scope.
* No exception will be thrown when the variable is not present.
- * @returns whether a variable was actually found and removed. */
+ * @return whether a variable was actually found and removed. */
boolean removeVariable(String key);
/** removes all variables in this scope */
@@ -117,18 +119,18 @@
// execution hierarchy access ///////////////////////////////////////////////
- /** the main path of execution in the <a href="package-summary.html#basicexecutionstructure">execution
- * structure</a>. Null will be returned in case this execution itself is the
- * main execution path. */
+ /** the main path of execution in the execution tree structure. The
+ * process instance is the root of the execution tree. */
OpenProcessInstance getProcessInstance();
- /** the parent execution in the <a href="package-summary.html#basicexecutionstructure">execution
- * structure</a>. Null will be returned in case this execution itself is the
- * main execution path. */
+ /** the parent execution in the execution structure.
+ * Null will be returned in case this execution itself is the
+ * process instance. */
OpenExecution getParent();
/** the child execution for the given name or null in case such execution doesn't exist. */
OpenExecution getExecution(String name);
+ /** find the execution in the given activity or null if no such activity exists */
OpenExecution findActiveExecutionIn(String activityName);
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenProcessInstance.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenProcessInstance.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/OpenProcessInstance.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -23,5 +23,17 @@
import org.jbpm.api.ProcessInstance;
+/** process instance for which the relations are exposed.
+ *
+ * Open refers to the relations being accessible. This is related
+ * to hibernate's lazy loading capabilities. That requires an active
+ * session. Inside process execution, there is such an active session
+ * and hence the relations can be exposed. But for the client of the
+ * service methods, it's not sure if the session is still active.
+ * That is why the relations are not exposed in the return values
+ * of service methods.
+ *
+ * @author Tom Baeyens
+ */
public interface OpenProcessInstance extends OpenExecution, ProcessInstance {
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Assignable.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Assignable.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Assignable.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -22,12 +22,19 @@
package org.jbpm.api.task;
-/**
+/** tasks or swimlanes can be assigned.
+ *
+ * @see AssignmentHandler
* @author Tom Baeyens
*/
public interface Assignable {
- void setAssignee(String assignee);
+ /** assign the task or swimlane to the given user */
+ void setAssignee(String userId);
+
+ /** add the given user as a candidate to the task or swimlane */
void addCandidateUser(String userId);
+
+ /** add the members of the given group as candidates to the task or swimlane */
void addCandidateGroup(String groupId);
}
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/AssignmentHandler.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/AssignmentHandler.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/AssignmentHandler.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -27,6 +27,7 @@
/** interface to delegate {@link Task} or {@link Swimlane} assignment.
+ *
* @author Tom Baeyens
*/
public interface AssignmentHandler extends Serializable {
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Participation.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Participation.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Participation.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -50,6 +50,7 @@
* reassigned. */
String REPLACED_ASSIGNEE = "replaced-assignee";
+ /** the unique id for this participation that is used as a reference in the service methods */
String getId();
/** userId for this participation.
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Swimlane.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Swimlane.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Swimlane.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -23,6 +23,8 @@
import java.io.Serializable;
+import org.jbpm.api.IdentityService;
+
/** a runtime process role that can store an assignment so that
* multiple related tasks are assigned to the same actor.
*
@@ -30,10 +32,13 @@
*/
public interface Swimlane extends Serializable {
+ /** the unique id for this swimlane that is used as a reference in the service methods */
String getId();
+ /** the name of the swimlane as defined in the process file */
String getName();
+ /** the {@link IdentityService#findUserById(String) userId}
+ * of the person that is assigned to this swimlane. */
String getAssignee();
- void setAssignee(String assignee);
}
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -24,38 +24,76 @@
import java.io.Serializable;
import java.util.Date;
-/** runtime task.
+import org.jbpm.api.TaskService;
+
+/** a task.
*
* @author Tom Baeyens
*/
public interface Task extends Serializable {
+ /** task is waiting for someone to work on it and completed it */
public static final String STATE_OPEN = "open";
+
+ /** task is done */
public static final String STATE_COMPLETED = "completed";
+
+ /** task doesn't show up in task lists as something is wrong
+ * with the related process instance that requires manual
+ * intervention first. */
public static final String STATE_SUSPENDED = "suspended";
+ /** the unique id for this task that is used as a reference in the service methods */
String getId();
+ /** the short display name of this task. Originally, this might come
+ * from the process file, but it can be changed at runtime for individual
+ * tasks. */
String getName();
+
+ /** change the short display name of this tasks.
+ * Updates require you to invoke {@link TaskService#saveTask(Task)} afterwards. */
void setName(String name);
+ /** longer description of this task */
String getDescription();
+
+ /** update the longer description of this task.
+ * Updates like this require you to invoke {@link TaskService#saveTask(Task)} afterwards. */
void setDescription(String description);
+ /** the person responsible for completion of this task. */
String getAssignee();
+
+ /** update the assignee of this task.
+ * Updates like this require you to invoke {@link TaskService#saveTask(Task)} afterwards. */
void setAssignee(String assignee);
+ /** date and time when this task was created */
Date getCreate();
+ /** date and time when this task must be completed. This might be null. */
Date getDueDate();
+
+ /** update the date and time when this task must be completed.
+ * Updates like this require you to invoke {@link TaskService#saveTask(Task)} afterwards. */
void setDueDate(Date dueDate);
+ /** the priority of this task. This is only a data item for user purposes.
+ * The engine doesn't do anything different for different priorities. */
int getPriority();
+
+ /** update the priority.
+ * Updates like this require you to invoke {@link TaskService#saveTask(Task)} afterwards. */
void setPriority(int priority);
+ /** reference to the execution or null if this task is unrelated to an execution */
String getExecutionId();
+ /** reference to the activity or null if this task is unrelated to an activity */
String getActivityName();
+ /** name of the resource in the deployment for the form that is associated
+ * to this task. */
String getFormResourceName();
}
\ No newline at end of file
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2009-07-05 10:44:43 UTC (rev 5230)
@@ -605,7 +605,14 @@
}</programlisting>
<para>In the next release we might switch to user provided ID's for these 3 methods.
</para>
-
+
</section>
+ <section>
+ <title>Task outcomes</title>
+ <para>Task outcomes might be changed as it is still being discussed
+ <ulink url="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241828">here</ulink>
+ </para>
+ </section>
+
</chapter>
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/DecisionConditionActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/DecisionConditionActivity.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/DecisionConditionActivity.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -25,8 +25,8 @@
import org.jbpm.api.JbpmException;
import org.jbpm.api.activity.ActivityExecution;
-import org.jbpm.api.model.Condition;
import org.jbpm.pvm.internal.model.Activity;
+import org.jbpm.pvm.internal.model.Condition;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.Transition;
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/ForkActivity.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -26,8 +26,8 @@
import org.jbpm.api.Execution;
import org.jbpm.api.activity.ActivityExecution;
-import org.jbpm.api.model.Condition;
import org.jbpm.pvm.internal.model.Activity;
+import org.jbpm.pvm.internal.model.Condition;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.Transition;
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Condition.java (from rev 5226, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Condition.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Condition.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Condition.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -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.pvm.internal.model;
+
+import java.io.Serializable;
+
+import org.jbpm.api.model.OpenExecution;
+
+/** user code that reflects a runtime calculation of a boolean value.
+ * Used for {@link Transition#getCondition() transition guard conditions} and
+ * {@link Transition#getWaitCondition() transition wait states}.
+ *
+ * @see Transition
+ *
+ * @author Tom Baeyens
+ */
+public interface Condition extends Serializable {
+
+ /** evaluates this condition in the context of the given execution. */
+ boolean evaluate(OpenExecution execution);
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Condition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.model;
-import org.jbpm.api.model.Condition;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.pvm.internal.env.EnvironmentDefaults;
import org.jbpm.pvm.internal.script.ScriptManager;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Transition.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Transition.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/Transition.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.model;
-import org.jbpm.api.model.Condition;
/**
* a transition in a {@link OpenProcessDefinition} graph.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/TransitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/TransitionImpl.java 2009-07-05 09:02:33 UTC (rev 5229)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/TransitionImpl.java 2009-07-05 10:44:43 UTC (rev 5230)
@@ -23,7 +23,6 @@
import java.util.List;
-import org.jbpm.api.model.Condition;
import org.jbpm.api.model.Event;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
More information about the jbpm-commits
mailing list