com.adobe.idp.taskmanager.dsc.client
Class TypedTaskManagerService

java.lang.Object
  extended by com.adobe.idp.taskmanager.dsc.client.TypedTaskManagerService
All Implemented Interfaces:
TaskManager

public class TypedTaskManagerService
extends java.lang.Object
implements TaskManager


Field Summary
static java.util.logging.Logger logger
           
static java.lang.String MAX_PERF
           
 
Method Summary
 AttachmentInfo addAttachment(long aTaskId, AttachmentInfo aAttachmentInfo, byte[] aAttachmentBytes)
          Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.
 AttachmentInfo addAttachment(long aTaskId, AttachmentInfo aAttachmentInfo, Document aAttachmentDocument)
          Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.
 AttachmentInfo addAttachment(long aTaskId, AttachmentInfo aAttachmentInfo, java.io.InputStream attachmentStream)
          Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.
 AttachmentInfo addNote(long aTaskId, AttachmentInfo aAttachmentInfo)
          Appends a new attachment of type AttachmentInfo.TYPE_NOTE to the specified task.
 java.util.List addTasks(java.lang.Long aActionId, java.util.List aPrincipalOids)
          Adds Tasks to an Action Instance associated with the multi-user service.
 BatchResult batchReassignTasks(java.lang.Long[] aTaskIds, java.lang.String aReassignToUser, boolean ignoreErrors)
          Reassigns a number of tasks to another user queue.
 FormServiceInvokeResponse callRenderService(long aTaskId, long aFormId, java.util.Map aInputMap)
          Calls the render service specified in the process for this task.
 FormServiceInvokeResponse callSubmitService(long aTaskId, long aFormId, Document aDocumentSubmitted, java.util.Map aInputMap)
          Calls the submit service specified in the process for this task.
 void cancelTask(long aTaskId)
          Removes all persisted data for an active non-workflow task.
 void cancelTaskUnsecure(long aTaskId, java.lang.String principalOid)
          Removes all persisted data for an active non-workflow task without checking the user ACL.
 void changeDeadline(long taskID, java.util.Date newDeadline)
          Modifies the deadline for a task if the user has the permission to do so.
 void changeDescription(java.lang.Long aTaskId, java.lang.String aUpdatedDescription)
          Changes the description for a task.
 void changeQueueForTask(long aTaskId, long aTargetQueueId)
          Moves the specified task to another queue also owned by the user who owns the task's current queue.
 void changeReminder(long taskID, java.util.Date newReminder)
           
 void claimTask(long aTaskId)
          Claims a task from a user queue in which the user calling this method is permitted to claim the task (see TaskACL.isCanClaim() and TaskACL.setCanClaim()), or from a group queue of which the user is a member.
 void claimTask(long aTaskId, boolean aLockTask)
          Claims a task from a queue to which the user has access, or from a group queue of which the user is a member.
 CompleteTaskResult completeTask(long aTaskId)
          Completes the specified task.
 CompleteTaskResult completeTask(long aTaskId, FormInstance formData)
          Completes the specified task with the specified data.
 CompleteTaskResult completeTask(long aTaskId, java.lang.String selectedAction)
          Completes the specified task with the specified action.
 void consultTask(long aTaskId, java.lang.String userIdToConsult)
          Consults with another user on a task, in order to retrieve input from that other user.
 void copyAttachmentsToTask(long aTaskId, java.util.List aAttachmentList)
          Copies attachments from a java.util.List of Document objects to the task.
 CreateTaskResult createTask(CreateTaskInfo createTaskInfo)
          Creates a new task.
 CreateTaskResult createTask(FormInstance newFormData, java.lang.String instructions, boolean showAttachments)
          Creates new tasks not yet associated with a process.
 CreateTaskResult createTask(long actionId, FormInstance aFormData, java.lang.String instructions, long queueId, boolean aCopyAttachments, boolean aShowAttachments)
          Creates a task associated with the given action instance and assigns the task to a queue.
 CreateTaskResult createTask(long actionId, FormInstance aFormData, java.lang.String instructions, long queueId, java.util.List aAttachmentsToCopy, boolean aShowAttachments)
          Creates a task associated with the given action instance and assigns the task to a queue.
 CompleteTaskResult deadlineTask(long aTaskId, java.lang.String aDeadlineAction, boolean aChangeInstructions, java.lang.String aDeadlineInstructions)
          Completes a task with a deadline event.
 void deleteAttachment(long aTaskId, long aAttachmentId)
          Removes an attachment from the specfied task.
 void escalateTask(long aTaskId, long aQueueId)
          Escalates a task to another queue.
 void escalateTask(long aTaskId, long aQueueId, boolean aAllowOOODesignations)
          Escalates a task to another queue, optionally indicating that the escalations can be OOO designated
 void forwardTask(long aTaskId, java.lang.String userIdToForward)
          Forwards a non-completed task from a user queue to the default queue indicated in the userIdToForward parameter.
 void forwardTaskUnsecure(long aTaskId, java.lang.String userIdToForward, java.lang.String principalOid)
          Forwards a non-completed task from a user queue to the default queue indicated in the userIdToForward parameter.
 AttachmentInfo[] getAllAttachments(long aTaskId)
          Retrieves all currently readable (visible) attachments for this task.
 AttachmentInfo getAttachmentInfo(long aTaskId, long aAttachmentId)
          Retrieves attachment information for the attachment.
 java.util.List getAttachmentListForTask(long aTaskId)
          Retrieves a java.util.List of Document objects representing the attachments for a task.
 java.lang.String getCompletionNote(long aTaskId)
          Retrieves a completion note for the task, if there is one
 TaskACL getEmptyACL()
          Retrieves a TaskACL object for this object.
 CreateTaskInfo getEmptyCreateTaskInfo()
          Retrieves a CreateTaskInfo object for this object.
 FormInstance getEmptyForm()
          Retrieves a FormInstance object for this object.
 FormInstance getFormInstanceForTask(long aTaskId)
          Retrieves a FormInstance object associated with a task.
 FormInstance getFormInstanceForTask(long aTaskId, boolean aRetrieveData)
          Retrieves a FormInstance object associated with a task.
 FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId)
          Retrieves a FormInstance object associated with a task.
 FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData)
          Retrieves a FormInstance object associated with a task.
 Document getImage(ImageTicket aImageId)
          Retrieves an image for an image ticket.
static TaskManager getInstance(ServiceClientFactory aServiceClientFactory)
           
 ServiceClientFactory getServiceClientFactory()
           
 TaskInfo getTaskInfo(long aTaskId)
          Retrieves all of the relevant information about a task.
 TaskInfo getTaskInfo(long aTaskId, boolean aReturnFormInstance)
          Retrieves all of the relevant information about a task.
 TaskUserInfo[] getUsersWithAccessToTask(long aTaskId)
          Retrieves a list of users who have access to the task.
 void lockTask(long aTaskId)
          Locks a task so that no one else may claim it.
 void modifyTaskPermissions(long aTaskId, TaskACL[] aPermissions)
          Modifies the permissions for a task.
 AttachmentInfo newAttachmentInfo()
          Creates a new AttachmentInfo object.
 byte[] readAttachmentBytes(long aTaskId, long aAttachmentId)
          Retrieves a byte array containing the specified attachment.
 Document readAttachmentDocument(long aTaskId, long aAttachmentId)
          Retrieves a Document containing the binary content of the specified attachment.
 java.io.InputStream readAttachmentStream(long aTaskId, long aAttachmentId)
          Retrieves an input stream containing the binary content of the specified attachment.
 java.lang.String readFullNoteContent(long taskId, long attachmentId)
          Retrieves the full note content.
 void reAssignTask(long aTaskId, java.lang.String aReassignToUser)
          Reassigns a task to another user queue.
 ImageTicket reconstructImageTicket(java.lang.String aSerializedValue)
          Reconstructs an image ticket object from a previously received ImageTicket object.
 void rejectTask(long aTaskId)
          Returns a task back to the queue from which the task was forwarded or claimed.
 void rejectTaskUnsecure(long aTaskId, java.lang.String principalOid)
          Returns a task back to the queue from which the task was forwarded or claimed.
 java.util.List removeTasks(java.lang.Long aActionId, java.util.List aTaskIds)
          Removes tasks from a multi-user service step that has not yet completed.
 TaskUIInfo retrieveTaskUI(long aTaskId, boolean approvalContainer)
          Retrieves a custom UI for the task, if one were specified.
 SaveTaskResult save(long aTaskId, FormInstance aFormData)
          Saves new form instance data for a task.
 SaveTaskResult save(long aTaskId, java.lang.String taskName, FormInstance aFormData)
          Saves new form instance data for a task with a user provided task name.
 void sendNotification(java.lang.String message, java.util.List userIds, java.util.List grpIds)
          used to send a notificatio message to specified users and groups
 void sendTaskReminder(long aTaskId, boolean aChangeInstructions, java.lang.String aReminderInstructions, long aNextReminder)
          Sends a reminder to the user to whom the identified task is currently assigned.
 void sendTaskReminder(long aTaskId, boolean aChangeInstructions, java.lang.String aReminderInstructions, long aNextReminder, boolean aUseBusinessDays)
          Sends a reminder to the user to whom the identified task is currently assigned.
 void setClientParameter(java.lang.String aKey, java.lang.String aValue)
           
 void setCompletionNote(long aTaskId, java.lang.String completionNote)
          sets a completion note for the task.
 void setContext(Context aUser)
          Sets the user for subsequent calls to a task manager instance.
 void setNoTX(boolean aNoTX)
           
 void setParticipantIPAddress(java.lang.String aUsersIPAddress)
          used to optionally store the User's IP Address with some TaskManager API calls
 void setServiceClientFactory(ServiceClientFactory aServiceClientFactory)
           
 java.lang.Long setupWorkflowUser()
          This method should be called when a user logs in.
 java.lang.Long setupWorkflowUserWithId(java.lang.String userOid)
          This method should be called when a user's default queue is shared before the user logs in.
 SetupWorkflowUserResult setupWorkflowUserWithInfo()
          This is an alternate to the setupWorkflowUser() method.
 void setVisibility(long aTaskId, boolean aVisible)
          Sets the visibility of a task.
 void shareTask(long aTaskId, java.lang.String userIdToShare)
          Shares a non-completed task with another user.
 CompleteTaskResult terminateTask(long aTaskId)
          Completes a task with a terminate event.
 CompleteTaskResult[] terminateTasksForJobId(java.lang.String aJobID)
          Completes all tasks associated with a JobId with a terminate event.
 void unLockTask(long aTaskId)
          Unlocks a locked task so that another user may claim it.
 void updateAttachment(long aTaskId, long aAttachmentId, byte[] aAttachmentBytes)
          Updates an existing attachment.
 void updateAttachment(long aTaskId, long aAttachmentId, Document aAttachmentDocument)
          Updates an existing attachment.
 void updateAttachment(long aTaskId, long aAttachmentId, java.io.InputStream aAttachmentStream)
          Updates an existing attachment.
 AttachmentInfo updateAttachmentInfo(long aTaskId, AttachmentInfo aAttachmentInfo)
          Updates the specified attachment information.
 AttachmentInfo updateAttachmentInfo(long aTaskId, AttachmentInfo aAttachmentInfo, byte[] aAttachmentBytes)
          Updates the specified attachment information.
 AttachmentInfo updateAttachmentInfo(long aTaskId, AttachmentInfo aAttachmentInfo, Document aAttachmentDocument)
          Updates the specified attachment information.
 void updateHardenedPath(long aTaskId, java.lang.String aHardenedPath)
          Allows the hardened path to be updated by a user in the workflow system role.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final java.util.logging.Logger logger

MAX_PERF

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

setNoTX

public void setNoTX(boolean aNoTX)

setClientParameter

public void setClientParameter(java.lang.String aKey,
                               java.lang.String aValue)

getInstance

public static TaskManager getInstance(ServiceClientFactory aServiceClientFactory)

setContext

public void setContext(Context aUser)
Description copied from interface: TaskManager
Sets the user for subsequent calls to a task manager instance.

Specified by:
setContext in interface TaskManager
Parameters:
aUser - The Context to be used.

setParticipantIPAddress

public void setParticipantIPAddress(java.lang.String aUsersIPAddress)
Description copied from interface: TaskManager
used to optionally store the User's IP Address with some TaskManager API calls

Specified by:
setParticipantIPAddress in interface TaskManager
Parameters:
aUsersIPAddress - end user's IP Address

setServiceClientFactory

public void setServiceClientFactory(ServiceClientFactory aServiceClientFactory)

getServiceClientFactory

public ServiceClientFactory getServiceClientFactory()

getEmptyForm

public FormInstance getEmptyForm()
Description copied from interface: TaskManager
Retrieves a FormInstance object for this object.

This method can be useful if you need to associate a form with a new task.

Specified by:
getEmptyForm in interface TaskManager
Returns:
A new FormInstance object.
See Also:
createTask()

getEmptyACL

public TaskACL getEmptyACL()
Description copied from interface: TaskManager
Retrieves a TaskACL object for this object.

This method can be useful if you need to associate an ACL with a new task.

Specified by:
getEmptyACL in interface TaskManager
Returns:
A new TaskACL object.
See Also:
createTask()

getEmptyCreateTaskInfo

public CreateTaskInfo getEmptyCreateTaskInfo()
Description copied from interface: TaskManager
Retrieves a CreateTaskInfo object for this object.

The CreateTaskInfo object is needed in order to call createTask().

Specified by:
getEmptyCreateTaskInfo in interface TaskManager
Returns:
A new CreateTaskInfo object.
See Also:
createTask()

setupWorkflowUser

public java.lang.Long setupWorkflowUser()
                                 throws TaskManagerException
Description copied from interface: TaskManager
This method should be called when a user logs in. It sets up user information in the workflow for that user if he has not yet logged in. It ensures that the user (defined by the Context object) has a default queue, has access to that queue, and has the default email settings.

It is safe to call this method for users who have already been set up, but you should call it only once per web session. Calling it repeatedly will degrade performance.

Specified by:
setupWorkflowUser in interface TaskManager
Returns:
The default Queue ID for the user.
Throws:
TaskManagerException - if the Context does not contain an authenticated user.

setupWorkflowUserWithId

public java.lang.Long setupWorkflowUserWithId(java.lang.String userOid)
                                       throws TaskManagerException
Description copied from interface: TaskManager
This method should be called when a user's default queue is shared before the user logs in. It sets up user information in the workflow for that user if he has not yet logged in. It ensures that the user (defined by the Context object) has a default queue, has access to that queue, and has the default email settings.

It is safe to call this method for users who have already been set up, but you should call it only once per web session. Calling it repeatedly will degrade performance.

Specified by:
setupWorkflowUserWithId in interface TaskManager
Returns:
The default Queue ID for the user.
Throws:
TaskManagerException - if the Context does not contain an authenticated user.

setupWorkflowUserWithInfo

public SetupWorkflowUserResult setupWorkflowUserWithInfo()
                                                  throws TaskManagerException
Description copied from interface: TaskManager
This is an alternate to the setupWorkflowUser() method. It performs the same action, but provides more details in it's return type.

It is safe to call this method for users who have already been set up, but you should call it only once per web session. Calling it repeatedly will degrade performance.

Specified by:
setupWorkflowUserWithInfo in interface TaskManager
Returns:
The SetupWorkflowResult
Throws:
TaskManagerException - if the Context does not contain an authenticated user.

createTask

public CreateTaskResult createTask(long actionId,
                                   FormInstance aFormData,
                                   java.lang.String instructions,
                                   long queueId,
                                   boolean aCopyAttachments,
                                   boolean aShowAttachments)
                            throws TaskManagerException
Description copied from interface: TaskManager
Creates a task associated with the given action instance and assigns the task to a queue.

This method is typically called by components.

Specified by:
createTask in interface TaskManager
Parameters:
actionId - The action instance identifier.
aFormData - The FormInstance object to use to create this task.
instructions - Text metadata associated with the task. The metadata usually contains instructions for the user to whom this task is assigned. The instructions appear in the user interface or in email notifications.
queueId - The queue to which the task will be assigned.
aCopyAttachments - If true, attachments are copied from the previous task.
aShowAttachments - Flag to be used by user interface components so that they know whether the process designer intends to support attachments for this process.
Returns:
The task result.
Throws:
TaskManagerException

createTask

public CreateTaskResult createTask(long actionId,
                                   FormInstance aFormData,
                                   java.lang.String instructions,
                                   long queueId,
                                   java.util.List aAttachmentsToCopy,
                                   boolean aShowAttachments)
                            throws TaskManagerException
Description copied from interface: TaskManager
Creates a task associated with the given action instance and assigns the task to a queue.

This method is typically called by components.

Specified by:
createTask in interface TaskManager
Parameters:
actionId - The action instance identifier.
aFormData - The FormInstance object to use to create this task.
instructions - Text metadata associated with the task. The metadata usually contains instructions for the user to whom this task is assigned. The instructions appear in the user interface or in email notifications.
queueId - The queue to which the task will be assigned.
aAttachmentsToCopy - A java.util.List of Document objects to be used to populate the task attachments. Properties of the Document are used to populate attachment properties such as file name and permissions.
aShowAttachments - A flag to be used by user interface components so that they can determine whether the process designer intends to support attachments for this process.
Returns:
The task result.
Throws:
TaskManagerException

createTask

public CreateTaskResult createTask(FormInstance newFormData,
                                   java.lang.String instructions,
                                   boolean showAttachments)
                            throws TaskManagerException
Description copied from interface: TaskManager
Creates new tasks not yet associated with a process.

The default queue for the user for whom setContext() was called is added to the task.

TaskManager will use this method to initiate a workflow or to create a task not associated with a workflow.

The user interface may have tasks that are not associated with a process. These go to the archived state once they have been submitted.

The template path set in the form URL will be used to determine if a workflow is started when completeTask() is called.

Specified by:
createTask in interface TaskManager
Parameters:
newFormData - The FormInstance object to use to create this task. The template URL must be defined. If no data is passed in, empty data will be created.
instructions - Text metadata associated with the task. The metadata usually contains instructions for the user to whom this task is assigned. The instructions appear in the user interface or in email notifications.
showAttachments - A flag to be used by user interface components so that they can determine whether the process designer intends to support attachments for this process.
Returns:
The task result.
Throws:
TaskManagerException

reAssignTask

public void reAssignTask(long aTaskId,
                         java.lang.String aReassignToUser)
                  throws TaskManagerException
Description copied from interface: TaskManager
Reassigns a task to another user queue.

Only an administrator can reassign a task.

Specified by:
reAssignTask in interface TaskManager
Parameters:
aTaskId - The task to be reassigned.
aReassignToUser - The user identifier of the user being assigned the task.
Throws:
TaskManagerException

batchReassignTasks

public BatchResult batchReassignTasks(java.lang.Long[] aTaskIds,
                                      java.lang.String aReassignToUser,
                                      boolean ignoreErrors)
                               throws TaskManagerException
Description copied from interface: TaskManager
Reassigns a number of tasks to another user queue.

Only an administrator can reassign a task.

Specified by:
batchReassignTasks in interface TaskManager
Parameters:
aTaskIds - A list of task ids to be reassigned.
aReassignToUser - The user identifier of the user being assigned the task.
ignoreErrors - A flag to determine whether or not errors should be ignored and returned with the result, or thrown in order to force the transaction to handle any clean up.
Throws:
TaskManagerException

escalateTask

public void escalateTask(long aTaskId,
                         long aQueueId)
                  throws TaskManagerException
Description copied from interface: TaskManager
Escalates a task to another queue.

Escalating a task does not alter its deadline date.

Specified by:
escalateTask in interface TaskManager
Parameters:
aTaskId - The task to be reassigned.
aQueueId - The identifier of the queue to which the task is escalated.
Throws:
TaskManagerException

escalateTask

public void escalateTask(long aTaskId,
                         long aQueueId,
                         boolean aAllowOOODesignations)
                  throws TaskManagerException
Description copied from interface: TaskManager
Escalates a task to another queue, optionally indicating that the escalations can be OOO designated

Escalating a task does not alter its deadline date.

Specified by:
escalateTask in interface TaskManager
Parameters:
aTaskId - The task to be reassigned.
aQueueId - The identifier of the queue to which the task is escalated.
aAllowOOODesignations - Set to true if you would like OOO designations to occur on this escalation
Throws:
TaskManagerException

consultTask

public void consultTask(long aTaskId,
                        java.lang.String userIdToConsult)
                 throws TaskManagerException
Description copied from interface: TaskManager
Consults with another user on a task, in order to retrieve input from that other user.

When a user is consulted about a task, the only operation that user can make on that task is to return the item to the user who requested the consultation, by calling rejectTask().

The requesting user can save the task date.

Specified by:
consultTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task.
userIdToConsult - The identifier of the user to be consulted.
Throws:
TaskManagerException

forwardTask

public void forwardTask(long aTaskId,
                        java.lang.String userIdToForward)
                 throws TaskManagerException
Description copied from interface: TaskManager
Forwards a non-completed task from a user queue to the default queue indicated in the userIdToForward parameter.

To call this method, the user must be the owner of the queue for which the task is currently assigned (tasks can only be forwarded by their owner).

This method adds a new row to the assignment table. Previous assignments can be tracked by querying all the assignments for the task. Tasks that have been forwarded can be rejected using the rejectTask() method.

In order for a user to have access to forward a task, he must have the corresponding ACL set (see TaskACL.setCanForward()).

Specified by:
forwardTask in interface TaskManager
Parameters:
aTaskId - The task to forward.
userIdToForward - The identifier of the user to whom to forward the task.
Throws:
TaskManagerException - if an invalid task identifier or user identifiers are provided, if userIdForwarding is not the owner of the queue for the current assignment, if the task has already been completed, if the task is currently assigned to a skill or organization queue, or if the default queue for userIdToForward is not active.
See Also:
TaskACL

forwardTaskUnsecure

public void forwardTaskUnsecure(long aTaskId,
                                java.lang.String userIdToForward,
                                java.lang.String principalOid)
                         throws TaskManagerException
Description copied from interface: TaskManager
Forwards a non-completed task from a user queue to the default queue indicated in the userIdToForward parameter. The caller of this API can forward task of any other user. This will only honour an in-VM call.

This method adds a new row to the assignment table. Previous assignments can be tracked by querying all the assignments for the task. Tasks that have been forwarded can be rejected using the rejectTask() method.

In order for a user to have access to forward a task, he must have the corresponding ACL set (see TaskACL.setCanForward()).

Specified by:
forwardTaskUnsecure in interface TaskManager
Parameters:
aTaskId - The task to forward.
userIdToForward - The identifier of the user to whom to forward the task.
principalOid - The current owner of task.
Throws:
TaskManagerException - if an invalid task identifier or user identifiers are provided, if userIdForwarding is not the owner of the queue for the current assignment, if the task has already been completed, if the task is currently assigned to a skill or organization queue, or if the default queue for userIdToForward is not active.
See Also:
TaskACL

shareTask

public void shareTask(long aTaskId,
                      java.lang.String userIdToShare)
               throws TaskManagerException
Description copied from interface: TaskManager
Shares a non-completed task with another user.

To call this method, the user must be the owner of the queue for which the task is currently assigned (tasks can only be shared by their owner).

Once a task is shared with a user, he may claim the task.

A user may only share a task if he has the corresponding ACL set (see TaskACL.setCanShare()).

Specified by:
shareTask in interface TaskManager
Parameters:
aTaskId - The task to forward.
userIdToShare - The identifier of the user with whom to share the task.
Throws:
TaskManagerException - if an invalid task identifier or user identifiers are provided, if userIdSharing is not the owner of the queue for the current assignment, if the task has already been completed, if the task is currently assigned to a skill or organization queue, if the user does not have the appropriate ACL set, or if the default queue for userIdToForward is not active.
See Also:
TaskACL

claimTask

public void claimTask(long aTaskId)
               throws TaskManagerException
Description copied from interface: TaskManager
Claims a task from a user queue in which the user calling this method is permitted to claim the task (see TaskACL.isCanClaim() and TaskACL.setCanClaim()), or from a group queue of which the user is a member.

Claimed tasks are put in the user's default queue. Completed tasks cannot be claimed. Tasks for which the user already has an assignment cannot be claimed. The user claiming the task must be active in User Manager. Claimed tasks can be returned to the original queue from which they were claimed by calling rejectTask().

Specified by:
claimTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task being claimed.
Throws:
TaskManagerException - if
  • An invalid task identifier or user identifier is provided.
  • The user does not have access to the queue for the current assignment, does not have the skill matching a skill queue, or is not a member of the organization if the queue is an organization queue.
  • The task has already been completed.
  • The default queue for the claiming user is not active.

rejectTask

public void rejectTask(long aTaskId)
                throws TaskManagerException
Description copied from interface: TaskManager
Returns a task back to the queue from which the task was forwarded or claimed.

To call this method, the user must be the owner of the queue for which the task is currently assigned (tasks can only be rejected by their owner).

This method adds a new row to the assignment table. Previous assignments can be tracked by querying all the assignments for the task.

The user performing this action must be the owner of the queue the current assignment is in.

Specified by:
rejectTask in interface TaskManager
Parameters:
aTaskId - The task to be rejected.
Throws:
TaskManagerException - if
  • An invalid task identifier or invalid user identifier is provided.
  • The user is not the owner of the queue for the current assignment.
  • The task has already been completed.
  • The default queue for the user is not active.
  • The user whose task is being rejected is not active.
  • There is no previous assignment.
  • The type of assignment was not forwarded or claimed.

rejectTaskUnsecure

public void rejectTaskUnsecure(long aTaskId,
                               java.lang.String principalOid)
                        throws TaskManagerException
Description copied from interface: TaskManager
Returns a task back to the queue from which the task was forwarded or claimed. The caller of this API can reject task of any other user. This will only honour an in-VM call.

This method adds a new row to the assignment table. Previous assignments can be tracked by querying all the assignments for the task.

Specified by:
rejectTaskUnsecure in interface TaskManager
Parameters:
aTaskId - The task to be rejected.
Throws:
TaskManagerException - if
  • An invalid task identifier or invalid user identifier is provided.
  • The user is not the owner of the queue for the current assignment.
  • The task has already been completed.
  • The default queue for the user is not active.
  • The user whose task is being rejected is not active.
  • There is no previous assignment.
  • The type of assignment was not forwarded or claimed.

changeQueueForTask

public void changeQueueForTask(long aTaskId,
                               long aTargetQueueId)
                        throws TaskManagerException
Description copied from interface: TaskManager
Moves the specified task to another queue also owned by the user who owns the task's current queue.

Only the user owning the queue for the task's current assignment is allowed to move the task to another queue. The target queue must also be owned by the same user who owns the current queue.

The user must own both the source and target queue.

Specified by:
changeQueueForTask in interface TaskManager
Parameters:
aTaskId - The task which to be moved.
aTargetQueueId - The queue to which this task is being moved.
Throws:
TaskManagerException - if the task is not found, the task is complete, the specified user does not own the current queue, or the specified user does not own the target queue.

cancelTask

public void cancelTask(long aTaskId)
                throws TaskManagerException
Description copied from interface: TaskManager
Removes all persisted data for an active non-workflow task.

The user must own the assignment for this task.

Specified by:
cancelTask in interface TaskManager
Parameters:
aTaskId - The task identifier identifying the task to be cancelled.
Throws:
TaskManagerException - If no task matches the task identifier or if the task is already completed or is part of a workflow.

cancelTaskUnsecure

public void cancelTaskUnsecure(long aTaskId,
                               java.lang.String principalOid)
                        throws TaskManagerException
Description copied from interface: TaskManager
Removes all persisted data for an active non-workflow task without checking the user ACL. This will only honour an in-VM call.

Specified by:
cancelTaskUnsecure in interface TaskManager
Parameters:
aTaskId - The task identifier identifying the task to be cancelled.
principalOid - The UM principal Oid of the user who owns this task.
Throws:
TaskManagerException - If no task matches the task identifier or if the task is already completed or is part of a workflow.

completeTask

public CompleteTaskResult completeTask(long aTaskId)
                                throws TaskManagerException
Description copied from interface: TaskManager
Completes the specified task.

The selected action may have already been provided in the form data.

Specified by:
completeTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task to be completed.
Throws:
TaskNotFoundException - if the task is not found.
TaskNotRunningException - if the specified task has already been completed.
TaskManagerException - otherwise.

completeTask

public CompleteTaskResult completeTask(long aTaskId,
                                       java.lang.String selectedAction)
                                throws TaskManagerException
Description copied from interface: TaskManager
Completes the specified task with the specified action.

Specified by:
completeTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task to be completed.
selectedAction - The action the user selected.
Throws:
TaskManagerException

completeTask

public CompleteTaskResult completeTask(long aTaskId,
                                       FormInstance formData)
                                throws TaskManagerException
Description copied from interface: TaskManager
Completes the specified task with the specified data.

This method allows the data to be committed to the database as part of the same transaction during which the task is completed. It is safe to pass null for the selected action if the action is to be submitted as part of the data.

Specified by:
completeTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task to be completed.
formData - Form data to commit as part of the transaction.
Throws:
TaskManagerException

getFormInstanceForTask

public FormInstance getFormInstanceForTask(long aTaskId)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a FormInstance object associated with a task.

The user requests the FormInstance data and must be the owner of the current assignment for this task.

Specified by:
getFormInstanceForTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task data being retrieved.
Returns:
The FormInstance object populated with the template path and XML data.
Throws:
TaskManagerException - if the user does not have access to this task.

getFormInstanceForTask

public FormInstance getFormInstanceForTask(long aTaskId,
                                           boolean aRetrieveData)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a FormInstance object associated with a task.

The user requests the FormInstance data and must be the owner of the current assignment for this task.

This method provides specific instructions on whether to retrieve the actual data along with the other form instance information. To ensure the best performance, if the data is not needed, do not retrieve it.

Specified by:
getFormInstanceForTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task data being retrieved.
aRetrieveData - Specify true to populate the data in the resulting object.
Returns:
The FormInstance object populated with the template path and XML data.
Throws:
TaskManagerException - if the user does not have access to this task.

getFormInstanceForTask

public FormInstance getFormInstanceForTask(long aTaskId,
                                           long aFormInstanceId)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a FormInstance object associated with a task.

The user requests the FormInstance data and must be the owner of the current assignment for this task.

Specified by:
getFormInstanceForTask in interface TaskManager
Parameters:
aTaskId - The identifier for the task data being retrieved.
aFormInstanceId - The FormInstance identifier.
Returns:
The FormInstance object populated with the template path and XML data.
Throws:
TaskManagerException - if the user does not have access to this task.

getFormInstanceForTask

public FormInstance getFormInstanceForTask(long aTaskId,
                                           long aFormInstanceId,
                                           boolean aRetrieveData)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a FormInstance object associated with a task.

The user requests the FormInstance data and must be the owner of the current assignment for this task.

This method provides specific instructions on whether to retrieve the actual data along with the other form instance information. To ensure the best performance, if the data is not needed, do not retrieve it.

Specified by:
getFormInstanceForTask in interface TaskManager
Parameters:
aTaskId - The identifier for the task data being retrieved.

aRetrieveData - true to populate the data in the resulting object, false otherwise.
Returns:
A FormInstance object populated with the template path and XML data.
Throws:
TaskManagerException - if the user does not have access to this task.

deadlineTask

public CompleteTaskResult deadlineTask(long aTaskId,
                                       java.lang.String aDeadlineAction,
                                       boolean aChangeInstructions,
                                       java.lang.String aDeadlineInstructions)
                                throws TaskManagerException,
                                       NoActionSelectedException
Description copied from interface: TaskManager
Completes a task with a deadline event.

If the deadline action was provided, it is used as the selected action.

This method can only be called by an administrative user, and is usually called by the User Service.

Specified by:
deadlineTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task.
aDeadlineAction - null or a valid action name as specified by the task's form data.
aChangeInstructions - Specify true to change the instructions of the current task to aDeadlineInstructions.
aDeadlineInstructions - The new task instructions for deadline. This is only used if aChangeInstructions is true. The instructions appear in the user interface or in email notifications.
Returns:
A CompleteTaskResult containing the status of the task completion.
Throws:
TaskManagerException
NoActionSelectedException

terminateTask

public CompleteTaskResult terminateTask(long aTaskId)
                                 throws TaskManagerException
Description copied from interface: TaskManager
Completes a task with a terminate event.

The user must be in the process administrator role (and will usually be the system user).

Specified by:
terminateTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task to terminate.
Returns:
A CompleteTaskResult containing the status of the task termination.
Throws:
TaskManagerException

terminateTasksForJobId

public CompleteTaskResult[] terminateTasksForJobId(java.lang.String aJobID)
                                            throws TaskManagerException
Description copied from interface: TaskManager
Completes all tasks associated with a JobId with a terminate event.

The user must be in the process administrator role (and will usually be the system user).

Specified by:
terminateTasksForJobId in interface TaskManager
Parameters:
aJobID - The long lived job id which you wish to have tasks terminated for.
Returns:
A CompleteTaskResult array containing the status of task terminations.
Throws:
TaskManagerException

sendTaskReminder

public void sendTaskReminder(long aTaskId,
                             boolean aChangeInstructions,
                             java.lang.String aReminderInstructions,
                             long aNextReminder)
                      throws TaskManagerException
Description copied from interface: TaskManager
Sends a reminder to the user to whom the identified task is currently assigned.

The user sends the reminder (and is probably a system user).

Specified by:
sendTaskReminder in interface TaskManager
Parameters:
aTaskId - The identifier of the task.
aChangeInstructions - true to change the task instructions to aReminderInstructions, false otherwise.
aReminderInstructions - The new instructions (only used if aChangeInstructions is true).
aNextReminder - If this is greater than 0, a new reminder will be scheduled for this number of minutes. Assign 0 to this parameter if no subsequent reminder is needed. The instructions appear in the user interface or in email notifications.
Throws:
TaskManagerException

sendTaskReminder

public void sendTaskReminder(long aTaskId,
                             boolean aChangeInstructions,
                             java.lang.String aReminderInstructions,
                             long aNextReminder,
                             boolean aUseBusinessDays)
                      throws TaskManagerException
Description copied from interface: TaskManager
Sends a reminder to the user to whom the identified task is currently assigned.

The user sends the reminder (and is probably a system user).

Specified by:
sendTaskReminder in interface TaskManager
Parameters:
aTaskId - The identifier of the task.
aChangeInstructions - true to change the task instructions to aReminderInstructions, false otherwise.
aReminderInstructions - The new instructions (only used if aChangeInstructions is true).
aNextReminder - If this is greater than 0, a new reminder will be scheduled for this number of minutes if not business days, otherwise number of business days. Assign 0 to this parameter if no subsequent reminder is needed. The instructions appear in the user interface or in email notifications.
aUseBusinessDays - Indicates if the next reminder value is in business days or in total minutes. Pass true for number of business days, false for total minutes
Throws:
TaskManagerException

updateHardenedPath

public void updateHardenedPath(long aTaskId,
                               java.lang.String aHardenedPath)
                        throws TaskManagerException
Description copied from interface: TaskManager
Allows the hardened path to be updated by a user in the workflow system role.

This is useful in the case where a hardened path is not set by Adobe Experience Manager forms workflow. Only active tasks can have their hardened path updated.

A hardened path contains specific version information.

Specified by:
updateHardenedPath in interface TaskManager
Parameters:
aTaskId - The task for which to update the hardened path.
aHardenedPath - The hardened path to update.
Throws:
TaskManagerException

save

public SaveTaskResult save(long aTaskId,
                           java.lang.String taskName,
                           FormInstance aFormData)
                    throws TaskManagerException
Description copied from interface: TaskManager
Saves new form instance data for a task with a user provided task name.

The form URL and data will overwrite what currently is associated with the task.

The user performing this action must be the user who is assigned the task, otherwise a TaskPermissionException is thrown.

Specified by:
save in interface TaskManager
Parameters:
aTaskId - The identifier of the task being saved.
taskName - The name of the task being saved.
aFormData - The FormInstance object that contains the data, URL, and other data to save for this task. The form instance identifier must be set if there is more than one form allocated for this task.
Returns:
A SaveTaskResult object containing the name of the action that was selected.
Throws:
TaskManagerException - if the user identified by the Context object is not assigned this task.
TaskNotRunningException - if the task is not in a running state (it has already completed).
TaskNotFoundException - if the task is not found.

save

public SaveTaskResult save(long aTaskId,
                           FormInstance aFormData)
                    throws TaskManagerException
Description copied from interface: TaskManager
Saves new form instance data for a task.

The form URL and data will overwrite what currently is associated with the task.

The user performing this action must be the user who is assigned the task, otherwise a TaskPermissionException is thrown.

Specified by:
save in interface TaskManager
Parameters:
aTaskId - The identifier of the task being saved.
aFormData - The FormInstance object that contains the data, URL, and other data to save for this task. The form instance identifier must be set if there is more than one form allocated for this task.
Returns:
A SaveTaskResult object containing the name of the action that was selected.
Throws:
TaskManagerException - if the user identified by the Context object is not assigned this task.
TaskNotRunningException - if the task is not in a running state (it has already completed).
TaskNotFoundException - if the task is not found.

newAttachmentInfo

public AttachmentInfo newAttachmentInfo()
Description copied from interface: TaskManager
Creates a new AttachmentInfo object.

Specified by:
newAttachmentInfo in interface TaskManager
Returns:
The newly created AttachmentInfo object.

getAllAttachments

public AttachmentInfo[] getAllAttachments(long aTaskId)
                                   throws TaskManagerException
Description copied from interface: TaskManager
Retrieves all currently readable (visible) attachments for this task.

The task must be assigned to the user.

Specified by:
getAllAttachments in interface TaskManager
Parameters:
aTaskId - The task identifier.
Returns:
An array of AttachmentInfo objects representing all currently readable (visible) attachments for this task.
Throws:
TaskManagerException - if the user does not have access to this task.

getAttachmentInfo

public AttachmentInfo getAttachmentInfo(long aTaskId,
                                        long aAttachmentId)
                                 throws TaskManagerException
Description copied from interface: TaskManager
Retrieves attachment information for the attachment.

The task must be assigned to the user.

Specified by:
getAttachmentInfo in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentId - The attachment identifier.
Returns:
The attachment information for this attachment.
Throws:
TaskManagerException - if the user does not have access to this task.

updateAttachmentInfo

public AttachmentInfo updateAttachmentInfo(long aTaskId,
                                           AttachmentInfo aAttachmentInfo)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Updates the specified attachment information.

The task must be assigned to the user.

For attachments of type AttachmentInfo.TYPE_NOTE, you can update the note contents by providing a new description.

Specified by:
updateAttachmentInfo in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - Specifies the attachment information to modify.
Throws:
TaskManagerException

updateAttachmentInfo

public AttachmentInfo updateAttachmentInfo(long aTaskId,
                                           AttachmentInfo aAttachmentInfo,
                                           Document aAttachmentDocument)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Updates the specified attachment information.

The task must be assigned to the user.

Specified by:
updateAttachmentInfo in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - Specifies the attachment information to modify.
aAttachmentDocument - A com.adobe.idp.Document object containing the attachment content.
Throws:
TaskManagerException

updateAttachmentInfo

public AttachmentInfo updateAttachmentInfo(long aTaskId,
                                           AttachmentInfo aAttachmentInfo,
                                           byte[] aAttachmentBytes)
                                    throws TaskManagerException
Description copied from interface: TaskManager
Updates the specified attachment information.

The task must be assigned to the user.

Specified by:
updateAttachmentInfo in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - Specifies the attachment information to modify.
aAttachmentBytes - A byte array object containing the attachment content.
Throws:
TaskManagerException

addAttachment

public AttachmentInfo addAttachment(long aTaskId,
                                    AttachmentInfo aAttachmentInfo,
                                    java.io.InputStream attachmentStream)
                             throws TaskManagerException
Description copied from interface: TaskManager
Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.

The task must be assigned to the user.

Specified by:
addAttachment in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - The AttachmentInfo object populated with the relevant information.
attachmentStream - The new attachment content, represented as a stream.
Returns:
The AttachmentInfo object for this attachment, with the newly created attachment identifier set.
Throws:
TaskManagerException

addNote

public AttachmentInfo addNote(long aTaskId,
                              AttachmentInfo aAttachmentInfo)
                       throws TaskManagerException
Description copied from interface: TaskManager
Appends a new attachment of type AttachmentInfo.TYPE_NOTE to the specified task.

You can use the updateAttachmentInfo() method to update the note content. In this case you would place the new note content in the description field.

The task must be assigned to the user.

Specified by:
addNote in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - The AttachmentInfo object populated with the relevant information.
Returns:
The AttachmentInfo object for this note with the newly created attachment identifier set.
Throws:
TaskManagerException

addAttachment

public AttachmentInfo addAttachment(long aTaskId,
                                    AttachmentInfo aAttachmentInfo,
                                    Document aAttachmentDocument)
                             throws TaskManagerException
Description copied from interface: TaskManager
Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.

The task must be assigned to the user.

Specified by:
addAttachment in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - The AttachmentInfo object populated with the relevant information.
aAttachmentDocument - The new attachment content as a Document.
Returns:
The AttachmentInfo for this attachment with the newly created attachment identifier set.
Throws:
TaskManagerException

addAttachment

public AttachmentInfo addAttachment(long aTaskId,
                                    AttachmentInfo aAttachmentInfo,
                                    byte[] aAttachmentBytes)
                             throws TaskManagerException
Description copied from interface: TaskManager
Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.

The task must be assigned to the user.

Specified by:
addAttachment in interface TaskManager
Parameters:
aTaskId - The task identifier.
aAttachmentInfo - An AttachmentInfo object populated with the relevant information.
aAttachmentBytes - The new attachment's content in bytes.
Returns:
The AttachmentInfo for this attachment with the newly created attachment identifier set.
Throws:
TaskManagerException

deleteAttachment

public void deleteAttachment(long aTaskId,
                             long aAttachmentId)
                      throws TaskManagerException
Description copied from interface: TaskManager
Removes an attachment from the specfied task.

The task must be assigned to the user.

Specified by:
deleteAttachment in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The attachment to be removed.
Throws:
TaskManagerException

updateAttachment

public void updateAttachment(long aTaskId,
                             long aAttachmentId,
                             java.io.InputStream aAttachmentStream)
                      throws TaskManagerException
Description copied from interface: TaskManager
Updates an existing attachment.

The task must be assigned to the user.

Specified by:
updateAttachment in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The identifier for the attachment to be updated.
aAttachmentStream - A stream representing the attachment content.
Throws:
TaskManagerException - if the user does not have access to this task.

updateAttachment

public void updateAttachment(long aTaskId,
                             long aAttachmentId,
                             Document aAttachmentDocument)
                      throws TaskManagerException
Description copied from interface: TaskManager
Updates an existing attachment.

The task must be assigned to the user.

Specified by:
updateAttachment in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The identifier for the attachment to be updated.
aAttachmentDocument - A com.adobe.idp.Document object containing the attachment content.
Throws:
TaskManagerException - if the user does not have access to this task.

updateAttachment

public void updateAttachment(long aTaskId,
                             long aAttachmentId,
                             byte[] aAttachmentBytes)
                      throws TaskManagerException
Description copied from interface: TaskManager
Updates an existing attachment.

The task must be assigned to the user.

Specified by:
updateAttachment in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The identifier for the attachment to be updated.
aAttachmentBytes - A byte array containing the attachment content.
Throws:
TaskManagerException - if the user does not have access to this task.

readAttachmentDocument

public Document readAttachmentDocument(long aTaskId,
                                       long aAttachmentId)
                                throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a Document containing the binary content of the specified attachment.

The task must be assigned to the user.

Specified by:
readAttachmentDocument in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The identifier of the requested attachment.
Returns:
A Document containing the requested attachment.
Throws:
TaskManagerException - if the user does not have access to this task.

readAttachmentStream

public java.io.InputStream readAttachmentStream(long aTaskId,
                                                long aAttachmentId)
                                         throws TaskManagerException
Description copied from interface: TaskManager
Retrieves an input stream containing the binary content of the specified attachment.

The task must be assigned to the user.

Specified by:
readAttachmentStream in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The identifier of the requested attachment.
Returns:
A stream containing the requested attachment.
Throws:
TaskManagerException - if the user does not have access to this task.

readAttachmentBytes

public byte[] readAttachmentBytes(long aTaskId,
                                  long aAttachmentId)
                           throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a byte array containing the specified attachment.

The task must be assigned to the user.

Specified by:
readAttachmentBytes in interface TaskManager
Parameters:
aTaskId - The task containing the attachment.
aAttachmentId - The identifier of the requested attachment.
Returns:
A byte array containing the requested attachment.
Throws:
TaskManagerException - if the user does not have access to this task.

readFullNoteContent

public java.lang.String readFullNoteContent(long taskId,
                                            long attachmentId)
                                     throws TaskManagerException
Description copied from interface: TaskManager
Retrieves the full note content.

The task must be assigned to the user.

Specified by:
readFullNoteContent in interface TaskManager
Parameters:
taskId - The task with which the note is associated.
attachmentId - The identifier of the requested note.
Returns:
A String containing the requested note content.
Throws:
TaskManagerException - if the user does not have access to this task.

copyAttachmentsToTask

public void copyAttachmentsToTask(long aTaskId,
                                  java.util.List aAttachmentList)
                           throws TaskManagerException
Description copied from interface: TaskManager
Copies attachments from a java.util.List of Document objects to the task.

Either the task must be assigned to the user, or the user must be an administrator.

Specified by:
copyAttachmentsToTask in interface TaskManager
Parameters:
aTaskId - The task with which the attachment is associated.
aAttachmentList - The List of attachments to be added.
Throws:
TaskManagerException - if the user does not have access to this task or if the objects contained in the list are not Document objects.

getAttachmentListForTask

public java.util.List getAttachmentListForTask(long aTaskId)
                                        throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a java.util.List of Document objects representing the attachments for a task.

Either the task must be assigned to the user, or the user must be an administrator.

Specified by:
getAttachmentListForTask in interface TaskManager
Parameters:
aTaskId - The task with which the attachment is associated.
Returns:
A java.util.List of Document objects, each of which is an attachment.
Throws:
TaskManagerException - if the user does not have access to this task or if the objects contained in the list are not Document objects.

getCompletionNote

public java.lang.String getCompletionNote(long aTaskId)
                                   throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a completion note for the task, if there is one

Specified by:
getCompletionNote in interface TaskManager
Parameters:
aTaskId - The task to retrieve the completion note for
Returns:
the completion note if one is set, or "" if none is set
Throws:
TaskManagerException - if the user calling is not assigned the task.

setCompletionNote

public void setCompletionNote(long aTaskId,
                              java.lang.String completionNote)
                       throws TaskManagerException
Description copied from interface: TaskManager
sets a completion note for the task.

Specified by:
setCompletionNote in interface TaskManager
Parameters:
aTaskId - task id to set the completion note
completionNote - String representing the note
Throws:
TaskManagerException - if the user does not have the task assigned to them, or the task is completed.

createTask

public CreateTaskResult createTask(CreateTaskInfo createTaskInfo)
                            throws TaskManagerException
Description copied from interface: TaskManager
Creates a new task.

If no queue identifier is specified, the default queue for the user for the calling context will be assigned the task.

Specified by:
createTask in interface TaskManager
Parameters:
createTaskInfo - A value object containing all of the relevant information required to create a task.
Returns:
A task result.
Throws:
TaskManagerException

getTaskInfo

public TaskInfo getTaskInfo(long aTaskId)
                     throws TaskManagerException
Description copied from interface: TaskManager
Retrieves all of the relevant information about a task.

Specified by:
getTaskInfo in interface TaskManager
Parameters:
aTaskId - The identifier of the task being returned.
Returns:
A TaskInfo object populated with all of the information about the task.
Throws:
TaskManagerException

getTaskInfo

public TaskInfo getTaskInfo(long aTaskId,
                            boolean aReturnFormInstance)
                     throws TaskManagerException
Description copied from interface: TaskManager
Retrieves all of the relevant information about a task.

Specified by:
getTaskInfo in interface TaskManager
Parameters:
aTaskId - The identifier of the task being returned.
aReturnFormInstance - Indicates whether the data for any forms associated with the task should be returned.
Returns:
A TaskInfo object populated with all of the information about the task.
Throws:
TaskManagerException

getUsersWithAccessToTask

public TaskUserInfo[] getUsersWithAccessToTask(long aTaskId)
                                        throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a list of users who have access to the task. This list will include the task owner.

You can determine if a particular user is the task owner by calling the TaskUserInfo.isTaskOwner() method of the returned object.

Specified by:
getUsersWithAccessToTask in interface TaskManager
Parameters:
aTaskId - The task identifier.
Returns:
A list of users, including the task owner, who have access to the task.
Throws:
TaskManagerException

addTasks

public java.util.List addTasks(java.lang.Long aActionId,
                               java.util.List aPrincipalOids)
                        throws TaskManagerException
Description copied from interface: TaskManager
Adds Tasks to an Action Instance associated with the multi-user service. Only active action instances may have tasks added to them. This API may only be called by a user who satisifes one of two conditions: 1) the user that invoked the process originally 2) a user who has the PROCESS_OWNER or SERVICE_MANAGER permission on the Process associated with the action instance

Specified by:
addTasks in interface TaskManager
Parameters:
aActionId - The id of the action that you want to add tasks to.
aPrincipalOids - The object identifiers for the users who you want to assign new tasks to.
Returns:
The list of newly created task ids.
Throws:
TaskManagerException

removeTasks

public java.util.List removeTasks(java.lang.Long aActionId,
                                  java.util.List aTaskIds)
                           throws TaskManagerException
Description copied from interface: TaskManager
Removes tasks from a multi-user service step that has not yet completed.

Specified by:
removeTasks in interface TaskManager
Parameters:
aActionId - The id of the action that is associated with the tasks you wish to remove.
aTaskIds - A list of ids for the tasks you wish to remove
Returns:
A list of tasks that were removed.
Throws:
TaskManagerException

modifyTaskPermissions

public void modifyTaskPermissions(long aTaskId,
                                  TaskACL[] aPermissions)
                           throws TaskManagerException
Description copied from interface: TaskManager
Modifies the permissions for a task.

The array of permissions passed into this method will replace all permissions that previously existed for the task.

The user calling this method must have permission to modify the permissions. This is established by calling TaskACL.setCanModifyPermissions(). If the user does not have permission to do so, an exception is thrown.

Specified by:
modifyTaskPermissions in interface TaskManager
Parameters:
aTaskId - The task identifier for which the permissions are being changed.
aPermissions - An array of TaskACL objects indicating all the permissions to be set for the task.
Throws:
TaskManagerException - if the user is not currently assigned the task or if the user does not have permissions to change the task.

lockTask

public void lockTask(long aTaskId)
              throws TaskManagerException
Description copied from interface: TaskManager
Locks a task so that no one else may claim it.

This method is useful when a user is making changes to a task or is working on a task form. Calling this method ensures that another user cannot claim the task during that period.

It is recommended that your user interface calls this method when the user is working on the task, and that it provides a way to call unLockTask() when the user would like to allow other users to claim the task.

Specified by:
lockTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task to be locked.
Throws:
TaskManagerException - if the user calling this method is not the current owner of the task.

unLockTask

public void unLockTask(long aTaskId)
                throws TaskManagerException
Description copied from interface: TaskManager
Unlocks a locked task so that another user may claim it.

It is recommended that your user interface calls lockTask() when the user is working on the task, and that it provides a way to call this method when the user would like to allow other users to claim the task.

Specified by:
unLockTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task to be unlocked.
Throws:
TaskManagerException - if the user calling this method is not the current owner of the task

changeDeadline

public void changeDeadline(long taskID,
                           java.util.Date newDeadline)
                    throws TaskManagerException
Description copied from interface: TaskManager
Modifies the deadline for a task if the user has the permission to do so. The deadline event will be rescheduled.

Specified by:
changeDeadline in interface TaskManager
Parameters:
taskID - The identifier of the task.
newDeadline - The date of the new deadline.
Throws:
TaskManagerException

changeReminder

public void changeReminder(long taskID,
                           java.util.Date newReminder)
                    throws TaskManagerException
Throws:
TaskManagerException

claimTask

public void claimTask(long aTaskId,
                      boolean aLockTask)
               throws TaskManagerException
Description copied from interface: TaskManager
Claims a task from a queue to which the user has access, or from a group queue of which the user is a member.

Claimed tasks are placed in the user's default queue. Completed tasks cannot be claimed. Tasks for which the user already has an assignment cannot be claimed. The user claiming the task must be active in User Manager. Claimed tasks can be returned to the original queue from which they were claimed by calling rejectTask().

This method also optionally locks the task. The user calling this method is the user for whom the task will be locked to. For more information about locking a task, see lockTask().

Specified by:
claimTask in interface TaskManager
Parameters:
aTaskId - The identifier of the task being claimed.
aLockTask - true if the task should also be locked in the same transaction, false otherwise.
Throws:
TaskManagerException - if
  • An invalid task identifier or user identifier are provided
  • The claiming user does not have access to the queue for the current assignment, does not have the skill matching a skill queue, or is not a member of the organization if the queue is an organization queue.
  • The task has already been completed.
  • The default queue for the claiming user is not active.

getImage

public Document getImage(ImageTicket aImageId)
                  throws TaskManagerException
Description copied from interface: TaskManager
Retrieves an image for an image ticket.

Specified by:
getImage in interface TaskManager
Parameters:
aImageId - ImageTicket for the image to be returned.

The Document returned has an attribute set for the file name. The attribute name is TaskManagerConstants.TASK_IMAGE_FILENAME_ATTRIBUTE.

Returns:
The image as a Document.
Throws:
TaskManagerException
See Also:
TaskInfo.getImageTicket(), TaskRow.getImageTicket()

reconstructImageTicket

public ImageTicket reconstructImageTicket(java.lang.String aSerializedValue)
Description copied from interface: TaskManager
Reconstructs an image ticket object from a previously received ImageTicket object.

Specified by:
reconstructImageTicket in interface TaskManager
Parameters:
aSerializedValue - The image ticket's serialized value.
Returns:
An ImageTicket object for this serialized value.
See Also:
ImageTicket.getSerializedValue()

callRenderService

public FormServiceInvokeResponse callRenderService(long aTaskId,
                                                   long aFormId,
                                                   java.util.Map aInputMap)
                                            throws TaskManagerException
Description copied from interface: TaskManager
Calls the render service specified in the process for this task. If no render service is specified, the data stored for this form is returned.

Specified by:
callRenderService in interface TaskManager
Parameters:
aTaskId - The task identifier with which the form is associated.
aFormId - The identifier of the form to render.
aInputMap - A Map of arbitrary values to be passed to the render service.
Returns:
A FormServiceInvokeResponse object populated with the rendered form.
Throws:
TaskManagerException

callSubmitService

public FormServiceInvokeResponse callSubmitService(long aTaskId,
                                                   long aFormId,
                                                   Document aDocumentSubmitted,
                                                   java.util.Map aInputMap)
                                            throws TaskManagerException
Description copied from interface: TaskManager
Calls the submit service specified in the process for this task. If no submit service is specified, the data passed into this method is returned.

Specified by:
callSubmitService in interface TaskManager
Parameters:
aTaskId - The task identifier with which the form is associated.
aFormId - The identifier of the form to be submitted.
aDocumentSubmitted - The raw data to be processed by the submit service.
aInputMap - A Map of arbitrary values to be passed to the submit service.
Returns:
A FormServiceInvokeResponse object populated with the processed submitted content.
Throws:
TaskManagerException

setVisibility

public void setVisibility(long aTaskId,
                          boolean aVisible)
                   throws TaskManagerException
Description copied from interface: TaskManager
Sets the visibility of a task. All active tasks are visible. This method can only be executed for tasks owned by the calling user, and for tasks that have been completed, deadlined, or terminated. This method is intended to be used to hide deadlined tasks from a user's worklist or task history.

Specified by:
setVisibility in interface TaskManager
Parameters:
aTaskId - The task identifier.
aVisible - false if the task is to be visible, true otherwise.
Throws:
TaskManagerException - if the task is active or the user does not own the task.

changeDescription

public void changeDescription(java.lang.Long aTaskId,
                              java.lang.String aUpdatedDescription)
                       throws TaskManagerException
Description copied from interface: TaskManager
Changes the description for a task. The currently assigned user may call this method, regardless of the task status.

Specified by:
changeDescription in interface TaskManager
Parameters:
aTaskId - Task to change the description for
aUpdatedDescription - Updated description Text.
Throws:
TaskManagerException - If a user other than the currently assigned user calls this method.

retrieveTaskUI

public TaskUIInfo retrieveTaskUI(long aTaskId,
                                 boolean approvalContainer)
                          throws TaskManagerException
Description copied from interface: TaskManager
Retrieves a custom UI for the task, if one were specified.

Specified by:
retrieveTaskUI in interface TaskManager
Parameters:
aTaskId - The task you are attempting to load the Custom UI for
approvalContainer - Flag used to indicate if the built-in approval container is being loaded. This is a performance short-uct if the client already knows this information
Returns:
a TaskUIInfo instance containing the custom UI as a Document
Throws:
TaskManagerException - If no custom UI or Approval Container is specified for this task.

sendNotification

public void sendNotification(java.lang.String message,
                             java.util.List userIds,
                             java.util.List grpIds)
                      throws TaskManagerException
Description copied from interface: TaskManager
used to send a notificatio message to specified users and groups

Specified by:
sendNotification in interface TaskManager
Parameters:
message - the message going to be sent
userIds - send to user ID list.
grpIds - send to group ID list.
Throws:
TaskManagerException