public interface CmTask extends RepositoryObject, Replicable, Subscribable, IndependentlyPersistableObject
CmTask
is a base class that does not allow instances.
You create instances from subclasses of CmTask
.
An instance is created with a Factory
method and is independently persistable.
Custom properties can be defined in a subclass to provide either inputs necessary to complete the task,
or to provide a place to collect the results of the task. Custom properties will often be object-valued properties,
referencing documents or other business objects relevant to the task.
A CmTask
object has a "coordinator", a Containable
object such as a Folder
, Document
, or CustomObject
.
The coordinator object associates the CmTask
to a business object that defines a process, of which the CmTask
represents a single piece of work in the process.
All tasks that participate in the process have the same coordinator.
CmTask
objects might have successor and predecessor activities, which, collectively, define the order that all tasks execute in a process.
Predecessor-successor associations are specified by CmTaskRelationship
objects.
A CmTask
object has state, a server-defined value that indicates how the task has progressed towards completion.
A CmTask
object drives and responds to state changes through events and subscriptions.
To allow task automation, every state change generates a ChangeStateEvent
, which may be subscribed to or configured for auditing.
Optionally, a CmTask
object has pre- and post-conditions. A pre-condition must be met before the CmTask
object can move into a state where it is ready to be worked on.
A post-condition must be met before the CmTask
object can be completed. Conditions are expressed as an SQL predicate applied to the CmTask
object itself,
or to objects related to the CmTask
through object-valued properties.
For more information, see Task Concepts.
Modifier and Type | Method and Description |
---|---|
void |
changeClass(java.lang.String className)
Changes the class of a Content Engine object.
|
void |
changeState(LifecycleChangeFlags flags)
Changes the current, user-defined lifecycle state of a
Document object,
or the current state of a CmTask object
(see TaskState for a list of the states). |
ActiveMarkingList |
get_ActiveMarkings()
Returns the value of the ActiveMarkings property.
|
EventSet |
get_AuditedEvents()
Returns the value of the AuditedEvents property.
|
java.lang.Boolean |
get_CmInheritCoordinatorPermissions()
Returns the value of the CmInheritCoordinatorPermissions property.
|
java.lang.Boolean |
get_CmIsMarkedForDeletion()
Returns the value of the CmIsMarkedForDeletion property.
|
Containable |
get_Coordinator()
Returns the value of the Coordinator property.
|
java.lang.String |
get_Creator()
Returns the value of the Creator property.
|
java.util.Date |
get_DateCompleted()
Returns the value of the DateCompleted property.
|
java.util.Date |
get_DateCreated()
Returns the value of the DateCreated property.
|
java.util.Date |
get_DateLastModified()
Returns the value of the DateLastModified property.
|
java.util.Date |
get_DateStarted()
Returns the value of the DateStarted property.
|
Id |
get_Id()
Returns the value of the Id property.
|
java.lang.String |
get_LastFailureReason()
Returns the value of the LastFailureReason property.
|
java.lang.String |
get_LastModifier()
Returns the value of the LastModifier property.
|
java.lang.String |
get_Name()
Returns the value of the Name property.
|
java.lang.String |
get_Owner()
Returns the value of the Owner property.
|
AccessPermissionList |
get_Permissions()
Returns the value of the Permissions property.
|
java.lang.String |
get_PostCondition()
Returns the value of the PostCondition property.
|
java.lang.String |
get_PreCondition()
Returns the value of the PreCondition property.
|
CmTaskRelationshipSet |
get_Predecessors()
Returns the value of the Predecessors property.
|
CmTaskRelationshipSet |
get_Successors()
Returns the value of the Successors property.
|
TaskState |
get_TaskState()
Returns the value of the TaskState property.
|
void |
set_CmInheritCoordinatorPermissions(java.lang.Boolean value)
Sets the value of the CmInheritCoordinatorPermissions property.
|
void |
set_Coordinator(Containable value)
Sets the value of the Coordinator property.
|
void |
set_Creator(java.lang.String value)
Sets the value of the Creator property.
|
void |
set_DateCreated(java.util.Date value)
Sets the value of the DateCreated property.
|
void |
set_DateLastModified(java.util.Date value)
Sets the value of the DateLastModified property.
|
void |
set_LastFailureReason(java.lang.String value)
Sets the value of the LastFailureReason property.
|
void |
set_LastModifier(java.lang.String value)
Sets the value of the LastModifier property.
|
void |
set_Owner(java.lang.String value)
Sets the value of the Owner property.
|
void |
set_Permissions(AccessPermissionList value)
Sets the value of the Permissions property.
|
getObjectStore
get_ExternalReplicaIdentities, get_ReplicationGroup, set_ExternalReplicaIdentities, set_ReplicationGroup
raiseEvent
addPendingAction, clearPendingActions, delete, getAccessAllowed, getPendingActions, getUpdateSequenceNumber, isCurrent, save, save, setUpdateSequenceNumber
fetchProperties, fetchProperties, fetchProperty, fetchProperty, getObjectReference, refresh, refresh, refresh
get_ClassDescription, getClassName, getConnection, getProperties, getSuperClasses
java.lang.String get_Creator()
void set_Creator(java.lang.String value)
java.util.Date get_DateCreated()
void set_DateCreated(java.util.Date value)
java.lang.String get_LastModifier()
void set_LastModifier(java.lang.String value)
java.util.Date get_DateLastModified()
void set_DateLastModified(java.util.Date value)
Id get_Id()
java.lang.String get_Name()
EventSet get_AuditedEvents()
java.lang.String get_Owner()
void set_Owner(java.lang.String value)
AccessPermissionList get_Permissions()
void set_Permissions(AccessPermissionList value)
ActiveMarkingList get_ActiveMarkings()
TaskState get_TaskState()
Containable get_Coordinator()
void set_Coordinator(Containable value)
CmTaskRelationshipSet get_Successors()
CmTaskRelationshipSet get_Predecessors()
java.lang.String get_PreCondition()
java.lang.String get_PostCondition()
java.util.Date get_DateStarted()
java.util.Date get_DateCompleted()
java.lang.String get_LastFailureReason()
void set_LastFailureReason(java.lang.String value)
java.lang.Boolean get_CmInheritCoordinatorPermissions()
void set_CmInheritCoordinatorPermissions(java.lang.Boolean value)
java.lang.Boolean get_CmIsMarkedForDeletion()
void changeState(LifecycleChangeFlags flags)
Document
object,
or the current state of a CmTask
object
(see TaskState for a list of the states).
The changeState
method must be followed by a save()
or an equivalent batch operation to commit the state change.
Every state change generates a ChangeStateEvent
, to which you can subscribe or audit.
For documents, you cannot change the state of a
document that is a reservation object. Valid lifecycle states are defined by the collection of
DocumentState
objects belonging to the document's
associated DocumentLifecyclePolicy
object.
For documents, the LifecycleChangeFlags
constant can be used as follows:
PROMOTE
: Promotes the document's current lifecycle state to the next state in its document lifecycle policy and sets the document's
CurrentState property to the name of the next state. Throws an error if the document is in the exception state or in the last state of its lifecycle.DEMOTE
: Demotes the document's current lifecycle state to the previous state in its document lifecycle policy and sets the document's
CurrentState property to the name of the previous state, unless the CanBeDemoted property of the document’s current state (DocumentState
object) is set to false
. Throws an error if the document is in the exception state, in the first state of its lifecycle, or does not allow demotion.SET_EXCEPTION
: Places the document into the exception state and sets its IsInExceptionState property to true
.
Throws an error if the document's IsInExceptionState property is already set to true
.CLEAR_EXCEPTION
: Removes the document from the exception state and sets its IsInExceptionState property to false
.
Throws an error if the document's IsInExceptionState property is already set to false
.RESET
: Resets the lifecycle state to the initial state in its document lifecycle policy and sets the document's
CurrentState property to the name of the initial state. Throws an error if the document is in the exception state.For tasks, the LifecycleChangeFlags
constant can be used as follows:
PROMOTE
: Promotes the task's current state to the next state.DEMOTE
: Demotes the task's current state to the previous state.SET_EXCEPTION
: Places the task into the exception state.CLEAR_EXCEPTION
: Removes the task from the exception state. RESET
: Not supported for tasks.flags
- A LifecycleChangeFlags
constant that specifies the type of state transition to be applied to the document or task.E_BAD_PARAMETER
- if you attempt to promote, demote, reset, or place into the exception state a document or task that is in the exception state,
or attempt to clear the exception of a document or task that is not in the exception state.E_NOT_SUPPORTED
- if you attempt to promote or demote a document or task from a state that does not allow promotion or demotion.void changeClass(java.lang.String className)
changeClass
method does not modify the security for an object, even if the object's current security
is derived from the default security for its source class. For the object's user-defined properties,
the following rules apply:
null
if there is no default defined).null
) as the default value defined in the original class will be set
to the default value defined by the new class. However, any user-defined property that has had its value
modified from the default value will retain that modified value in the new class.When the class of a document object is changed, the default document lifecycle policy of the new class will only be applied to the document object's DocumentLifecyclePolicy property if both of the following scenarios occur:
Changing the document class of a document object has no effect on the storage location of the document’s content. For more information, see the Document Storage topic in the "Document Concepts" section of the Content Engine Java and .NET API Developer’s Guide.
className
- A String
specifying the symbolic name, ClassNames
constant, ID, or GUIDConstants
constant of the class to which this object is to be changed.E_NULL_OR_INVALID_PARAM_VALUE
- if className
is null
or has a length of zero.© Copyright IBM Corporation 2006, 2015. All rights reserved.