|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
void setContext(Context aUser)
aUser
- The Context
to be used.void setParticipantIPAddress(java.lang.String aUsersIPAddress)
aUsersIPAddress
- end user's IP AddressFormInstance getEmptyForm()
FormInstance
object for this object.
This method can be useful if you need to associate a form with a new task.
FormInstance
object.createTask()
TaskACL getEmptyACL()
TaskACL
object for this object.
This method can be useful if you need to associate an ACL with a new task.
TaskACL
object.createTask()
CreateTaskInfo getEmptyCreateTaskInfo()
CreateTaskInfo
object for this object.
The CreateTaskInfo
object is needed in order to call
createTask()
.
CreateTaskInfo
object.createTask()
java.lang.Long setupWorkflowUser() throws TaskManagerException
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.
TaskManagerException
- if the Context
does not contain an authenticated user.SetupWorkflowUserResult setupWorkflowUserWithInfo() throws TaskManagerException
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.
TaskManagerException
- if the Context
does not contain an authenticated user.CreateTaskResult createTask(long actionId, FormInstance formData, java.lang.String instructions, long queueId, boolean copyAttachments, boolean showAttachments) throws TaskManagerException
TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo)
method instead.
This method is typically called by components.
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.
TaskManagerException
CreateTaskResult createTask(long actionId, FormInstance formData, java.lang.String instructions, long queueId, java.util.List attachmentsToCopy, boolean showAttachments) throws TaskManagerException
TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo)
method instead.
This method is typically called by components.
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.
TaskManagerException
CreateTaskResult createTask(FormInstance newFormData, java.lang.String instructions, boolean showAttachments) throws TaskManagerException
TaskManager.createTask(com.adobe.idp.taskmanager.dsc.client.task.CreateTaskInfo)
method instead.
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.
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.
TaskManagerException
void reAssignTask(long taskId, java.lang.String aReassignToUser) throws TaskManagerException
Only an administrator can reassign a task.
taskId
- The task to be reassigned.aReassignToUser
- The user identifier of the user being assigned the task.
TaskManagerException
void escalateTask(long taskId, long aQueueId) throws TaskManagerException
Escalating a task does not alter its deadline date.
taskId
- The task to be reassigned.aQueueId
- The identifier of the queue to which the task is escalated.
TaskManagerException
void escalateTask(long taskId, long aQueueId, boolean allowOOODesignations) throws TaskManagerException
Escalating a task does not alter its deadline date.
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
TaskManagerException
void forwardTask(long taskId, java.lang.String userIdToForward) throws TaskManagerException
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()
).
taskId
- The task to forward.userIdToForward
- The identifier of the user to whom to forward the 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.TaskACL
void shareTask(long taskId, java.lang.String userIdToShare) throws TaskManagerException
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()
).
taskId
- The task to forward.userIdToShare
- The identifier of the user with whom to share the 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.TaskACL
void claimTask(long taskId) throws TaskManagerException
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()
.
taskId
- The identifier of the task being claimed.
TaskManagerException
- if
void rejectTask(long taskId) throws TaskManagerException
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.
taskId
- The task to be rejected.
TaskManagerException
- if
void changeQueueForTask(long taskId, long targetQueueId) throws TaskManagerException
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.
taskId
- The task which to be moved.targetQueueId
- The queue to which this task is being moved.
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.void cancelTask(long aTaskId) throws TaskManagerException
The user must own the assignment for this task.
aTaskId
- The task identifier identifying the task to be cancelled.
TaskManagerException
- If
no task matches the task identifier or if the task is already completed or is part of a workflow.CompleteTaskResult completeTask(long aTaskId) throws TaskManagerException
The selected action may have already been provided in the form data.
aTaskId
- The identifier of the task to be completed.
TaskNotFoundException
- if the task is not found.
TaskNotRunningException
- if the specified task has already been completed.
TaskManagerException
- otherwise.CompleteTaskResult completeTask(long aTaskId, java.lang.String selectedAction) throws TaskManagerException
aTaskId
- The identifier of the task to be completed.selectedAction
- The action the user selected.
TaskManagerException
CompleteTaskResult completeTask(long aTaskId, FormInstance formData) throws TaskManagerException
TaskManager.completeTask(long aTaskI)
instead.
Calling this deprecated method will only work for tasks with only one form specified.
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.
aTaskId
- The identifier of the task to be completed.formData
- Form data to commit as part of the transaction.
TaskManagerException
CompleteTaskResult deadlineTask(long aTaskId, java.lang.String deadlineAction, boolean aChangeInstructions, java.lang.String aDeadlineInstructions) throws TaskManagerException, NoActionSelectedException
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.
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.
CompleteTaskResult
containing the status of the task completion.
TaskManagerException
NoActionSelectedException
CompleteTaskResult terminateTask(long aTaskId) throws TaskManagerException
The user must be in the process administrator role (and will usually be the system user).
aTaskId
- The identifier of the task to terminate.
CompleteTaskResult
containing the status of the task termination.
TaskManagerException
CompleteTaskResult[] terminateTasksForJobId(java.lang.String jobId) throws TaskManagerException
The user must be in the process administrator role (and will usually be the system user).
jobId
- The long lived job id which you wish to have tasks terminated for.
CompleteTaskResult
array containing the status of task terminations.
TaskManagerException
void sendTaskReminder(long aTaskId, boolean aChangeInstructions, java.lang.String aReminderInstructions, long aNextReminder) throws TaskManagerException
The user sends the reminder (and is probably a system user).
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.
TaskManagerException
void sendTaskReminder(long aTaskId, boolean aChangeInstructions, java.lang.String aReminderInstructions, long aNextReminder, boolean aNextReminderBusDays) throws TaskManagerException
The user sends the reminder (and is probably a system user).
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
TaskManagerException
void updateHardenedPath(long aTaskId, java.lang.String aHardenedPath) throws TaskManagerException
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.
aTaskId
- The task for which to update the hardened path.aHardenedPath
- The hardened path to update.
TaskManagerException
SaveTaskResult save(long taskId, FormInstance aFormData) throws TaskManagerException
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.
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.
SaveTaskResult
object containing the name of the action that was selected.
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.FormInstance getFormInstanceForTask(long aTaskId) throws TaskManagerException
TaskManager.getFormInstanceForTask(long taskID, long aFormInstanceId)
instead.
FormInstance
object associated with a task.
The user requests the FormInstance
data and must be the owner of the current assignment for this task.
aTaskId
- The identifier of the task data being retrieved.
FormInstance
object populated with the template path and XML data.
TaskManagerException
- if the user does not have access to this task.FormInstance getFormInstanceForTask(long aTaskId, boolean aRetrieveData) throws TaskManagerException
TaskManager.getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData)
instead.
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.
aTaskId
- The identifier of the task data being retrieved.aRetrieveData
- Specify true
to populate the data in the resulting object.
FormInstance
object populated with the template path and XML data.
TaskManagerException
- if the user does not have access to this task.AttachmentInfo newAttachmentInfo()
AttachmentInfo
object.
AttachmentInfo
object.AttachmentInfo[] getAllAttachments(long taskId) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task identifier.
AttachmentInfo
objects representing all currently readable (visible) attachments for this task.
TaskManagerException
- if the user does not have access to this task.AttachmentInfo getAttachmentInfo(long taskId, long attachmentId) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task identifier.attachmentId
- The attachment identifier.
TaskManagerException
- if the user does not have access to this task.AttachmentInfo updateAttachmentInfo(long taskId, AttachmentInfo attachmentInfo) throws TaskManagerException
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.
attachmentInfo
- Specifies the attachment information to modify.taskId
- The task identifier.
TaskManagerException
AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, java.io.InputStream attachmentStream) throws TaskManagerException
AttachmentInfo.TYPE_ATTACHMENT
to the specified task.
The task must be assigned to the user.
taskId
- The task identifier.attachmentInfo
- The AttachmentInfo
object populated with the relevant information.attachmentStream
- The new attachment content, represented as a stream.
AttachmentInfo
object for this attachment, with the newly created attachment identifier set.
TaskManagerException
AttachmentInfo addNote(long taskId, AttachmentInfo attachmentInfo) throws TaskManagerException
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.
taskId
- The task identifier.attachmentInfo
- The AttachmentInfo
object populated with the relevant information.
AttachmentInfo
object for this note with the newly created attachment identifier set.
TaskManagerException
AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, Document attachmentDocument) throws TaskManagerException
AttachmentInfo.TYPE_ATTACHMENT
to the specified task.
The task must be assigned to the user.
taskId
- The task identifier.attachmentInfo
- The AttachmentInfo
object populated with the relevant information.attachmentDocument
- The new attachment content as a Document
.
AttachmentInfo
for this attachment with the newly created attachment identifier set.
TaskManagerException
AttachmentInfo addAttachment(long taskId, AttachmentInfo attachmentInfo, byte[] attachmentBytes) throws TaskManagerException
AttachmentInfo.TYPE_ATTACHMENT
to the specified task.
The task must be assigned to the user.
taskId
- The task identifier.attachmentInfo
- An AttachmentInfo
object populated with the relevant information.attachmentBytes
- The new attachment's content in bytes.
AttachmentInfo
for this attachment with the newly created attachment identifier set.
TaskManagerException
void deleteAttachment(long taskId, long attachmentId) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task containing the attachment.attachmentId
- The attachment to be removed.
TaskManagerException
void updateAttachment(long taskId, long attachmentId, java.io.InputStream attachmentStream) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task containing the attachment.attachmentId
- The identifier for the attachment to be updated.attachmentStream
- A stream representing the attachment content.
TaskManagerException
- if the user does not have access to this task.void updateAttachment(long taskId, long attachmentId, Document attachmentDocument) throws TaskManagerException
The task must be assigned to the user.
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.
TaskManagerException
- if the user does not have access to this task.void updateAttachment(long taskId, long attachmentId, byte[] attachmentBytes) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task containing the attachment.attachmentId
- The identifier for the attachment to be updated.attachmentBytes
- A byte
array containing the attachment content.
TaskManagerException
- if the user does not have access to this task.Document readAttachmentDocument(long taskId, long attachmentId) throws TaskManagerException
Document
containing the binary content of the specified attachment.
The task must be assigned to the user.
taskId
- The task containing the attachment.attachmentId
- The identifier of the requested attachment.
Document
containing the requested attachment.
TaskManagerException
- if the user does not have access to this task.java.io.InputStream readAttachmentStream(long taskId, long attachmentId) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task containing the attachment.attachmentId
- The identifier of the requested attachment.
TaskManagerException
- if the user does not have access to this task.byte[] readAttachmentBytes(long taskId, long attachmentId) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task containing the attachment.attachmentId
- The identifier of the requested attachment.
byte
array containing the requested attachment.
TaskManagerException
- if the user does not have access to this task.java.lang.String readFullNoteContent(long taskId, long attachmentId) throws TaskManagerException
The task must be assigned to the user.
taskId
- The task with which the note is associated.attachmentId
- The identifier of the requested note.
String
containing the requested note content.
TaskManagerException
- if the user does not have access to this task.void copyAttachmentsToTask(long taskId, java.util.List attachmentList) throws TaskManagerException
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.
taskId
- The task with which the attachment is associated.attachmentList
- The List
of attachments to be added.
TaskManagerException
- if
the user does not have access to this task or if the objects contained in the list
are not Document
objects.java.util.List getAttachmentListForTask(long taskId) throws TaskManagerException
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.
taskId
- The task with which the attachment is associated.
java.util.List
of Document
objects, each of which is an attachment.
TaskManagerException
- if the user does not have access to this task
or if the objects contained in the list are not Document
objects.java.lang.String getCompletionNote(long taskId) throws TaskManagerException
taskId
- The task to retrieve the completion note for
TaskManagerException
- if the user calling is not assigned the task.void setCompletionNote(long taskId, java.lang.String completionNote) throws TaskManagerException
taskId
- task id to set the completion notecompletionNote
- String representing the note
TaskManagerException
- if the user does not have the task assigned to them, or the task is completed.FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId) throws TaskManagerException
FormInstance
object associated with a task.
The user requests the FormInstance
data and must be the owner of the current assignment for this task.
aTaskId
- The identifier for the task data being retrieved.aFormInstanceId
- The FormInstance
identifier.
FormInstance
object populated with the template path and XML data.
TaskManagerException
- if the user does not have access to this task.FormInstance getFormInstanceForTask(long aTaskId, long aFormInstanceId, boolean aRetrieveData) throws TaskManagerException
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.
aTaskId
- The identifier for the task data being retrieved. aRetrieveData
- true
to populate the data in the resulting object, false
otherwise.
FormInstance
object populated with the template path and XML data.
TaskManagerException
- if the user does not have access to this task.CreateTaskResult createTask(CreateTaskInfo createTaskInfo) throws TaskManagerException
If no queue identifier is specified, the default queue for the user for the calling context will be assigned the task.
createTaskInfo
- A value object containing all of the relevant information required to create a task.
TaskManagerException
TaskInfo getTaskInfo(long taskID) throws TaskManagerException
taskID
- The identifier of the task being returned.
TaskInfo
object populated with all of the information about the task.
TaskManagerException
TaskInfo getTaskInfo(long taskID, boolean returnFormInstance) throws TaskManagerException
taskID
- The identifier of the task being returned.returnFormInstance
- Indicates whether the data for any forms associated with the task should be returned.
TaskInfo
object populated with all of the information about the task.
TaskManagerException
TaskUserInfo[] getUsersWithAccessToTask(long taskId) throws TaskManagerException
You can determine if a particular user is the task owner by calling the
TaskUserInfo.isTaskOwner()
method of the returned object.
taskId
- The task identifier.
TaskManagerException
void modifyTaskPermissions(long aTaskID, TaskACL[] permissions) throws TaskManagerException
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.
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.
TaskManagerException
- if the user is not currently assigned the task
or if the user does not have permissions to change the task.void lockTask(long taskID) throws TaskManagerException
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.
taskID
- The identifier of the task to be locked.
TaskManagerException
- if the user calling this method
is not the current owner of the task.void unLockTask(long taskID) throws TaskManagerException
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.
taskID
- The identifier of the task to be unlocked.
TaskManagerException
- if the user calling this method is not the current owner of the taskvoid consultTask(long taskId, java.lang.String userIdToForward) throws TaskManagerException
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.
taskId
- The identifier of the task.userIdToForward
- The identifier of the user to be consulted.
TaskManagerException
void changeDeadline(long taskID, java.util.Date newDeadline) throws TaskManagerException
taskID
- The identifier of the task.newDeadline
- The date of the new deadline.
TaskManagerException
void claimTask(long taskId, boolean lockTask) throws TaskManagerException
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()
.
taskId
- The identifier of the task being claimed.lockTask
- true
if the task should also be locked in the same transaction, false
otherwise.
TaskManagerException
- if
ImageTicket reconstructImageTicket(java.lang.String aSerializedValue)
ImageTicket
object.
aSerializedValue
- The image ticket's serialized value.
ImageTicket
object for this serialized value.ImageTicket.getSerializedValue()
Document getImage(ImageTicket imageTicket) throws TaskManagerException
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
.
Document
.
TaskManagerException
TaskInfo.getImageTicket()
,
TaskRow.getImageTicket()
FormServiceInvokeResponse callRenderService(long taskId, long formId, java.util.Map inputMap) throws TaskManagerException
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.
FormServiceInvokeResponse
object populated with the rendered form.
TaskManagerException
FormServiceInvokeResponse callSubmitService(long taskId, long formId, Document documentSubmitted, java.util.Map inputMap) throws TaskManagerException
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.
FormServiceInvokeResponse
object populated with the processed submitted content.
TaskManagerException
void setVisibility(long taskId, boolean visible) throws TaskManagerException
taskId
- The task identifier.visible
- false
if the task is to be visible, true
otherwise.
TaskManagerException
- if the task is active or the user does not own the task.void changeDescription(java.lang.Long taskId, java.lang.String updatedDescription) throws TaskManagerException
taskId
- Task to change the description forupdatedDescription
- Updated description Text.
TaskManagerException
- If a user other than the currently assigned user calls this method.TaskUIInfo retrieveTaskUI(long taskId, boolean approvalContainer) throws TaskManagerException
taskId
- The task you are attempting to load the Custom UI forapprovalContainer
- 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
TaskManagerException
- If no custom UI or Approval Container is specified for this task.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |