com.adobe.idp.taskmanager.dsc.client.task
Interface TaskManager


public interface TaskManager

A TaskManager object is used to interact with workflow tasks.

Tasks are usually user steps in a workflow.

Tasks can be associated with a process instance or may exist on their own. An endpoint must be configured for the process if you want to start the process with a task. When the start task created from the endpoint is completed, the long-lived business process will be invoked.

If createTask() modifies the FormInstance data, the CreateTaskResult.isDataModified() method returns true and the client should reload the form instance data by calling getFormInstanceForTask().

The user specified in the ServiceClientFactory that is used to obtain an instance of the TaskManager interface is the user that is performing the action. To retrieve a TaskManager instance, call TaskManagerClientFactory.getTaskManager().


Method Summary
 AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, byte[] attachmentBytes)
          Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.
 AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, Document attachmentDocument)
          Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.
 AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, java.io.InputStream attachmentStream)
          Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.
 AttachmentInfo addNote(long taskId, AttachmentInfo attachmentInfo)
          Appends a new attachment of type AttachmentInfo.TYPE_NOTE to the specified task.
 FormServiceInvokeResponse callRenderService(long taskId, long formId, java.util.Map inputMap)
          Calls the render service specified in the process for this task.
 FormServiceInvokeResponse callSubmitService(long taskId, long formId, Document documentSubmitted, java.util.Map inputMap)
          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 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 taskId, java.lang.String updatedDescription)
          Changes the description for a task.
 void changeQueueForTask(long taskId, long targetQueueId)
          Moves the specified task to another queue also owned by the user who owns the task's current queue.
 void claimTask(long taskId)
          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 taskId, boolean lockTask)
          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)
          Deprecated. Use TaskManager.completeTask(long aTaskI) instead. Calling this deprecated method will only work for tasks with only one form specified.
 CompleteTaskResult completeTask(long aTaskId, java.lang.String selectedAction)
          Completes the specified task with the specified action.
 void consultTask(long taskId, java.lang.String userIdToForward)
          Consults with another user on a task, in order to retrieve input from that other user.
 void copyAttachmentsToTask(long taskId, java.util.List attachmentList)
          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)
          Deprecated. Use the TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo) method instead.
 CreateTaskResult createTask(long actionId, FormInstance formData, java.lang.String instructions, long queueId, boolean copyAttachments, boolean showAttachments)
          Deprecated. Use the TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo) method instead.
 CreateTaskResult createTask(long actionId, FormInstance formData, java.lang.String instructions, long queueId, java.util.List attachmentsToCopy, boolean showAttachments)
          Deprecated. Use the TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo) method instead.
 CompleteTaskResult deadlineTask(long aTaskId, java.lang.String deadlineAction, boolean aChangeInstructions, java.lang.String aDeadlineInstructions)
          Completes a task with a deadline event.
 void deleteAttachment(long taskId, long attachmentId)
          Removes an attachment from the specfied task.
 void escalateTask(long taskId, long aQueueId)
          Escalates a task to another queue.
 void escalateTask(long taskId, long aQueueId, boolean allowOOODesignations)
          Escalates a task to another queue, optionally indicating that the escalations can be OOO designated
 void forwardTask(long taskId, java.lang.String userIdToForward)
          Forwards a non-completed task from a user queue to the default queue indicated in the userIdToForward parameter.
 AttachmentInfo[] getAllAttachments(long taskId)
          Retrieves all currently readable (visible) attachments for this task.
 AttachmentInfo getAttachmentInfo(long taskId, long attachmentId)
          Retrieves attachment information for the attachment.
 java.util.List getAttachmentListForTask(long taskId)
          Retrieves a java.util.List of Document objects representing the attachments for a task.
 java.lang.String getCompletionNote(long taskId)
          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)
          Deprecated. Use TaskManager.getFormInstanceForTask(long taskID, long aFormInstanceId) instead.
 FormInstance getFormInstanceForTask(long aTaskId, boolean aRetrieveData)
          Deprecated. Use TaskManager.getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData) instead.
 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 imageTicket)
          Retrieves an image for an image ticket.
 TaskInfo getTaskInfo(long taskID)
          Retrieves all of the relevant information about a task.
 TaskInfo getTaskInfo(long taskID, boolean returnFormInstance)
          Retrieves all of the relevant information about a task.
 TaskUserInfo[] getUsersWithAccessToTask(long taskId)
          Retrieves a list of users who have access to the task.
 void lockTask(long taskID)
          Locks a task so that no one else may claim it.
 void modifyTaskPermissions(long aTaskID, TaskACL[] permissions)
          Modifies the permissions for a task.
 AttachmentInfo newAttachmentInfo()
          Creates a new AttachmentInfo object.
 byte[] readAttachmentBytes(long taskId, long attachmentId)
          Retrieves a byte array containing the specified attachment.
 Document readAttachmentDocument(long taskId, long attachmentId)
          Retrieves a Document containing the binary content of the specified attachment.
 java.io.InputStream readAttachmentStream(long taskId, long attachmentId)
          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 taskId, 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 taskId)
          Returns a task back to the queue from which the task was forwarded or claimed.
 TaskUIInfo retrieveTaskUI(long taskId, boolean approvalContainer)
          Retrieves a custom UI for the task, if one were specified.
 SaveTaskResult save(long taskId, FormInstance aFormData)
          Saves new form instance data for a task.
 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 aNextReminderBusDays)
          Sends a reminder to the user to whom the identified task is currently assigned.
 void setCompletionNote(long taskId, 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 setParticipantIPAddress(java.lang.String aUsersIPAddress)
          used to optionally store the User's IP Address with some TaskManager API calls
 java.lang.Long setupWorkflowUser()
          This method should be called when a user logs in.
 SetupWorkflowUserResult setupWorkflowUserWithInfo()
          This is an alternate to the setupWorkflowUser() method.
 void setVisibility(long taskId, boolean visible)
          Sets the visibility of a task.
 void shareTask(long taskId, 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 jobId)
          Completes all tasks associated with a JobId with a terminate event.
 void unLockTask(long taskID)
          Unlocks a locked task so that another user may claim it.
 void updateAttachment(long taskId, long attachmentId, byte[] attachmentBytes)
          Updates an existing attachment.
 void updateAttachment(long taskId, long attachmentId, Document attachmentDocument)
          Updates an existing attachment.
 void updateAttachment(long taskId, long attachmentId, java.io.InputStream attachmentStream)
          Updates an existing attachment.
 AttachmentInfo updateAttachmentInfo(long taskId, AttachmentInfo attachmentInfo)
          Updates the specified attachment information.
 void updateHardenedPath(long aTaskId, java.lang.String aHardenedPath)
          Deprecated. Do not use.
 

Method Detail

setContext

void setContext(Context aUser)
Sets the user for subsequent calls to a task manager instance.

Parameters:
aUser - The Context to be used.

setParticipantIPAddress

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

Parameters:
aUsersIPAddress - end user's IP Address

getEmptyForm

FormInstance getEmptyForm()
Retrieves a FormInstance object for this object.

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

Returns:
A new FormInstance object.
See Also:
createTask()

getEmptyACL

TaskACL getEmptyACL()
Retrieves a TaskACL object for this object.

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

Returns:
A new TaskACL object.
See Also:
createTask()

getEmptyCreateTaskInfo

CreateTaskInfo getEmptyCreateTaskInfo()
Retrieves a CreateTaskInfo object for this object.

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

Returns:
A new CreateTaskInfo object.
See Also:
createTask()

setupWorkflowUser

java.lang.Long setupWorkflowUser()
                                 throws TaskManagerException
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.

Returns:
The default Queue ID for the user.
Throws:
TaskManagerException - if the Context does not contain an authenticated user.

setupWorkflowUserWithInfo

SetupWorkflowUserResult setupWorkflowUserWithInfo()
                                                  throws TaskManagerException
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.

Returns:
The SetupWorkflowResult
Throws:
TaskManagerException - if the Context does not contain an authenticated user.

createTask

CreateTaskResult createTask(long actionId,
                            FormInstance formData,
                            java.lang.String instructions,
                            long queueId,
                            boolean copyAttachments,
                            boolean showAttachments)
                            throws TaskManagerException
Deprecated. Use the TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo) method instead.

Creates a task associated with the given action instance and assigns the task to a queue.

This method is typically called by components.

Parameters:
actionId - The action instance identifier.
formData - 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.
copyAttachments - If true, attachments are copied from the previous task.
showAttachments - 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

CreateTaskResult createTask(long actionId,
                            FormInstance formData,
                            java.lang.String instructions,
                            long queueId,
                            java.util.List attachmentsToCopy,
                            boolean showAttachments)
                            throws TaskManagerException
Deprecated. Use the TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo) method instead.

Creates a task associated with the given action instance and assigns the task to a queue.

This method is typically called by components.

Parameters:
actionId - The action instance identifier.
formData - 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.
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.
attachmentsToCopy - 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.
Returns:
The task result.
Throws:
TaskManagerException

createTask

CreateTaskResult createTask(FormInstance newFormData,
                            java.lang.String instructions,
                            boolean showAttachments)
                            throws TaskManagerException
Deprecated. Use the TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo) method instead.

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.

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

void reAssignTask(long taskId,
                  java.lang.String aReassignToUser)
                  throws TaskManagerException
Reassigns a task to another user queue.

Only an administrator can reassign a task.

Parameters:
taskId - The task to be reassigned.
aReassignToUser - The user identifier of the user being assigned the task.
Throws:
TaskManagerException

escalateTask

void escalateTask(long taskId,
                  long aQueueId)
                  throws TaskManagerException
Escalates a task to another queue.

Escalating a task does not alter its deadline date.

Parameters:
taskId - The task to be reassigned.
aQueueId - The identifier of the queue to which the task is escalated.
Throws:
TaskManagerException

escalateTask

void escalateTask(long taskId,
                  long aQueueId,
                  boolean allowOOODesignations)
                  throws TaskManagerException
Escalates a task to another queue, optionally indicating that the escalations can be OOO designated

Escalating a task does not alter its deadline date.

Parameters:
taskId - The task to be reassigned.
aQueueId - The identifier of the queue to which the task is escalated.
allowOOODesignations - Set to true if you would like OOO designations to occur on this escalation
Throws:
TaskManagerException

forwardTask

void forwardTask(long taskId,
                 java.lang.String userIdToForward)
                 throws TaskManagerException
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()).

Parameters:
taskId - 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

shareTask

void shareTask(long taskId,
               java.lang.String userIdToShare)
               throws TaskManagerException
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()).

Parameters:
taskId - 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.
Since:
8.0
See Also:
TaskACL

claimTask

void claimTask(long taskId)
               throws TaskManagerException
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().

Parameters:
taskId - 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

void rejectTask(long taskId)
                throws TaskManagerException
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.

Parameters:
taskId - 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

void changeQueueForTask(long taskId,
                        long targetQueueId)
                        throws TaskManagerException
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.

Parameters:
taskId - The task which to be moved.
targetQueueId - 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

void cancelTask(long aTaskId)
                throws TaskManagerException
Removes all persisted data for an active non-workflow task.

The user must own the assignment for this task.

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.

completeTask

CompleteTaskResult completeTask(long aTaskId)
                                throws TaskManagerException
Completes the specified task.

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

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

CompleteTaskResult completeTask(long aTaskId,
                                java.lang.String selectedAction)
                                throws TaskManagerException
Completes the specified task with the specified action.

Parameters:
aTaskId - The identifier of the task to be completed.
selectedAction - The action the user selected.
Throws:
TaskManagerException

completeTask

CompleteTaskResult completeTask(long aTaskId,
                                FormInstance formData)
                                throws TaskManagerException
Deprecated. Use TaskManager.completeTask(long aTaskI) instead. Calling this deprecated method will only work for tasks with only one form specified.

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.

Parameters:
aTaskId - The identifier of the task to be completed.
formData - Form data to commit as part of the transaction.
Throws:
TaskManagerException

deadlineTask

CompleteTaskResult deadlineTask(long aTaskId,
                                java.lang.String deadlineAction,
                                boolean aChangeInstructions,
                                java.lang.String aDeadlineInstructions)
                                throws TaskManagerException,
                                       NoActionSelectedException
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.

Parameters:
aTaskId - The identifier of the task.
deadlineAction - 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

CompleteTaskResult terminateTask(long aTaskId)
                                 throws TaskManagerException
Completes a task with a terminate event.

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

Parameters:
aTaskId - The identifier of the task to terminate.
Returns:
A CompleteTaskResult containing the status of the task termination.
Throws:
TaskManagerException

terminateTasksForJobId

CompleteTaskResult[] terminateTasksForJobId(java.lang.String jobId)
                                            throws TaskManagerException
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).

Parameters:
jobId - 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

void sendTaskReminder(long aTaskId,
                      boolean aChangeInstructions,
                      java.lang.String aReminderInstructions,
                      long aNextReminder)
                      throws TaskManagerException
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).

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

void sendTaskReminder(long aTaskId,
                      boolean aChangeInstructions,
                      java.lang.String aReminderInstructions,
                      long aNextReminder,
                      boolean aNextReminderBusDays)
                      throws TaskManagerException
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).

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

void updateHardenedPath(long aTaskId,
                        java.lang.String aHardenedPath)
                        throws TaskManagerException
Deprecated. Do not use.

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 LiveCycle Process Management. Only active tasks can have their hardened path updated.

A hardened path contains specific version information.

Parameters:
aTaskId - The task for which to update the hardened path.
aHardenedPath - The hardened path to update.
Throws:
TaskManagerException

save

SaveTaskResult save(long taskId,
                    FormInstance aFormData)
                    throws TaskManagerException
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.

Parameters:
taskId - 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.

getFormInstanceForTask

FormInstance getFormInstanceForTask(long aTaskId)
                                    throws TaskManagerException
Deprecated. Use TaskManager.getFormInstanceForTask(long taskID, long aFormInstanceId) instead.

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.

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

FormInstance getFormInstanceForTask(long aTaskId,
                                    boolean aRetrieveData)
                                    throws TaskManagerException
Deprecated. Use TaskManager.getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData) instead.

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.

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.

newAttachmentInfo

AttachmentInfo newAttachmentInfo()
Creates a new AttachmentInfo object.

Returns:
The newly created AttachmentInfo object.

getAllAttachments

AttachmentInfo[] getAllAttachments(long taskId)
                                   throws TaskManagerException
Retrieves all currently readable (visible) attachments for this task.

The task must be assigned to the user.

Parameters:
taskId - 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

AttachmentInfo getAttachmentInfo(long taskId,
                                 long attachmentId)
                                 throws TaskManagerException
Retrieves attachment information for the attachment.

The task must be assigned to the user.

Parameters:
taskId - The task identifier.
attachmentId - The attachment identifier.
Returns:
The attachment information for this attachment.
Throws:
TaskManagerException - if the user does not have access to this task.

updateAttachmentInfo

AttachmentInfo updateAttachmentInfo(long taskId,
                                    AttachmentInfo attachmentInfo)
                                    throws TaskManagerException
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.

Parameters:
attachmentInfo - Specifies the attachment information to modify.
taskId - The task identifier.
Throws:
TaskManagerException

addAttachment

AttachmentInfo addAttachment(long taskId,
                             AttachmentInfo attachmentInfo,
                             java.io.InputStream attachmentStream)
                             throws TaskManagerException
Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.

The task must be assigned to the user.

Parameters:
taskId - The task identifier.
attachmentInfo - 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

AttachmentInfo addNote(long taskId,
                       AttachmentInfo attachmentInfo)
                       throws TaskManagerException
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.

Parameters:
taskId - The task identifier.
attachmentInfo - 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

AttachmentInfo addAttachment(long taskId,
                             AttachmentInfo attachmentInfo,
                             Document attachmentDocument)
                             throws TaskManagerException
Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.

The task must be assigned to the user.

Parameters:
taskId - The task identifier.
attachmentInfo - The AttachmentInfo object populated with the relevant information.
attachmentDocument - The new attachment content as a Document.
Returns:
The AttachmentInfo for this attachment with the newly created attachment identifier set.
Throws:
TaskManagerException

addAttachment

AttachmentInfo addAttachment(long taskId,
                             AttachmentInfo attachmentInfo,
                             byte[] attachmentBytes)
                             throws TaskManagerException
Appends a new attachment of type AttachmentInfo.TYPE_ATTACHMENT to the specified task.

The task must be assigned to the user.

Parameters:
taskId - The task identifier.
attachmentInfo - An AttachmentInfo object populated with the relevant information.
attachmentBytes - The new attachment's content in bytes.
Returns:
The AttachmentInfo for this attachment with the newly created attachment identifier set.
Throws:
TaskManagerException

deleteAttachment

void deleteAttachment(long taskId,
                      long attachmentId)
                      throws TaskManagerException
Removes an attachment from the specfied task.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - The attachment to be removed.
Throws:
TaskManagerException

updateAttachment

void updateAttachment(long taskId,
                      long attachmentId,
                      java.io.InputStream attachmentStream)
                      throws TaskManagerException
Updates an existing attachment.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - The identifier for the attachment to be updated.
attachmentStream - A stream representing the attachment content.
Throws:
TaskManagerException - if the user does not have access to this task.

updateAttachment

void updateAttachment(long taskId,
                      long attachmentId,
                      Document attachmentDocument)
                      throws TaskManagerException
Updates an existing attachment.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - The identifier for the attachment to be updated.
attachmentDocument - A com.adobe.idp.Document object containing the attachment content.
Throws:
TaskManagerException - if the user does not have access to this task.

updateAttachment

void updateAttachment(long taskId,
                      long attachmentId,
                      byte[] attachmentBytes)
                      throws TaskManagerException
Updates an existing attachment.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - The identifier for the attachment to be updated.
attachmentBytes - A byte array containing the attachment content.
Throws:
TaskManagerException - if the user does not have access to this task.

readAttachmentDocument

Document readAttachmentDocument(long taskId,
                                long attachmentId)
                                throws TaskManagerException
Retrieves a Document containing the binary content of the specified attachment.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - 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

java.io.InputStream readAttachmentStream(long taskId,
                                         long attachmentId)
                                         throws TaskManagerException
Retrieves an input stream containing the binary content of the specified attachment.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - 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

byte[] readAttachmentBytes(long taskId,
                           long attachmentId)
                           throws TaskManagerException
Retrieves a byte array containing the specified attachment.

The task must be assigned to the user.

Parameters:
taskId - The task containing the attachment.
attachmentId - 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

java.lang.String readFullNoteContent(long taskId,
                                     long attachmentId)
                                     throws TaskManagerException
Retrieves the full note content.

The task must be assigned to the user.

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

void copyAttachmentsToTask(long taskId,
                           java.util.List attachmentList)
                           throws TaskManagerException
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.

Parameters:
taskId - The task with which the attachment is associated.
attachmentList - 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

java.util.List getAttachmentListForTask(long taskId)
                                        throws TaskManagerException
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.

Parameters:
taskId - 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

java.lang.String getCompletionNote(long taskId)
                                   throws TaskManagerException
Retrieves a completion note for the task, if there is one

Parameters:
taskId - 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

void setCompletionNote(long taskId,
                       java.lang.String completionNote)
                       throws TaskManagerException
sets a completion note for the task.

Parameters:
taskId - 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.

getFormInstanceForTask

FormInstance getFormInstanceForTask(long aTaskId,
                                    long aFormInstanceId)
                                    throws TaskManagerException
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.

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.
Since:
8.0

getFormInstanceForTask

FormInstance getFormInstanceForTask(long aTaskId,
                                    long aFormInstanceId,
                                    boolean aRetrieveData)
                                    throws TaskManagerException
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.

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.
Since:
8.0

createTask

CreateTaskResult createTask(CreateTaskInfo createTaskInfo)
                            throws TaskManagerException
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.

Parameters:
createTaskInfo - A value object containing all of the relevant information required to create a task.
Returns:
A task result.
Throws:
TaskManagerException
Since:
8.0

getTaskInfo

TaskInfo getTaskInfo(long taskID)
                     throws TaskManagerException
Retrieves all of the relevant information about a task.

Parameters:
taskID - The identifier of the task being returned.
Returns:
A TaskInfo object populated with all of the information about the task.
Throws:
TaskManagerException
Since:
8.0

getTaskInfo

TaskInfo getTaskInfo(long taskID,
                     boolean returnFormInstance)
                     throws TaskManagerException
Retrieves all of the relevant information about a task.

Parameters:
taskID - The identifier of the task being returned.
returnFormInstance - 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
Since:
8.0

getUsersWithAccessToTask

TaskUserInfo[] getUsersWithAccessToTask(long taskId)
                                        throws TaskManagerException
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.

Parameters:
taskId - The task identifier.
Returns:
A list of users, including the task owner, who have access to the task.
Throws:
TaskManagerException

modifyTaskPermissions

void modifyTaskPermissions(long aTaskID,
                           TaskACL[] permissions)
                           throws TaskManagerException
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.

Parameters:
aTaskID - The task identifier for which the permissions are being changed.
permissions - 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.
Since:
8.0

lockTask

void lockTask(long taskID)
              throws TaskManagerException
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.

Parameters:
taskID - The identifier of the task to be locked.
Throws:
TaskManagerException - if the user calling this method is not the current owner of the task.
Since:
8.0

unLockTask

void unLockTask(long taskID)
                throws TaskManagerException
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.

Parameters:
taskID - The identifier of the task to be unlocked.
Throws:
TaskManagerException - if the user calling this method is not the current owner of the task
Since:
8.0

consultTask

void consultTask(long taskId,
                 java.lang.String userIdToForward)
                 throws TaskManagerException
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.

Parameters:
taskId - The identifier of the task.
userIdToForward - The identifier of the user to be consulted.
Throws:
TaskManagerException
Since:
8.0

changeDeadline

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

Parameters:
taskID - The identifier of the task.
newDeadline - The date of the new deadline.
Throws:
TaskManagerException
Since:
8.0

claimTask

void claimTask(long taskId,
               boolean lockTask)
               throws TaskManagerException
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().

Parameters:
taskId - The identifier of the task being claimed.
lockTask - 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.
Since:
8.0

reconstructImageTicket

ImageTicket reconstructImageTicket(java.lang.String aSerializedValue)
Reconstructs an image ticket object from a previously received ImageTicket object.

Parameters:
aSerializedValue - The image ticket's serialized value.
Returns:
An ImageTicket object for this serialized value.
See Also:
ImageTicket.getSerializedValue()

getImage

Document getImage(ImageTicket imageTicket)
                  throws TaskManagerException
Retrieves an image for an image ticket.

Parameters:
imageTicket - 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()

callRenderService

FormServiceInvokeResponse callRenderService(long taskId,
                                            long formId,
                                            java.util.Map inputMap)
                                            throws TaskManagerException
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.

Parameters:
taskId - The task identifier with which the form is associated.
formId - The identifier of the form to render.
inputMap - A Map of arbitrary values to be passed to the render service.
Returns:
A FormServiceInvokeResponse object populated with the rendered form.
Throws:
TaskManagerException

callSubmitService

FormServiceInvokeResponse callSubmitService(long taskId,
                                            long formId,
                                            Document documentSubmitted,
                                            java.util.Map inputMap)
                                            throws TaskManagerException
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.

Parameters:
taskId - The task identifier with which the form is associated.
formId - The identifier of the form to be submitted.
documentSubmitted - The raw data to be processed by the submit service.
inputMap - 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

void setVisibility(long taskId,
                   boolean visible)
                   throws TaskManagerException
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.

Parameters:
taskId - The task identifier.
visible - 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

void changeDescription(java.lang.Long taskId,
                       java.lang.String updatedDescription)
                       throws TaskManagerException
Changes the description for a task. The currently assigned user may call this method, regardless of the task status.

Parameters:
taskId - Task to change the description for
updatedDescription - Updated description Text.
Throws:
TaskManagerException - If a user other than the currently assigned user calls this method.

retrieveTaskUI

TaskUIInfo retrieveTaskUI(long taskId,
                          boolean approvalContainer)
                          throws TaskManagerException
Retrieves a custom UI for the task, if one were specified.

Parameters:
taskId - 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.


[an error occurred while processing this directive] [an error occurred while processing this directive]