Process Endpoint and Methods

The process resource can be accessed via the api/process endpoint.

Using the POST method with the Process Endpoint

The POST method will start a new process instance with the specified parameters.

JSON Examples

JSON Request

{
    "DataFields": [
        {
            "Name": "DataField1Name",
            "Value": "DataField1Value"
        },
        {
            "Name": "DataField2Name",
            "Value": "DataField2Value"
        }
    ],
    "XmlFields": [
        {
            "Name": "XmlField1Name",
            "Value": "<xmlData1 />"
        },
        {
            "Name": "XmlField2Name",
            "Value": "<xmlData2 />"
        }
    ],
    "Name": "Process1",
    "FullName": "K2WorkflowProject\\Process1",
    "Description": "Some Workflow",
    "ExpectedDuration": "400.22:14:17.6040000",
    "Priority": 2
}

JSON Response

{
    "DataFields": [
        {
            "Name": "DataField1Name",
            "Value": "DataField1Value"
        },
        {
            "Name": "DataField2Name",
            "Value": "DataField2Value"
        }
    ],
    "XmlFields": [
        {
            "Name": "XmlField1Name",
            "Value": "<xmlData1 />"
        },
        {
            "Name": "XmlField2Name",
            "Value": "<xmlData2 />"
        }
    ],
    "Name": "Process1",
    "FullName": "K2WorkflowProject\\Process1",
    "Description": "Some Workflow",
    "ExpectedDuration": "400.22:14:17.6040000",
    "Guid": "5e6ee90e-27be-4f4f-888d-0a2a870318d5",
    "Id": 100,
    "Priority": 2,
    "StartDate": "2013-10-23T17:33:45.5763696+02:00",
    "Status": 2
}

XML Examples

XML Request

<WorkflowInstance
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://schemas.k2.com/2013/web/rest/process.xsd">
  <DataFields
        xmlns:d2p1="http://schemas.k2.com/2013/web/rest/worklistitem.xsd">
    <d2p1:DataField>
      <d2p1:Name>DataField1Name</d2p1:Name>
      <d2p1:Value>DataField1Value</d2p1:Value>
    </d2p1:DataField>
    <d2p1:DataField>
      <d2p1:Name>DataField2Name</d2p1:Name>
      <d2p1:Value>DataField2Value</d2p1:Value>
    </d2p1:DataField>
  </DataFields>
  <Description>Some Workflow</Description>
  <ExpectedDuration>P400DT22H14M17.604S</ExpectedDuration>
  <FullName>K2WorkflowProject\Process1</FullName>
  <Priority>2</Priority>
  <XmlFields
        xmlns:d2p1="http://schemas.k2.com/2013/web/rest/worklistitem.xsd">
    <d2p1:XmlField>
      <d2p1:Name>XmlField1Name</d2p1:Name>
      <d2p1:Value>&lt;xmlData1 /&gt;</d2p1:Value>
    </d2p1:XmlField>
    <d2p1:XmlField>
      <d2p1:Name>XmlField2Name</d2p1:Name>
      <d2p1:Value>&lt;xmlData2 /&gt;</d2p1:Value>
    </d2p1:XmlField>
  </XmlFields>
</WorkflowInstance>

XML Response

<WorkflowInstance
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://schemas.k2.com/2013/web/rest/process.xsd">
  <DataFields
        xmlns:d2p1="http://schemas.k2.com/2013/web/rest/worklistitem.xsd">
    <d2p1:DataField>
      <d2p1:Name>DataField1Name</d2p1:Name>
      <d2p1:Value>DataField1Value</d2p1:Value>
    </d2p1:DataField>
    <d2p1:DataField>
      <d2p1:Name>DataField2Name</d2p1:Name>
      <d2p1:Value>DataField2Value</d2p1:Value>
    </d2p1:DataField>
  </DataFields>
  <Description>Some Workflow</Description>
  <ExpectedDuration>P400DT22H14M17.604S</ExpectedDuration>
  <FullName>K2WorkflowProject\Process1</FullName>
  <Guid>03598c07-7a56-45e0-bc1a-b26317c8a10e</Guid>
  <Id>100</Id>
  <Name>Process1</Name>
  <Priority>2</Priority>
  <StartDate>2013-10-23T17:33:29.1048281+02:00</StartDate>
  <Status>Active</Status>
  <XmlFields
        xmlns:d2p1="http://schemas.k2.com/2013/web/rest/worklistitem.xsd">
    <d2p1:XmlField>
      <d2p1:Name>XmlField1Name</d2p1:Name>
      <d2p1:Value>&lt;xmlData1 /&gt;</d2p1:Value>
    </d2p1:XmlField>
    <d2p1:XmlField>
      <d2p1:Name>XmlField2Name</d2p1:Name>
      <d2p1:Value>&lt;xmlData2 /&gt;</d2p1:Value>
    </d2p1:XmlField>
  </XmlFields>
</WorkflowInstance>

K2 blackpearl Developers Reference4.7
Video Links Learn Support
No videos found for this article
K2 on YouTube
No Additional links found for this article
No self-learning content for this article
Try some scenarios...
No relevant support links available for this article