|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.auditing.AuditedACSObject
com.arsdigita.workflow.simple.Task
com.arsdigita.workflow.simple.Workflow
Represents a process instance that is assigned to a particular process that is associated with some object.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static int |
DELETED
|
static int |
INIT
|
static int |
NONE
|
static int |
STARTED
|
static int |
STOPPED
|
static String |
versionId
|
Fields inherited from class com.arsdigita.workflow.simple.Task |
DISABLED, ENABLED, FINISHED, INACTIVE |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
Constructor Summary | |
|
Workflow()
Creates a new workflow process with the properties label and description set to null. |
|
Workflow(BigDecimal id)
Restores a workflow process using a BigDecimal ID. |
|
Workflow(DataObject workflowDataObject)
Restores a workflow process from a task data object. |
protected |
Workflow(ObjectType type)
Constructor for setting the object type. |
|
Workflow(OID oid)
Restores a workflow process using an OID. |
protected |
Workflow(String typeName)
Constructor for setting the object type name. |
|
Workflow(String label,
String description)
Creates a new workflow process. |
Method Summary | |
void |
addTask(Task task)
Adds a task to this process. |
Object |
clone()
Performs a deep clone of the workflow. |
protected void |
cloneTasks(Workflow workflowClone)
|
void |
disableEvt()
On a disable event, stops the workflow. |
void |
enable()
Overrides the enable method (since the behavior is a little different). |
String |
getBaseDataObjectType()
Returns the base data object type. |
Iterator |
getEnabledTasks()
Returns an iterator over all enabled tasks in the process. |
Iterator |
getFinishedTasks()
Returns an iterator over all finished tasks in the process. |
static BigDecimal |
getItemID(BigDecimal workflowId)
|
static BigDecimal |
getItemID(Workflow w)
|
ACSObject |
getObject()
Get the ACSObject this Workflow is associated with. |
OID |
getObjectOID()
Returns the object associated with the process. |
static Workflow |
getObjectWorkflow(ACSObject o)
|
static Workflow |
getObjectWorkflow(BigDecimal id)
|
static BigDecimal |
getObjectWorkflowID(ACSObject o)
|
static BigDecimal |
getObjectWorkflowID(BigDecimal id)
|
Iterator |
getOverdueTasks()
|
int |
getProcessState()
Retrieves the state of the process. |
TaskCollection |
getTaskCollection()
|
int |
getTaskCount()
Returns the number of task in this process. |
Iterator |
getTasks()
Returns an iterator for the tasks in this process. |
WorkflowTemplate |
getWorkflowTemplate()
Get the template from which this workflow was instantiated. |
protected void |
initialize()
Initializes the internal state depending on whether this is a new or a restored instance. |
void |
removeAllTasks()
Removes all tasks from this workflow. |
void |
removeTask(Task task)
Deletes a task. |
void |
removeTask(Task task,
Iterator dependentList)
Removes a task from the underlying workflow process definition. |
void |
save(User user)
Saves the current state of the process. |
void |
setObject(ACSObject o)
Sets the Object that this workflow is applied to. |
void |
setObjectID(BigDecimal id)
Set the object id |
void |
setWorkflowTemplate(WorkflowTemplate template)
Set the template from which this Workflow was instantiated. |
void |
start(User user)
Starts the process. |
protected void |
startInternal()
Gets the process spinning. |
void |
stop(User user)
Stops the process. |
Methods inherited from class com.arsdigita.auditing.AuditedACSObject |
getCreationDate, getCreationIP, getCreationUser, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, disconnect, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String BASE_DATA_OBJECT_TYPE
public static final int NONE
public static final int STARTED
public static final int STOPPED
public static final int DELETED
public static final int INIT
Constructor Detail |
public Workflow(String label, String description)
save
method is called.
label
- the labeldescription
- the descriptionpublic Workflow()
label
and description
set to null.
Properties of this object are not made persistent until the
save
method is called. If save() is called
without setting these properties, an IllegalArgumentException
will be thrown.
public Workflow(DataObject workflowDataObject)
workflowDataObject
- protected Workflow(ObjectType type)
type
- the object typeObjectType
protected Workflow(String typeName)
typeName
- the type namepublic Workflow(OID oid) throws DataObjectNotFoundException
oid
- the OIDOID
public Workflow(BigDecimal id) throws DataObjectNotFoundException
id
- the BigDecimal ID of this object. An OID will be
created implicitly with the BASE_DATA_OBJECT_TYPE constant
specified in this file.Method Detail |
protected void initialize()
initialize
in class Task
public String getBaseDataObjectType()
getBaseDataObjectType
in class Task
public void addTask(Task task)
task
- the task to add to this processTask
public void removeTask(Task task)
task
- to be removedpublic void removeAllTasks()
public final TaskCollection getTaskCollection()
public void save(User user) throws ProcessException
user
- the user
ProcessException
public int getTaskCount()
public void stop(User user)
user
- the user that stopped the processpublic void start(User user)
user
- the user that starts the processprotected void startInternal()
public int getProcessState()
public void setObject(ACSObject o)
o
- the object to which to apply this workflow.public void setObjectID(BigDecimal id)
public Iterator getTasks()
public Iterator getEnabledTasks()
public Iterator getFinishedTasks()
public Iterator getOverdueTasks()
public OID getObjectOID()
public ACSObject getObject()
public void removeTask(Task task, Iterator dependentList)
task
- the task to be removeddependentList
- the task definitions that are dependent on
the passed in task definitionpublic Object clone()
clone
in class Task
protected void cloneTasks(Workflow workflowClone)
public void enable()
enable
in class Task
public void disableEvt()
disableEvt
in class Task
public void setWorkflowTemplate(WorkflowTemplate template)
public WorkflowTemplate getWorkflowTemplate()
public static BigDecimal getItemID(Workflow w)
public static BigDecimal getItemID(BigDecimal workflowId)
public static BigDecimal getObjectWorkflowID(BigDecimal id)
public static BigDecimal getObjectWorkflowID(ACSObject o)
public static Workflow getObjectWorkflow(BigDecimal id)
public static Workflow getObjectWorkflow(ACSObject o)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |