Interface CmTask
-
- All Superinterfaces:
- EngineObject, IndependentlyPersistableObject, IndependentObject, Replicable, RepositoryObject, java.io.Serializable, Subscribable
public interface CmTask extends RepositoryObject, Replicable, Subscribable, IndependentlyPersistableObject
Represents a single work item to be completed as part of a process that might involve multiple related or independent work items. Task objects support workflow-based applications with multiple steps and user roles, such as the processing of insurance claims or loan applications.CmTask
is a base class that does not allow instances. You create instances from subclasses ofCmTask
. An instance is created with aFactory
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", aContainable
object such as aFolder
,Document
, orCustomObject
. The coordinator object associates theCmTask
to a business object that defines a process, of which theCmTask
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 byCmTaskRelationship
objects.A
CmTask
object has state, a server-defined value that indicates how the task has progressed towards completion. ACmTask
object drives and responds to state changes through events and subscriptions. To allow task automation, every state change generates aChangeStateEvent
, 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 theCmTask
object can move into a state where it is ready to be worked on. A post-condition must be met before theCmTask
object can be completed. Conditions are expressed as an SQL predicate applied to theCmTask
object itself, or to objects related to theCmTask
through object-valued properties.For more information, see Task Concepts.
Metadata
-
-
Method Summary
Methods 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 aDocument
object, or the current state of aCmTask
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.-
Methods inherited from interface com.filenet.api.core.RepositoryObject
getObjectStore
-
Methods inherited from interface com.filenet.api.replication.Replicable
get_ExternalReplicaIdentities, get_ReplicationGroup, set_ExternalReplicaIdentities, set_ReplicationGroup
-
Methods inherited from interface com.filenet.api.core.Subscribable
raiseEvent
-
Methods inherited from interface com.filenet.api.core.IndependentlyPersistableObject
addPendingAction, clearPendingActions, delete, getAccessAllowed, getPendingActions, getUpdateSequenceNumber, isCurrent, save, save, setUpdateSequenceNumber
-
Methods inherited from interface com.filenet.api.core.IndependentObject
fetchProperties, fetchProperties, fetchProperty, fetchProperty, getObjectReference, refresh, refresh, refresh
-
Methods inherited from interface com.filenet.api.core.EngineObject
get_ClassDescription, getClassName, getConnection, getProperties, getSuperClasses
-
-
-
-
Method Detail
-
get_Creator
java.lang.String get_Creator()
Returns the value of the Creator property. For more information, see Creator Property.
-
set_Creator
void set_Creator(java.lang.String value)
Sets the value of the Creator property. For more information, see Creator Property.
-
get_DateCreated
java.util.Date get_DateCreated()
Returns the value of the DateCreated property. For more information, see DateCreated Property.
-
set_DateCreated
void set_DateCreated(java.util.Date value)
Sets the value of the DateCreated property. For more information, see DateCreated Property.
-
get_LastModifier
java.lang.String get_LastModifier()
Returns the value of the LastModifier property. For more information, see LastModifier Property.
-
set_LastModifier
void set_LastModifier(java.lang.String value)
Sets the value of the LastModifier property. For more information, see LastModifier Property.
-
get_DateLastModified
java.util.Date get_DateLastModified()
Returns the value of the DateLastModified property. For more information, see DateLastModified Property.
-
set_DateLastModified
void set_DateLastModified(java.util.Date value)
Sets the value of the DateLastModified property. For more information, see DateLastModified Property.
-
get_Id
Id get_Id()
Returns the value of the Id property. For more information, see Id Property.
-
get_Name
java.lang.String get_Name()
Returns the value of the Name property. For more information, see Name Property.
-
get_AuditedEvents
EventSet get_AuditedEvents()
Returns the value of the AuditedEvents property. For more information, see AuditedEvents Property.
-
get_Owner
java.lang.String get_Owner()
Returns the value of the Owner property. For more information, see Owner Property.
-
set_Owner
void set_Owner(java.lang.String value)
Sets the value of the Owner property. For more information, see Owner Property.
-
get_Permissions
AccessPermissionList get_Permissions()
Returns the value of the Permissions property. For more information, see Permissions Property.
-
set_Permissions
void set_Permissions(AccessPermissionList value)
Sets the value of the Permissions property. For more information, see Permissions Property.
-
get_ActiveMarkings
ActiveMarkingList get_ActiveMarkings()
Returns the value of the ActiveMarkings property. For more information, see ActiveMarkings Property.
-
get_TaskState
TaskState get_TaskState()
Returns the value of the TaskState property. For more information, see TaskState Property.
-
get_Coordinator
Containable get_Coordinator()
Returns the value of the Coordinator property. For more information, see Coordinator Property.
-
set_Coordinator
void set_Coordinator(Containable value)
Sets the value of the Coordinator property. For more information, see Coordinator Property.
-
get_Successors
CmTaskRelationshipSet get_Successors()
Returns the value of the Successors property. For more information, see Successors Property.
-
get_Predecessors
CmTaskRelationshipSet get_Predecessors()
Returns the value of the Predecessors property. For more information, see Predecessors Property.
-
get_PreCondition
java.lang.String get_PreCondition()
Returns the value of the PreCondition property. For more information, see PreCondition Property.
-
get_PostCondition
java.lang.String get_PostCondition()
Returns the value of the PostCondition property. For more information, see PostCondition Property.
-
get_DateStarted
java.util.Date get_DateStarted()
Returns the value of the DateStarted property. For more information, see DateStarted Property.
-
get_DateCompleted
java.util.Date get_DateCompleted()
Returns the value of the DateCompleted property. For more information, see DateCompleted Property.
-
get_LastFailureReason
java.lang.String get_LastFailureReason()
Returns the value of the LastFailureReason property. For more information, see LastFailureReason Property.
-
set_LastFailureReason
void set_LastFailureReason(java.lang.String value)
Sets the value of the LastFailureReason property. For more information, see LastFailureReason Property.
-
get_CmInheritCoordinatorPermissions
java.lang.Boolean get_CmInheritCoordinatorPermissions()
Returns the value of the CmInheritCoordinatorPermissions property. For more information, see CmInheritCoordinatorPermissions Property.
-
set_CmInheritCoordinatorPermissions
void set_CmInheritCoordinatorPermissions(java.lang.Boolean value)
Sets the value of the CmInheritCoordinatorPermissions property. For more information, see CmInheritCoordinatorPermissions Property.
-
get_CmIsMarkedForDeletion
java.lang.Boolean get_CmIsMarkedForDeletion()
Returns the value of the CmIsMarkedForDeletion property. For more information, see CmIsMarkedForDeletion Property.
-
changeState
void changeState(LifecycleChangeFlags flags)
Changes the current, user-defined lifecycle state of aDocument
object, or the current state of aCmTask
object (see TaskState for a list of the states). ThechangeState
method must be followed by asave()
or an equivalent batch operation to commit the state change. Every state change generates aChangeStateEvent
, 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 associatedDocumentLifecyclePolicy
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 tofalse
. 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 totrue
. Throws an error if the document's IsInExceptionState property is already set totrue
.CLEAR_EXCEPTION
: Removes the document from the exception state and sets its IsInExceptionState property tofalse
. Throws an error if the document's IsInExceptionState property is already set tofalse
.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.
- Parameters:
flags
- ALifecycleChangeFlags
constant that specifies the type of state transition to be applied to the document or task.- Throws:
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.
-
changeClass
void changeClass(java.lang.String className)
Changes the class of a Content Engine object. The new class must already exist and both it and the original class must be subclasses of the same base class. ThechangeClass
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:- Any user-defined properties that exist in the new class but not in the original class are set to the
default value defined by the new class (or to
null
if there is no default defined). - Any user-defined properties that exist in both the original and the new class that are writable and
have the same value (including
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. - Any user-defined properties whose definitions exist in the original class but not in the new class will no longer exist on the object when its class is changed.
- Property constraints for the new class (for example, required values, choice lists, ranges) are not enforced.
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:
- The document has no current lifecycle policy.
- The document is either a reservation object, or is the current version object and is not reserved.
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.
- Parameters:
className
- AString
specifying the symbolic name,ClassNames
constant, ID, orGUIDConstants
constant of the class to which this object is to be changed.- Throws:
E_NULL_OR_INVALID_PARAM_VALUE
- ifclassName
isnull
or has a length of zero.
- Any user-defined properties that exist in the new class but not in the original class are set to the
default value defined by the new class (or to
-
-