Process/Instances/StartInstance

Starts a new process instance with the data posted.

URI


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

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

Elements and Attributes

<?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"
					ExpectedDuration="20" FullName="K2 Examples\Order Process" Folio="Order-ACME" Priority="3">
					<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.

 

POST /K2Services/REST.svc/Process/Instances/StartInstance?piDataField=true&piXmlField=true

					<?xml version="1.0" encoding="utf-8"?>
					<ProcessInstance ExpectedDuration="20" Folder="K2 Example " Folio="Order-ACME" FullName="K2 Example\Order Process" Guid="b8cf5da7-7cf9-4af2-abc6-7fb91a69354c" ID="8" Name="Order Process" Priority="3" StartDate="2011-02-16T04:52:47.6876172Z"Status="Running" xmlns="http://schemas.k2.com/worklist/d1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
					<Description xmlns="http://schemas.k2.com/process/d1"/>
					<Metadata xmlns="http://schemas.k2.com/process/d1">Blank</Metadata>
					<DataField Name="MyProcessDataField" xmlns="http://schemas.k2.com/process/d1">Some process data value</DataField>
					<XmlField Name="MyProcessXMLField" xmlns="http://schemas.k2.com/process/d1"><XmlDocument>Some Process XML document</XmlDocument></XmlField>
					</ProcessInstance>