Task Engine 10.7 | Task Engine Webhelp | webMethods Task Engine API and Service Reference | Using the Task Engine RESTful Web Services in Integration Server | POST a New Task Instance
 
POST a New Task Instance
This REST request creates a new task instance and adds it to the Task Engine queue. The underlying built-in service is pub.task.taskclient:queueTask.
Use this HTTP request and include optional parameters in the request body:
POST /rest/pub/opentask
Input Parameters
CallbackData
Document Optional. Any data that you want the task to pass back to the callback service.
CallbackServiceName
String Optional. The name of a service on this Integration Server that will execute when the task ends (that is, when the status of the task changes to "completed," "cancelled," "expired," or "error").
Example: customer.accounts:closeAccount The signature of the callback service must match the specification described in pub.task:TaskCallbackService.
ruleSet
String Optional. The name of the rule set to be applied for this task. This must match one of the rule set names defined for the task in the task editor in Software AG Designer. When a rule set is specified, only the assignments and events for the specified rule set will be executed for this task instance.
taskData or TaskData
Document Optional. The TaskData document that contains the business data that you want to associate with the task. TaskData does not have a specified structure. The content varies according to the task
taskQueueInfo or TaskQueueInfo
Document Optional. A TaskQueueInfo document containing basic information about the task (for example, name, priority, list of users to which the task is assigned). See pub.task:TaskQueueInfo for a description of the fields in this document.
taskTypeID
String Specifies the type of task that you want to queue. Each task type that is deployed to the Task Engine has a unique ID. This ID is assigned by the developer when he or she creates a task application using Software AG Designer. If you do not know the ID for the task type that you want to queue, contact the administrator of the Task Engine to which Integration Server is connected. An administrator can obtain a list of the task types deployed on the Task Engine by viewing the Task Configuration panel on the Task Engine Administration page in My webMethods.
user
String Optional. The user ID of the My webMethods Server user on whose behalf this service will execute. If user is not specified, the user ID associated with the WmTaskClient package is used. For information about configuring this user ID, see webMethods Task Engine User’s Guide.
Output Parameters
TaskID
String The identifier that the Task Engine assigns to the task instance.
Usage Notes
The user ID specified in user must have permission to queue tasks on the Task Engine. If the supplied ID does not have this permission, an exception is generated.