Worklist/Items/ExecuteAction

Executes the action specified and updates the worklist item with the data posted.

  • Only actions which have been configured to support batch processing can be updated via this GET method.  Use the Worklist/Items/Execute service to action items that do not support batch processing.
  • The Worklist service can only execute process specific actions for a single item.  Use the Task service to action items with system actions (Delegate, Redirect or Sleep) and perform batch processing.

URI

{Service Root URI}/Worklist/Items/ExecuteAction?{Query Options}
https://api.denallix.com:443/K2Services/REST.svc/Worklist/Items/ExecuteAction

Method

POST

This method cannot be called via URI construction in the address bar of standard browsers.  Tooling such as Fiddler or .NET code may be required to execute the POST.

Query Options

Required

Optional

Request Headers

Ensure that the request has at least these headers set.

Authorization: Basic {encrypted token goes here}
Content-type: application/xml

Request Body

The request body contains the WorklistItem represented as XML.  The Worklist Item XML returned from Worklist GET methods can be used as a starting point for the XML input of this POST method.  Any invalid elements or attributes will be ignored.

The WorklistItem XML consists of the following.

Namespaces

The WorklistItem XML requires namespaces to be defined.

Elements and Attributes

Request Body Example

<?xml version="1.0" encoding="utf-8"?>                <w:WorklistItem SerialNumber="25_72" xmlns:w="http://schemas.k2.com/worklist/d1" xmlns:p="http://schemas.k2.com/process/d1" xmlns:a="http://schemas.k2.com/activity/d1">                 <p:ProcessInstance ExpectedDuration="40" Priority="4" Folio="Updated Folio">                  <p:DataField Name="MyProcessDataField">My process data field updated</p:DataField>                 </p:ProcessInstance>                </w:WorklistItem>

Return Type

Success/Failure

Due to the asynchronous nature of the POST, a successful call may not return anything depending on the tooling used to execute the POST.

Return Example

POST /K2Services/SyncREST.svc/Worklist/Items/ExecuteAction?action=Rework&synchronous=true

{Raw}
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 0
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
X-UA-Compatible: IE=EmulateIE7
Date: Wed, 16 Feb 2011 03:01:36 GMT