Create a process instance

Details

URI /processinstances
Method POST
Parameters

userIdentifier=<user_id>
    Required; the user ID you want to use as credentials for this API call. See Get userIdentifier for the steps required to get the userIdentifier value.

Request Body ProcessInstance VO
Response Body ProcessInstance VO
Returns

200 - Ok
401 - Not authorized

404 - Not found
500 - Server exception

The following must be provide in the request body:

  • Process definition ID.
  • Context string. Includes contextual information that is relevant for the caller after the process instance has been created.
  • Artifact ID.
  • Properties. The properties provided here will be merged with the process definition properties.

Two implicit tokens (reserved flow input variable names) are provided to process instances executed through the OO execution engine.

  • CSA_PROCESS_ID - will be provided the value of the UUID of the process instance.
  • CSA_CONTEXT_ID - will be provided the value of the Artifact ID. This is the artifact for which this process instance executes.

The following was sent to create a process instance:

https://<host>:<port>/csa/rest/processinstances/?userIdentifier=90d9652b35f35a930135f35b327e00a0

The following XML was sent in the request:

<ProcessInstance>>
   <property>
     <isCriticalSystemObject>false</isCriticalSystemObject>
     <name>Unit Test Process Instance Property</name>
     <paramRoleType>
       <isCriticalSystemObject>false</isCriticalSystemObject>
       <name>INPUT</name>
       <disabled>false</disabled>
     </paramRoleType>
     <valueType>
       <isCriticalSystemObject>false</isCriticalSystemObject>
       <name>STRING</name>
       <disabled>false</disabled>
     </valueType>
     <values>
       <value>Unit Test Process Instance Property Value</value>
     </values>
     <maxOccurs>0</maxOccurs>
     <minOccurs>0</minOccurs>
     <orderIndex>0</orderIndex>
     <confidential>false</confidential>
     <encrypted>false</encrypted>
     <readOnly>false</readOnly>
   </property>
   <processDefinition>
     <id>90d9652b35f41cbc0135f41cf1310004</id>
     <name>Unit Test Process Definition 1</name>
   </processDefinition>
   <processInstanceState>
     <isCriticalSystemObject>false</isCriticalSystemObject>
     <name>INITIALIZED</name>
     <disabled>false</disabled>
   </processInstanceState>
   <context>Context for Unit Test Process Instance</context>
   <artifactId>ID of the artifact executing the action</artifactId>
   <timeout>3600</timeout>
   <errorOnTimeout>false</errorOnTimeout>
 </ProcessInstance>