Create a New Dynamic Process Instance
/ic/api/process/v1/dp-instances
Request
- application/json
-
processDefinitionId: string
ID of the dynamic process definition.
-
processDefinitionKey: string
key provided at design time for the dynamic process.
object
object
object
Response
- application/json
201 Response
object
-
object
CommonModel
Discriminator:
links
-
object
CreateInstanceOutput-allOf[1]
object
-
description:
string
Description of the process.
-
id:
string
Instance ID of newly created instance
-
processDefinitionId:
string
Process definition ID
-
state:
string
Default Value:
ACTIVE
Allowed Values:[ "ACTIVE", "COMPLETED", "TERMINATED" ]
Current satus of the instance -
title:
string
Title of the instance
400 Response
401 Response
403 Response
404 Response
500 Response
Examples
These examples show how to create a dynamic process instance from a deployed dynamic process definition. First, you get the ID or key from the deployed dynamic process definition, then you create the dynamic process instance.
Get Deployed Dynamic Process Definitions
Send Request:
curl -X GET -H 'Authorization: Bearer access_token' -H "Accept: application/json" https://example.com/ic/api/process/v1/dp-definitions
Where,
-
example.com
is the host where Oracle Integration is running.
Response:
{ "links": [ { "href": "http://localhost:7001/ic/api/process/v1/dp-definitions", "rel": "self" }, { "href": "http://localhost:7001/ic/api/process/v1", "rel": "parent" } ], "items": [ { "links": [ { "href": "http://localhost:7001/ic/api/process/v1/dp-definitions/cm_DPfe8e5ra8is:1:5", "rel": "self" }, { "href": "http://localhost:7001/ic/api/process/v1/dp-definitions", "rel": "parent" }, { "href": "http://localhost:7001/ic/api/process/v1/dp-definitions/cm_DPfe8e5ra8is:1:5/metadata", "rel": "rel" }, { "href": "http://localhost:7001/ic/api/process/v1/dp-definitions/cm_DPfe8e5ra8is:1:5/interface", "rel": "rel" } ], "id": "cm_DPfe8e5ra8is:1:5", "key": "cm_DPfe8e5ra8is", "category": "pcs/Application123*soa_9485f556-58aa-49c9-968d-7be98f87ac13", "name": "NoFormDynamicProcess", "version": 1, "resource": "DPfe8e5ra8is.cmmn", "deploymentId": "1", "description": "form", "formMetadataURL": "webforms/pcs~Application123*soa_9485f556-58aa-49c9-968d-7be98f87ac13~11773c93-70b5-46d2-9dbb-8a94c91c0793~8a5ba429-577e-47ab-878c-cea3a1d97de9", "formInputParam": "formArg" } ] }
Create a Dynamic Process Instance by Specifying the Process Definition ID
You can create a dynamic process instance by specifying the ID or key of the process definitions with processDefinitionId=id
or processDefinitionKey=key
.
Send Request:
For example, if you specify the process definition ID:
curl -u jsmith:password -H "Content-Type:application/json" -H "Accept: application/json" -X POST -d '{"formArg": {"arg1": "value1", "arg2": 2}}' https://example.com/ic/api/process/v1/dp-instances?processDefinitionId=cm_DPfe8e5ra8is:1:5
Where,
-
example.com
is the host where Oracle Integration is running.
In the Request body, we specified the dynamic process instance start variables with values. In this example, a form with two attributes is specified, arg1 and arg2.
{"formArg": {"arg1": "value1", "arg2": 2}}Response:
{ "links": [ { "href": "http://example.com/ic/api/process/v1/dp-instances/7402", "rel": "self" }, { "href": "http://example.com/ic/api/process/v1/dp-instances", "rel": "parent" }, { "href": "http://example.com/ic/api/process/v1/dp-instances/7402/variables", "rel": "rel" }, { "href": "http://example.com/ic/api/process/v1/dp-instances/7402/folders", "rel": "folders" } ], "id": "7402", "processDefinitionId": "cm_DPfe8e5ra8is:6:7112", "title": "NoFormDynamicProcess", "state": "ACTIVE", "description": null }
Create a Dynamic Process Instance by Specifying the Process Definition Key
You can create a dynamic process instance by specifying the ID or key of the process definitions with processDefinitionId=id
or processDefinitionKey=key
.
Send Request:
For example, if you specify the process definition key:
curl -u jsmith:password -H "Content-Type:application/json" -H "Accept: application/json" -X POST -d '{"formArg": {"arg1": "value1", "arg2": 2}}' https://example.com/ic/api/process/v1/dp-instances?processDefinitionKey=cm_DPikkv9ujdfi
Where,
-
example.com
is the host where Oracle Integration is running.
In the Request body, we specified the dynamic process instance start variables with values. In this example, a form with two attributes is specified, arg1 and arg2.
{"formArg": {"arg1": "value1", "arg2": 2}}
Response:
{ "links": [ { "href": "https://localhost:443/ic/api/process/v1/dp-instances", "rel": "self" }, { "href": "https://localhost:443/ic/api/process/v1", "rel": "parent" }, { "href": "https://localhost:443/ic/api/process/v1/dp-instances/variables", "rel": "rel" }, { "href": "https://localhost:443/ic/api/process/v1/dp-instances/folders", "rel": "folders" } ], "id": "2928", "processDefinitionId": "cm_DPikkv9ujdfi:2:2534", "title": "isDP3", "state": "ACTIVE", "description": "isDP3" }