Create a New Dynamic Process Instance

post

/ic/api/process/v1/dp-instances

Create a new instance of the dynamic process.

Request

Supported Media Types
Query Parameters
Body ()
Variable to create.
Root Schema : CreateInstanceInput
Type: object
Additional Properties Allowed
Show Source
a (key, MapItem) map. `default`is an example key
Show Source
Nested Schema : default
Type: object
Nested Schema : additionalProperties
Type: object
Back to Top

Response

Supported Media Types

201 Response

Successful operation
Body ()
Root Schema : CreateInstanceOutput
Type: object
Match All
Show Source
Nested Schema : CommonModel
Type: object
Discriminator: links
Show Source
Nested Schema : CreateInstanceOutput-allOf[1]
Type: object
Show Source

400 Response

Returned if the body parameter is not valid.

401 Response

Unauthorized

403 Response

The process execution cannot be instantiated because of CMMN restrictions.

404 Response

Dynamic process definition does not exist.

500 Response

Internal Server Error.
Back to Top

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"
}
Back to Top