Designing and Implementing Business Process Models : Task Engine API and Service Reference : Using the Task Engine Web Service API : updateTask
updateTask
Modifies an existing task instance on the Task Engine. You use this operation to change information in the task's TaskInfo and TaskData objects. By default, this operation enables you to update only tasks in Active, Error, and Suspended state; for information about updating tasks with other statuses, see Usage Notes, below.
The TaskInfo object contains standard information about a task, including its status, expiration date, and the list of users to which it is assigned. The TaskData object contains the business data that is associated with the task.
This is the operation a client program would use if it needed to change the status of a task. For example, if a program wanted to end a task, it would use this operation to change the status field in the task's TaskInfo object to "completed" or "cancelled" as appropriate.
Input Message
taskData
Map The Map object that contains the business data that you want to assign to the task. See TaskData for a description of the Map object used by taskData.
taskID
String The ID that identifies the task that you want to modify.
taskInfo
TaskInfo Object that specifies the changes you want to make to the data in the task's TaskInfo object. See TaskInfo for a description of the fields in this object.
user
String Optional. The user ID of the My webMethods Server user on whose behalf this operation executes.
If user is not specified, the administrative user ID under which your client program logged on is used.
Output Message
None.
Usage Notes
To modify a task using this operation, you must supply the ID of the task that you want to update. To obtain this ID, use the searchTasks operation to locate the task and then extract the task ID from the result set that the searchTasks operation returns.
To modify a task successfully, the user ID in user must have permission to access the specified task. If the supplied ID does not have access to the task, or if the specified task does not exist, an exception is thrown.
When you use this operation to update information in the task's TaskInfo object, the Task Engine modifies only the fields to which you have assigned values in taskInfo. All other fields in the target task retain their existing values. For example, to change just the name assigned to a task, you would set only the name field in the TaskInfo object that you pass to this service.
When you use this operation to update information in the task's TaskData object, the object that you pass to the service in taskData replaces the task's existing TaskData object in its entirety.
By default, this operation enables you to update only tasks in Active, Error, and Suspended state. Tasks with other statuses such as Completed, Canceled, or Expired cannot be updated.
However, a Task Engine optional setting, -Dupdate.completed.task=true, is available to apply update actions to a task regardless of its current status. When this option is not present or set to = false, task updates apply only to tasks in Active, Error, or Suspended status.
For information about setting this option, see “Specifying Task Update Behavior” and “Applying Task Engine Optional Settings” in Chapter 6 of the PDF publication, webMethods Task Engine User’s Guide.
Copyright © 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback