com.filenet.api.core

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 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.

    Metadata

    • 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_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_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 a 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.
        For a detailed description of task states, see Task State Machine.

        Parameters:
        flags - A LifecycleChangeFlags 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. The 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:
        • 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 - A String specifying the symbolic name, ClassNames constant, ID, or GUIDConstants constant of the class to which this object is to be changed.
        Throws:
        E_NULL_OR_INVALID_PARAM_VALUE - if className is null or has a length of zero.

© Copyright IBM Corporation 2006, 2015. All rights reserved.