新しい動的プロセス・インスタンスを作成
/ic/api/process/v1/dp-instances
リクエスト
- application/json
- processDefinitionId: string
動的プロセス定義のID。
- processDefinitionKey: string
動的プロセスの設計時に提供されるキー。
レスポンス
- application/json
201レスポンス
object- object CommonModel
識別子:
links - object CreateInstanceOutput-allOf[1]
object- description: string
プロセスの説明。
- id: string
新規作成されたインスタンスのインスタンスID
- processDefinitionId: string
プロセス定義ID
- state: string
デフォルト値:
ACTIVE許容値:[ "ACTIVE", "COMPLETED", "TERMINATED" ]インスタンスの現在満足度 - title: string
インスタンスのタイトル
400レスポンス
401レスポンス
403レスポンス
404レスポンス
500レスポンス
例
これらの例では、デプロイ済動的プロセス定義から動的プロセス・インスタンスを作成する方法について説明します。 まず、デプロイ済の動的プロセス定義からIDまたはキーを取得し、次に動的プロセス・インスタンスを作成します。
デプロイ済動的プロセス定義の取得
リクエストの送信:
curl -X GET -H 'Authorization: Bearer access_token' -H "Accept: application/json" https://example.com/ic/api/process/v1/dp-definitions説明
-
example.comは、Oracle Integrationが実行されているホストです。
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"
}
]
}プロセス定義IDの指定による動的プロセス・インスタンスの作成
processDefinitionId=idまたはprocessDefinitionKey=keyを使用してプロセス定義のIDまたはキーを指定することにより、動的プロセス・インスタンスを作成できます。
リクエストの送信:
たとえば、プロセス定義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説明
-
example.comは、Oracle Integrationが実行されているホストです。
リクエスト本文で、値を持つ動的プロセス・インスタンス開始変数を指定しました。 この例では、2つの属性(arg1と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
}プロセス定義キーの指定による動的プロセス・インスタンスの作成
processDefinitionId=idまたはprocessDefinitionKey=keyを使用してプロセス定義の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?processDefinitionKey=cm_DPikkv9ujdfi説明
-
example.comは、Oracle Integrationが実行されているホストです。
リクエスト本文で、値を持つ動的プロセス・インスタンス開始変数を指定しました。 この例では、2つの属性(arg1と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"
}