Package com.adobe.idp.taskmanager.dsc.client.task
Interfacepublic 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 com.adobe.idp.taskmanager.dsc.client.task.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().



Public Methods
 MethodDefined by
  
AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, InputStream attachmentStream)
Appends a new attachment of type AttachmentInfo#TYPE_ATTACHMENT to the specified task.
TaskManager
  
AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, Document attachmentDocument)
Appends a new attachment of type AttachmentInfo#TYPE_ATTACHMENT to the specified task.
TaskManager
  
AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, byte[] attachmentBytes)
Appends a new attachment of type AttachmentInfo#TYPE_ATTACHMENT to the specified task.
TaskManager
  
AttachmentInfo addNote(long taskId, AttachmentInfo attachmentInfo)
Appends a new attachment of type AttachmentInfo#TYPE_NOTE to the specified task.
TaskManager
  
FormServiceInvokeResponse callRenderService(long taskId, long formId, Map inputMap)
Calls the render service specified in the process for this task.
TaskManager
  
FormServiceInvokeResponse callSubmitService(long taskId, long formId, Document documentSubmitted, Map inputMap)
Calls the submit service specified in the process for this task.
TaskManager
  
void cancelTask(long aTaskId)
Removes all persisted data for an active non-workflow task.
TaskManager
  
void changeDeadline(long taskID, Date newDeadline)
Modifies the deadline for a task if the user has the permission to do so.
TaskManager
  
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.
TaskManager
  
void changeReminder(long taskID, Date newReminder)
Modifies the reminder for a task if the user has the permission to do so.
TaskManager
  
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 com.adobe.idp.taskmanager.dsc.client.task.TaskACL#isCanClaim() TaskACL.isCanClaim() and com.adobe.idp.taskmanager.dsc.client.task.TaskACL#setCanClaim() TaskACL.setCanClaim()), or from a group queue of which the user is a member.
TaskManager
  
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.
TaskManager
  
Completes the specified task.
TaskManager
  
CompleteTaskResult completeTask(long aTaskId, String selectedAction)
Completes the specified task with the specified action.
TaskManager
  
Completes the specified task with the specified data.
TaskManager
  
void consultTask(long taskId, String userIdToForward)
Consults with another user on a task, in order to retrieve input from that other user.
TaskManager
  
void copyAttachmentsToTask(long taskId, List attachmentList)
Copies attachments from a java.util.List of com.adobe.idp.Document objects to the task.
TaskManager
  
CreateTaskResult createTask(long actionId, FormInstance formData, String instructions, long queueId, boolean copyAttachments, boolean showAttachments)
Creates a task associated with the given action instance and assigns the task to a queue.
TaskManager
  
CreateTaskResult createTask(long actionId, FormInstance formData, String instructions, long queueId, List attachmentsToCopy, boolean showAttachments)
Creates a task associated with the given action instance and assigns the task to a queue.
TaskManager
  
CreateTaskResult createTask(FormInstance newFormData, String instructions, boolean showAttachments)
Creates new tasks not yet associated with a process.
TaskManager
  
Creates a new task.
TaskManager
  
CompleteTaskResult deadlineTask(long aTaskId, String deadlineAction, boolean aChangeInstructions, String aDeadlineInstructions)
Completes a task with a deadline event.
TaskManager
  
void deleteAttachment(long taskId, long attachmentId)
Removes an attachment from the specfied task.
TaskManager
  
void escalateTask(long taskId, long aQueueId)
Escalates a task to another queue.
TaskManager
  
void forwardTask(long taskId, String userIdToForward)
Forwards a non-completed task from a user queue to the default queue indicated in the userIdToForward parameter.
TaskManager
  
AttachmentInfo[] getAllAttachments(long taskId)
Retrieves all currently readable (visible) attachments for this task.
TaskManager
  
AttachmentInfo getAttachmentInfo(long taskId, long attachmentId)
Retrieves attachment information for the attachment.
TaskManager
  
List getAttachmentListForTask(long taskId)
Retrieves a java.util.List of com.adobe.idp.Document objects representing the attachments for a task.
TaskManager
  
Retrieves a com.adobe.idp.taskmanager.dsc.client.task.TaskACL object for this object.
TaskManager
  
Retrieves a com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo object for this object.
TaskManager
  
Retrieves a com.adobe.idp.taskmanager.dsc.client.task.FormInstance object for this object.
TaskManager
  
Retrieves a FormInstance object associated with a task.
TaskManager
  
FormInstance getFormInstanceForTask(long aTaskId, boolean aRetrieveData)
Retrieves a FormInstance object associated with a task.
TaskManager
  
FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId)
Retrieves a FormInstance object associated with a task.
TaskManager
  
FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData)
Retrieves a FormInstance object associated with a task.
TaskManager
  
Retrieves an image for an image ticket.
TaskManager
  
TaskInfo getTaskInfo(long taskID)
Retrieves all of the relevant information about a task.
TaskManager
  
TaskInfo getTaskInfo(long taskID, boolean returnFormInstance)
Retrieves all of the relevant information about a task.
TaskManager
  
TaskUserInfo[] getUsersWithAccessToTask(long taskId)
Retrieves a list of users who have access to the task.
TaskManager
  
void lockTask(long taskID)
Locks a task so that no one else may claim it.
TaskManager
  
void modifyTaskPermissions(long aTaskID, TaskACL[] permissions)
Modifies the permissions for a task.
TaskManager
  
Creates a new AttachmentInfo object.
TaskManager
  
byte[] readAttachmentBytes(long taskId, long attachmentId)
Retrieves a byte array containing the specified attachment.
TaskManager
  
Document readAttachmentDocument(long taskId, long attachmentId)
Retrieves a Document containing the binary content of the specified attachment.
TaskManager
  
InputStream readAttachmentStream(long taskId, long attachmentId)
Retrieves an input stream containing the binary content of the specified attachment.
TaskManager
  
String readFullNoteContent(long taskId, long attachmentId)
Retrieves the full note content.
TaskManager
  
void reAssignTask(long taskId, String aReassignToUser)
Reassigns a task to another user queue.
TaskManager
  
ImageTicket reconstructImageTicket(String aSerializedValue)
Reconstructs an image ticket object from a previously received ImageTicket object.
TaskManager
  
void rejectTask(long taskId)
Returns a task back to the queue from which the task was forwarded or claimed.
TaskManager
  
SaveTaskResult save(long taskId, FormInstance aFormData)
Saves new form instance data for a task.
TaskManager
  
void sendTaskReminder(long aTaskId, boolean aChangeInstructions, String aReminderInstructions, long aNextReminder)
Sends a reminder to the user to whom the identified task is currently assigned.
TaskManager
  
void setContext(Context aUser)
Sets the user for subsequent calls to a task manager instance.
TaskManager
  
This method should be called when a user logs in.
TaskManager
  
void setVisibility(long taskId, boolean visible)
Sets the visibility of a task.
TaskManager
  
void shareTask(long taskId, String userIdToShare)
Shares a non-completed task with another user.
TaskManager
  
Completes a task with a terminate event.
TaskManager
  
CompleteTaskResult[] terminateTasksForJobId(String jobId)
Completes all tasks associated with a JobId with a terminate event.
TaskManager
  
void unLockTask(long taskID)
Unlocks a locked task so that another user may claim it.
TaskManager
  
void updateAttachment(long taskId, long attachmentId, InputStream attachmentStream)
Updates an existing attachment.
TaskManager
  
void updateAttachment(long taskId, long attachmentId, Document attachmentDocument)
Updates an existing attachment.
TaskManager
  
void updateAttachment(long taskId, long attachmentId, byte[] attachmentBytes)
Updates an existing attachment.
TaskManager
  
AttachmentInfo updateAttachmentInfo(long taskId, AttachmentInfo attachmentInfo)
Updates the specified attachment information.
TaskManager
  
void updateHardenedPath(long aTaskId, String aHardenedPath)
Allows the hardened path to be updated by a user in the workflow system role.
TaskManager
Method Detail
addAttachment()
public AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, InputStream attachmentStream)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
addAttachment() 
public AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, Document attachmentDocument)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
addAttachment() 
public AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, byte[] attachmentBytes)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
addNote() 
public AttachmentInfo addNote(long taskId, AttachmentInfo attachmentInfo)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
callRenderService() 
public FormServiceInvokeResponse callRenderService(long taskId, long formId, Map inputMap)

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() 
public FormServiceInvokeResponse callSubmitService(long taskId, long formId, Document documentSubmitted, Map inputMap)

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
cancelTask() 
public void cancelTask(long aTaskId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — If no task matches the task identifier or if the task is already completed or is part of a workflow.
changeDeadline() 
public void changeDeadline(long taskID, Date newDeadline)
Deprecated: This method has not been implemented, though it is planned for a future release. Do not use this method.

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
changeQueueForTask() 
public 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.

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
com.adobe.idp.taskmanager.dsc.client.task.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.
changeReminder() 
public void changeReminder(long taskID, Date newReminder)
Deprecated: This method has not been implemented, though it is planned for a future release. Do not use this method.

Modifies the reminder for a task if the user has the permission to do so. The reminder event will be rescheduled.

Parameters

taskID — The identifier of the task.
 
newReminder — The new date of the reminder.


Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
claimTask() 
public 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.

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
com.adobe.idp.taskmanager.dsc.client.task.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.
claimTask() 
public 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.

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.
 
lockTasktrue if the task should also be locked in the same transaction, false otherwise.


Throws
com.adobe.idp.taskmanager.dsc.client.task.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.
completeTask() 
public CompleteTaskResult completeTask(long aTaskId)

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.

Returns

Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskNotFoundException — if the task is not found.
 
com.adobe.idp.taskmanager.dsc.client.task.TaskNotRunningException — if the specified task has already been completed.
 
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — otherwise.
completeTask() 
public CompleteTaskResult completeTask(long aTaskId, String selectedAction)

Completes the specified task with the specified action.

Parameters

aTaskId — The identifier of the task to be completed.
 
selectedAction — The action the user selected.

Returns

Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
completeTask() 
public CompleteTaskResult completeTask(long aTaskId, FormInstance formData)
Deprecated: Use 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.

Returns

Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
consultTask() 
public void consultTask(long taskId, String userIdToForward)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
copyAttachmentsToTask() 
public void copyAttachmentsToTask(long taskId, List attachmentList)

Copies attachments from a java.util.List of com.adobe.idp.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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task or if the objects contained in the list are not Document objects.
createTask() 
public CreateTaskResult createTask(long actionId, FormInstance formData, String instructions, long queueId, boolean copyAttachments, boolean showAttachments)
Deprecated: Use the 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 com.adobe.idp.taskmanager.dsc.client.task.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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
createTask() 
public CreateTaskResult createTask(long actionId, FormInstance formData, String instructions, long queueId, List attachmentsToCopy, boolean showAttachments)
Deprecated: Use the 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 com.adobe.idp.taskmanager.dsc.client.task.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.
 
attachmentsToCopy — 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.
 
showAttachments — A java.util.List of com.adobe.idp.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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
createTask() 
public CreateTaskResult createTask(FormInstance newFormData, String instructions, boolean showAttachments)
Deprecated: Use the 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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
createTask() 
public CreateTaskResult createTask(CreateTaskInfo createTaskInfo)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
deadlineTask() 
public CompleteTaskResult deadlineTask(long aTaskId, String deadlineAction, boolean aChangeInstructions, String aDeadlineInstructions)

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.
 
deadlineActionnull 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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
 
com.adobe.idp.taskmanager.dsc.client.task.NoActionSelectedException
deleteAttachment() 
public void deleteAttachment(long taskId, long attachmentId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
escalateTask() 
public void escalateTask(long taskId, long aQueueId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
forwardTask() 
public void forwardTask(long taskId, String userIdToForward)

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
com.adobe.idp.taskmanager.dsc.client.task.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

getAllAttachments() 
public AttachmentInfo[] getAllAttachments(long taskId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
getAttachmentInfo() 
public AttachmentInfo getAttachmentInfo(long taskId, long attachmentId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
getAttachmentListForTask() 
public List getAttachmentListForTask(long taskId)

Retrieves a java.util.List of com.adobe.idp.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 com.adobe.idp.Document objects, each of which is an attachment.

Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task or if the objects contained in the list are not Document objects.
getEmptyACL() 
public TaskACL getEmptyACL()

Retrieves a com.adobe.idp.taskmanager.dsc.client.task.TaskACL object for this object.

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

Returns
A new com.adobe.idp.taskmanager.dsc.client.task.TaskACL object.

See also

getEmptyCreateTaskInfo() 
public CreateTaskInfo getEmptyCreateTaskInfo()

Retrieves a com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo object for this object.

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

Returns
A new com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo object.

See also

getEmptyForm() 
public FormInstance getEmptyForm()

Retrieves a com.adobe.idp.taskmanager.dsc.client.task.FormInstance object for this object.

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

Returns
A new com.adobe.idp.taskmanager.dsc.client.task.FormInstance object.

See also

getFormInstanceForTask() 
public FormInstance getFormInstanceForTask(long aTaskId)
Deprecated: Use 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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
getFormInstanceForTask() 
public FormInstance getFormInstanceForTask(long aTaskId, boolean aRetrieveData)
Deprecated: Use 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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
getFormInstanceForTask() 
public FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
getFormInstanceForTask() 
public FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData)

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.

 
aFormInstanceIdtrue to populate the data in the resulting object, false otherwise.
 
aRetrieveData

Returns
A FormInstance object populated with the template path and XML data.

Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
getImage() 
public Document getImage(ImageTicket imageTicket)

Retrieves an image for an image ticket.

Parameters

imageTicket — ImageTicket for the image to be returned.

The com.adobe.idp.Document returned has an attribute set for the file name. The attribute name is TaskManagerConstants#TASK_IMAGE_FILENAME_ATTRIBUTE.

Returns
The image as a com.adobe.idp.Document.

Throws
TaskManagerException

See also

getTaskInfo() 
public TaskInfo getTaskInfo(long taskID)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
getTaskInfo() 
public TaskInfo getTaskInfo(long taskID, boolean returnFormInstance)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
getUsersWithAccessToTask() 
public TaskUserInfo[] getUsersWithAccessToTask(long taskId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
lockTask() 
public void lockTask(long taskID)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user calling this method is not the current owner of the task.
modifyTaskPermissions() 
public void modifyTaskPermissions(long aTaskID, TaskACL[] permissions)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user is not currently assigned the task or if the user does not have permissions to change the task.
newAttachmentInfo() 
public AttachmentInfo newAttachmentInfo()

Creates a new AttachmentInfo object.

Returns
The newly created AttachmentInfo object.
readAttachmentBytes() 
public byte[] readAttachmentBytes(long taskId, long attachmentId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
readAttachmentDocument() 
public Document readAttachmentDocument(long taskId, long attachmentId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
readAttachmentStream() 
public InputStream readAttachmentStream(long taskId, long attachmentId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
readFullNoteContent() 
public String readFullNoteContent(long taskId, long attachmentId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
reAssignTask() 
public void reAssignTask(long taskId, String aReassignToUser)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
reconstructImageTicket() 
public ImageTicket reconstructImageTicket(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

rejectTask() 
public void rejectTask(long taskId)

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
com.adobe.idp.taskmanager.dsc.client.task.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.
save() 
public SaveTaskResult save(long taskId, FormInstance aFormData)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user identified by the com.adobe.idp.Context object is not assigned this task.
 
com.adobe.idp.taskmanager.dsc.client.task.TaskNotRunningException — if the task is not in a running state (it has already completed).
 
com.adobe.idp.taskmanager.dsc.client.task.TaskNotFoundException — if the task is not found.
sendTaskReminder() 
public void sendTaskReminder(long aTaskId, boolean aChangeInstructions, String aReminderInstructions, long aNextReminder)

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.
 
aChangeInstructionstrue 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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
setContext() 
public void setContext(Context aUser)

Sets the user for subsequent calls to a task manager instance.

Parameters

aUser — The com.adobe.idp.Context to be used.

setupWorkflowUser() 
public Long setupWorkflowUser()

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 com.adobe.idp.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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the com.adobe.idp.Context does not contain an authenticated user.
setVisibility() 
public void setVisibility(long taskId, boolean visible)

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.
 
visiblefalse if the task is to be visible, true otherwise.


Throws
TaskManagerException — if the task is active or the user does not own the task.
shareTask() 
public void shareTask(long taskId, String userIdToShare)

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
com.adobe.idp.taskmanager.dsc.client.task.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

terminateTask() 
public CompleteTaskResult terminateTask(long aTaskId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
terminateTasksForJobId() 
public CompleteTaskResult[] terminateTasksForJobId(String jobId)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
unLockTask() 
public void unLockTask(long taskID)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user calling this method is not the current owner of the task
updateAttachment() 
public void updateAttachment(long taskId, long attachmentId, InputStream attachmentStream)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
updateAttachment() 
public void updateAttachment(long taskId, long attachmentId, Document attachmentDocument)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
updateAttachment() 
public void updateAttachment(long taskId, long attachmentId, byte[] attachmentBytes)

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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException — if the user does not have access to this task.
updateAttachmentInfo() 
public AttachmentInfo updateAttachmentInfo(long taskId, AttachmentInfo attachmentInfo)

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

taskId — Specifies the attachment information to modify.
 
attachmentInfo — The task identifier.

Returns

Throws
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException
updateHardenedPath() 
public void updateHardenedPath(long aTaskId, String aHardenedPath)
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
com.adobe.idp.taskmanager.dsc.client.task.TaskManagerException




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/javadoc/com/adobe/idp/taskmanager/dsc/client/task/TaskManager.html