Process/Instances/UpdateProcessInstance

Updates an existing process instance with the data posted.

URI

{Service Root URI}/Process/Instances/UpdateProcessInstance?{Query Options}
https://api.denallix.com:443/K2Services/REST.svc/Process/Instances/UpdateProcessInstance?synchronous=true

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

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 ProcessInstance item represented as XML.  The ProcessInstance item XML returned from Process 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 ProcessInstance XML consists of the following.

Namespaces

The ProcessInstance XML requires namespaces to be defined.
• xmlns:w="http://schemas.k2.com/worklist/d1" (required) – contains the process instance and nodes
• xmlns:p="http://schemas.k2.com/process/d1" (optional) – contains the nodes for process and activity data fields when provided

Elements and Attributes

Request Body Example

<?xml version="1.0" encoding="utf-8"?>                <w:ProcessInstance xmlns:w="http://schemas.k2.com/worklist/d1" xmlns:p="http://schemas.k2.com/process/d1" ID="8" Priority="1" Folio="Order-ACME-Updated" ExpectedDuration="60">                 <p:DataField Name="MyProcessDataField">Some process data value</p:DataField>                 <p:XmlField Name="MyProcessXMLField"><XmlDocument>Some Process XML document</XmlDocument></p:XmlField>                </w:ProcessInstance>

Return Type

ProcessInstance or 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/REST.svc/Process/Instances/UpdateProcessInstance

{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 05:20:57 GMT