atg.workflow
Interface WorkflowManager


public interface WorkflowManager

The primary interface exposing features of the workflow system. A workflow manager is implemented over a process manager. In addition to the underlying process information, it provides global status information on workflow instances, tasks and outcomes. It also affords the creation of WorkflowViews which expose user-specific features of the workflow system, including user views of workflow status and the ability to start new workflow instances and fire task outcomes to existing instances.

See Also:
ProcessManager, WorkflowView

Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 java.util.Collection getActiveTasks(java.lang.String pSubjectId, TaskQueryOptions pQueryOptions)
          Returns TaskInfos for all the active tasks associated with the given workflow subject.
 java.util.Collection getActiveTasks(TaskQueryOptions pQueryOptions)
          Returns TaskInfos for all the active tasks associated with all workflow subjects.
 java.util.Collection getAllTasks(java.lang.String pSubjectId, TaskQueryOptions pQueryOptions)
          Returns TaskInfos for all the tasks associated with the given workflow subject, including inactive and completed tasks.
 WorkflowView getGlobalWorkflowView()
          Returns a global WorkflowView which is not associated with any User or Persona.
 ProcessManager getProcessManager()
          Returns the ProcessManager instance that manages process execution for all the workflows associated with this WorkflowManager.
 WorkflowDescriptor getWorkflowDescriptor(java.lang.String pProcessName, java.lang.String pSegmentName)
          Returns a WorkflowDescriptor which describes the workflow, its tasks, and their outcomes, given the workflow's process and segment names.
 WorkflowView getWorkflowView(Persona pPersona)
          Returns a read-only WorkflowView which exposes the features of the workflow system from the point of view of the given Persona, which can represent an individual, role, group, or organization.
 WorkflowView getWorkflowView(User pUser)
          Returns a WorkflowView which exposes the features of the workflow system from the point of view of the given User.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getAllTasks

java.util.Collection getAllTasks(java.lang.String pSubjectId,
                                 TaskQueryOptions pQueryOptions)
                                 throws WorkflowException
Returns TaskInfos for all the tasks associated with the given workflow subject, including inactive and completed tasks. The pQueryOptions argument, if not null, specifies additional restrictions to be placed on the tasks, as well as optional sorting criteria.

Parameters:
pSubjectId - the repository id of the workflow subject for which all tasks should be returned
pQueryOptions - a TaskQueryOptions object containing any additional filtering or sorting criteria; if null, all tasks for the given subject will be returned
Returns:
a Collection of TaskInfo objects
Throws:
WorkflowException - if the task information cannot be obtained
See Also:
TaskInfo

getActiveTasks

java.util.Collection getActiveTasks(TaskQueryOptions pQueryOptions)
                                    throws WorkflowException
Returns TaskInfos for all the active tasks associated with all workflow subjects. The pQueryOptions argument, if not null, specifies additional restrictions to be placed on the tasks, as well as optional sorting criteria.

Parameters:
pQueryOptions - a TaskQueryOptions object containing any additional filtering or sorting criteria; if null, all active tasks will be returned
Returns:
a Collection of TaskInfo objects
Throws:
WorkflowException - if the task information cannot be obtained
See Also:
TaskInfo

getActiveTasks

java.util.Collection getActiveTasks(java.lang.String pSubjectId,
                                    TaskQueryOptions pQueryOptions)
                                    throws WorkflowException
Returns TaskInfos for all the active tasks associated with the given workflow subject. The pQueryOptions argument, if not null, specifies additional restrictions to be placed on the tasks, as well as optional sorting criteria.

Parameters:
pSubjectId - the repository id of the workflow subject for which active tasks should be returned
pQueryOptions - a TaskQueryOptions object containing any additional filtering or sorting criteria; if null, all active tasks for the given subject will be returned
Returns:
a Collection of TaskInfo objects
Throws:
WorkflowException - if the task information cannot be obtained
See Also:
TaskInfo

getWorkflowDescriptor

WorkflowDescriptor getWorkflowDescriptor(java.lang.String pProcessName,
                                         java.lang.String pSegmentName)
Returns a WorkflowDescriptor which describes the workflow, its tasks, and their outcomes, given the workflow's process and segment names.

Parameters:
pProcessName - the name of the workflow process
pSegmentName - the name of the workflow process segment
Returns:
a WorkflowDescriptor for the given workflow, or null if no such workflow exists
See Also:
WorkflowConstants.DEFAULT_WORKFLOW_SEGMENT

getWorkflowView

WorkflowView getWorkflowView(User pUser)
Returns a WorkflowView which exposes the features of the workflow system from the point of view of the given User. In particular, the resultant view exposes only those workflow objects which are accessible to the User.


getWorkflowView

WorkflowView getWorkflowView(Persona pPersona)
Returns a read-only WorkflowView which exposes the features of the workflow system from the point of view of the given Persona, which can represent an individual, role, group, or organization. In particular, the resultant view exposes only those workflow objects which are accessible to the Persona.

This type of view can be used, for example, to access workflow information which is available to all the users with a particular role, or in a particular organization. Because this view does not represent an actual User effecting workflow state, it provides read-only access to workflow objects.


getGlobalWorkflowView

WorkflowView getGlobalWorkflowView()
Returns a global WorkflowView which is not associated with any User or Persona. The global view performs no access control when accessing workflow information, therefore providing a sort of "superuser" view of the system.

This view is provided as a convenient shortcut for unconstrained access of the workflow system. It can be used, for example, when dealing with types of workflow which do not require access control, or simply as a way to obtain complete workflow information which is not constrained by any user's access rights.


getProcessManager

ProcessManager getProcessManager()
Returns the ProcessManager instance that manages process execution for all the workflows associated with this WorkflowManager.