|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WorkflowView
An interface exposing workflow features to a notional user of the workflow system. The user associated with the view is typically represented by a security construct such as atg.security.User or atg.security.Persona; note that in the latter case, the view may actually be associated with a role, group, or organization, rather than a single user. A workflow view provides status information on workflow instances, tasks and outcomes, allows new workflow instances to be created, and permits task outcomes to be fired to existing workflow instances. All of these operations are implicitly performed from the point of view of the user, and the view exposes only those workflow objects which are accessible to the user.
A WorkflowView can be read-only, in which case any of the methods which normally modify workflow state throw runtime exceptions instead. This is useful when providing workflow views for arbitrary Personas, rather than individual users. For example, this type of view can be used to access workflow information which is available to all the users with a particular role, or in a particular organization. Because such a view does not represent an actual user effecting workflow state, it makes sense for it to provide read-only access.
It is also possible for a WorkflowView to be global, that is, not associated with any user. A global view performs no access control, thereby providing an unconstrained view of the workflow system.
User
,
Persona
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static int |
OWNERSHIP_ANY
Accept all tasks, regardless of ownership. |
static int |
OWNERSHIP_SELF
Accept only tasks owned by the user associated with this view. |
static int |
OWNERSHIP_SELF_OR_UNOWNED
Accept only tasks which are either unowned or owned by the user associated with this view. |
static int |
OWNERSHIP_UNOWNED
Accept only tasks which are unowned. |
Method Summary | |
---|---|
boolean |
canClaimTask(TaskInfo pTaskInfo)
Determines whether the given task is assignable and unowned, and whether the user associated with this view is permitted to claim the task. |
boolean |
canFireTaskOutcome(TaskInfo pTaskInfo)
Determines whether the user associated with this view is permitted to fire outcomes against the given task. |
boolean |
canReleaseTask(TaskInfo pTaskInfo)
Determines whether the given task is assignable and owned by the user associated with this view, and whether the user is permitted to release the task. |
boolean |
canSetTaskAccessControlList(TaskInfo pTaskInfo)
Determines whether the user associated with this view is permitted to change the task's access control list. |
boolean |
canSetTaskOwner(TaskInfo pTaskInfo)
Determines whether the given task is assignable, and whether the user associated with this view is permitted to change the ownership of the task. |
boolean |
canSetTaskPriority(TaskInfo pTaskInfo)
Determines whether the user associated with this view is permitted to change the priority of the task. |
boolean |
canStartWorkflow(java.lang.String pProcessName,
java.lang.String pSegmentName)
Determines whether the user associated with this view is permitted to start the workflow with the given process and segment names. |
void |
claimTask(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
java.lang.String pTaskElementId)
Sets the owner of a workflow instance's task to the DirectoryPrincipal associated with this view. |
void |
fireTaskOutcome(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
java.lang.String pOutcomeElementId,
int pErrorResponse)
Fires a particular outcome of some task for an existing workflow instance on behalf of this view's user. |
java.util.Collection |
getActiveTasks(java.lang.String pSubjectId,
TaskQueryOptions pQueryOptions,
AccessRight pAccessRight,
int pOwnership)
Returns TaskInfos for all the active tasks associated with the given workflow subject, that can be acted upon by the view. |
java.util.Collection |
getActiveTasks(TaskQueryOptions pQueryOptions,
AccessRight pAccessRight,
int pOwnership)
Returns TaskInfos for all the active tasks associated with all workflow subjects, that can be acted upon by the view. |
java.util.Collection |
getAllTasks(java.lang.String pSubjectId,
TaskQueryOptions pQueryOptions,
AccessRight pAccessRight,
int pOwnership)
Returns TaskInfos for all the tasks associated with the given workflow subject, that can be acted upon by the view, including inactive and completed tasks. |
DirectoryPrincipal |
getDirectoryPrincipal()
Returns the DirectoryPrincipal corresponding to this view's user. |
boolean |
hasAccessToTask(TaskInfo pTaskInfo,
AccessRight pAccessRight)
Determines whether the user associated with this view has a particular access right to the given workflow task. |
boolean |
hasAccessToWorkflow(java.lang.String pProcessName,
java.lang.String pSegmentName,
AccessRight pAccessRight)
Determines whether the user associated with this view has a particular access right to the given workflow. |
void |
releaseTask(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
java.lang.String pTaskElementId)
Clears the ownership of a workflow instance's task by setting the owner to null. |
void |
setTaskAccessControlList(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
java.lang.String pTaskElementId,
AccessControlList pAcl)
Sets the given task's access control list for an existing workflow instance. |
void |
setTaskOwner(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
java.lang.String pTaskElementId,
DirectoryPrincipal pOwner)
Sets the owner of a workflow instance's task to the given DirectoryPrincipal, or to null if ownership of the task it to be cleared. |
void |
setTaskPriority(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
java.lang.String pTaskElementId,
int pPriority)
Sets the given task's priority for an existing workflow instance. |
void |
startWorkflow(java.lang.String pProcessName,
java.lang.String pSegmentName,
java.lang.String pSubjectId,
int pErrorResponse)
Starts a workflow instance for the given subject on behalf of this view's user. |
Field Detail |
---|
static final java.lang.String CLASS_VERSION
static final int OWNERSHIP_ANY
static final int OWNERSHIP_SELF
static final int OWNERSHIP_UNOWNED
static final int OWNERSHIP_SELF_OR_UNOWNED
Method Detail |
---|
java.util.Collection getAllTasks(java.lang.String pSubjectId, TaskQueryOptions pQueryOptions, AccessRight pAccessRight, int pOwnership) throws WorkflowException
The pAccessRight argument specifies the access right which should be consulted to determine the tasks' accessibility; for example, TaskAccessRights.EXECUTE will yield only those tasks which can be executed/claimed/released by this view. For a global view, all active tasks are returned, and this argument has no effect.
pSubjectId
- the repository id of the workflow subject for
which all tasks should be returnedpQueryOptions
- a TaskQueryOptions object containing any
additional filtering or sorting criteria; if null, all accessible
tasks for the given subject will be returnedpAccessRight
- one of the access rights in TaskAccessRightspOwnership
- specifies whether/how tasks are further
filtered by ownership; one of OWNERSHIP_ANY, OWNERSHIP_SELF,
OWNERSHIP_UNOWNED, or OWNERSHIP_SELF_OR_UNOWNED
WorkflowException
- if the task information cannot be
obtainedTaskAccessRights
,
TaskInfo
java.util.Collection getActiveTasks(TaskQueryOptions pQueryOptions, AccessRight pAccessRight, int pOwnership) throws WorkflowException
The pAccessRight argument specifies the access right which should be consulted to determine the tasks' accessibility; for example, TaskAccessRights.EXECUTE will yield only those tasks which can be executed/claimed/released by this view. For a global view, all active tasks are returned, and this argument has no effect.
pQueryOptions
- a TaskQueryOptions object containing any
additional filtering or sorting criteria; if null, all accessible
active tasks will be returnedpAccessRight
- one of the access rights in TaskAccessRightspOwnership
- specifies whether/how tasks are further
filtered by ownership; one of OWNERSHIP_ANY, OWNERSHIP_SELF,
OWNERSHIP_UNOWNED, or OWNERSHIP_SELF_OR_UNOWNED
WorkflowException
- if the task information cannot be
obtainedTaskAccessRights
,
TaskInfo
java.util.Collection getActiveTasks(java.lang.String pSubjectId, TaskQueryOptions pQueryOptions, AccessRight pAccessRight, int pOwnership) throws WorkflowException
The pAccessRight argument specifies the access right which should be consulted to determine the tasks' accessibility; for example, TaskAccessRights.EXECUTE will yield only those tasks which can be executed/claimed/released by this view. For a global view, all active tasks are returned, and this argument has no effect.
pSubjectId
- the repository id of the workflow subject for
which active tasks should be returnedpQueryOptions
- a TaskQueryOptions object containing any
additional filtering or sorting criteria; if null, all accessible
active tasks for the given subject will be returnedpAccessRight
- one of the access rights in TaskAccessRightspOwnership
- specifies whether/how tasks are further
filtered by ownership; one of OWNERSHIP_ANY, OWNERSHIP_SELF,
OWNERSHIP_UNOWNED, or OWNERSHIP_SELF_OR_UNOWNED
WorkflowException
- if the task information cannot be
obtainedTaskAccessRights
,
TaskInfo
void startWorkflow(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, int pErrorResponse) throws MissingWorkflowDescriptionException, ActorAccessException, ActionException, java.lang.UnsupportedOperationException
The pErrorResponse argument refers to one of the constants in atg.process.action.ActionConstants, and specifies the error handling disposition to be used in case an ActionException occurs in the course of creating the workflow instance. If ERROR_RESPONSE_DEFAULT is specified, the default error response configured for the action will be used. Otherwise, the action's default response will be overriden with the value specified.
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject for
which the workflow instance should be createdpErrorResponse
- the error handling disposition to be used
for any ActionExceptions thrown while creating the workflow
instance
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the view's user does not have
access rights to start this workflow
ActionException
- if an error occurs while executing a
process action
java.lang.UnsupportedOperationException
- if this method is called
for a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
,
ActionConstants
boolean canStartWorkflow(java.lang.String pProcessName, java.lang.String pSegmentName) throws MissingWorkflowDescriptionException
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segment
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
,
WorkflowAccessRights.EXECUTE
void setTaskAccessControlList(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, java.lang.String pTaskElementId, AccessControlList pAcl) throws MissingWorkflowDescriptionException, ActorAccessException, java.lang.UnsupportedOperationException
Note: The access control list assigned to a task at
runtime must be a subset of the access control list specified in
the task's TaskDescriptor: that is, everybody who is allowed
access by the runtime ACL must have also been allowed access by
the TaskDescriptor's ACL. This restriction is not enforced by
the API, and may be relaxed in the future. However, the
implementation currently relies on it, and will behave
incorrectly if this rule is not observed. For example, tasks
returned by the getActiveTasks
methods will not
include those tasks which are accessible via the runtime ACL,
unless they are also accessible via the TaskDescriptor's ACL.
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject whose
workflow instance is to be affectedpTaskElementId
- process element id of the task element, as
it appears in the workflow definition filepAcl
- access control list to assign
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the view's user does not have
access rights to change the ACL of the task
java.lang.UnsupportedOperationException
- if this method is called
for a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
boolean canSetTaskAccessControlList(TaskInfo pTaskInfo) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow task
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights.WRITE
void setTaskPriority(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, java.lang.String pTaskElementId, int pPriority) throws MissingWorkflowDescriptionException, ActorAccessException, java.lang.UnsupportedOperationException
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject whose
workflow instance is to be affectedpTaskElementId
- process element id of the task element, as
it appears in the workflow definition filepPriority
- priority value to assign
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the view's user does not have
access rights to change the priority of the task
java.lang.UnsupportedOperationException
- if this method is called
for a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
boolean canSetTaskPriority(TaskInfo pTaskInfo) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow task
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights.WRITE
void setTaskOwner(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, java.lang.String pTaskElementId, DirectoryPrincipal pOwner) throws MissingWorkflowDescriptionException, ActorAccessException, java.lang.UnsupportedOperationException
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject whose
workflow instance is to be affectedpTaskElementId
- process element id of the task element, as
it appears in the workflow definition filepOwner
- a DirectoryPrincipal that is to be assigned
ownership of this task, or null if ownership of the task is to be
cleared
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the task is not assignable, or
if the view's user does not have access rights to change the
owner of the task
java.lang.UnsupportedOperationException
- if this method is called
for a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
boolean canSetTaskOwner(TaskInfo pTaskInfo) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow task
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights.WRITE
void claimTask(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, java.lang.String pTaskElementId) throws MissingWorkflowDescriptionException, ActorAccessException, java.lang.UnsupportedOperationException
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject whose
workflow instance is to be affectedpTaskElementId
- process element id of the task element, as
it appears in the workflow definition file
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the view's user does not have
access rights to claim the task
java.lang.UnsupportedOperationException
- if this method is called
for a global view, or a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
boolean canClaimTask(TaskInfo pTaskInfo) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow task
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights.EXECUTE
void releaseTask(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, java.lang.String pTaskElementId) throws MissingWorkflowDescriptionException, ActorAccessException, java.lang.UnsupportedOperationException
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject whose
workflow instance is to be affectedpTaskElementId
- process element id of the task element, as
it appears in the workflow definition file
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the view's user does not have
access rights to release the task
java.lang.UnsupportedOperationException
- if this method is called
for a global view, or a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
boolean canReleaseTask(TaskInfo pTaskInfo) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow task
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights.EXECUTE
void fireTaskOutcome(java.lang.String pProcessName, java.lang.String pSegmentName, java.lang.String pSubjectId, java.lang.String pOutcomeElementId, int pErrorResponse) throws MissingWorkflowDescriptionException, ActorAccessException, ActionException, java.lang.UnsupportedOperationException
The pErrorResponse argument refers to one of the constants in atg.process.action.ActionConstants, and specifies the error handling disposition to be used in case an ActionException occurs in the course of firing the outcome. If ERROR_RESPONSE_DEFAULT is specified, the default error response configured for the action will be used. Otherwise, the action's default response will be overriden with the value specified.
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpSubjectId
- the repository id of the workflow subject for
whose workflow instance the outcome should be firedpOutcomeElementId
- process element id of the outcome to be
fired, as it appears in the workflow definition filepErrorResponse
- the error handling disposition to be used
for any ActionExceptions thrown while taking the outcome
MissingWorkflowDescriptionException
- if the workflow
information cannot be found
ActorAccessException
- if the view's user does not have
access or ownership rights for this task
ActionException
- if an error occurs while executing a
process action
java.lang.UnsupportedOperationException
- if this method is called
for a read-only viewWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
,
ActionConstants
boolean canFireTaskOutcome(TaskInfo pTaskInfo) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow task
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights.EXECUTE
boolean hasAccessToWorkflow(java.lang.String pProcessName, java.lang.String pSegmentName, AccessRight pAccessRight) throws MissingWorkflowDescriptionException
pProcessName
- the name of the workflow processpSegmentName
- the name of the workflow process segmentpAccessRight
- one of the access rights in
WorkflowAccessRights
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundWorkflowConstants.DEFAULT_WORKFLOW_SEGMENT
,
WorkflowAccessRights
boolean hasAccessToTask(TaskInfo pTaskInfo, AccessRight pAccessRight) throws MissingWorkflowDescriptionException
pTaskInfo
- a TaskInfo describing some workflow taskpAccessRight
- one of the access rights in TaskAccessRights
MissingWorkflowDescriptionException
- if the workflow
information cannot be foundTaskAccessRights
DirectoryPrincipal getDirectoryPrincipal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |