メソッドの概要

返却値の型 メソッド名
ResultObject getBpmnModel (String processDefinitionId)
指定したプロセス定義のモデルを取得します。
ResultObject getProcessDefinition (String processDefinitionId)
プロセス定義IDより、プロセス定義情報を取得します。

メソッドの詳細

ResultObject getBpmnModel (String processDefinitionId)
指定したプロセス定義のモデルを取得します。
パラメータ
processDefinitionId : String
プロセス定義ID
返却値
ResultObject
ResultObject 処理結果
data プロパティには、JavaEE開発モデルAPI BpmnModelと同一の構造のスクリプト開発モデルのオブジェクトが設定されます。
(値がNullの要素については出力されません)

注意

以下のプロパティについては、BpmnModelとdataプロパティとの間でプロパティ名が異なります。
BpmnModel内でのプロパティ名 dataプロパティ内でのプロパティ名
BpmnModel#namespaceMap namespaces
Process#flowElementList flowElements
Process#artifactList artifacts
SubProcess#flowElementList flowElements
SubProcess#artifactList artifacts
ServiceTask#isExtended() extended
UserTask#isExtended() extended

処理結果オブジェクトの例

プロセス定義の設定内容に応じて返却される処理結果オブジェクトの例を記載しています。
簡略化のため、高い利用頻度が想定されるプロパティ以外を省略して記載しています。
例1:「開始イベント」 -> 「ユーザタスク」 ->「終了イベント」の3つのフローエレメントから構成されるシンプルなプロセス定義
    {
        "error" : false, 
        "errorMessage" : null, 
        "data" : {
            "processes" : [
                {
                    "id" : "simple_process",
                    "name" : "シンプルプロセス",
                    "executable" : true,
                    "lanes" : [
                    ], 
                    "dataObjects" : [], 
                    "candidateStarterUsers" : [
                        "tenant"
                    ],
                    "candidateStarterGroups" : [
                        "tenant_manager"
                    ],
                    "useAdHocTask" : false, 
                    "flowElements" : [
                        {
                            "id" : "start-event_1", 
                            "name" : "開始", 
                            "originalName" : "開始", 
                            "asynchronous" : false,
                            "notExclusive" : false, 
                            "incomingFlows" : [], 
                            "outgoingFlows" : [
                                {
                                    "id" : "sequence-flow_1",
                                    "sourceRef" : "start-event_1",
                                    "targetRef" : "user-task_1"
                                }
                            ],
                            "eventDefinitions" : [],
                            "formKey" : "forma:test_app",
                        },
                        {
                            "id" : "user-task_1", 
                            "name" : "ユーザタスク", 
                            "originalName" : "ユーザタスク", 
                            "asynchronous" : false, 
                            "notExclusive" : false, 
                            "incomingFlows" : [
                                {
                                    "id" : "sequence-flow_1",
                                    "sourceRef" : "start-event_1",
                                    "targetRef" : "user-task_1"
    
                                }
                            ], 
                            "outgoingFlows" : [
                                {
                                    "id" : "sequence-flow_2",
                                    "sourceRef" : "user-task_1", 
                                    "targetRef" : "end-event_1"
                                }
    
                            ],
                            "canAddMultiOptionTasks" : false,
                            "boundaryEvents" : [],
                            "assignee" : "tenant",
                            "formKey" : "forma:test_app",
                            "candidateUsers" : [],
                            "candidateGroups" : [],
                            "optional" : false
                        }, 
                        {
                            "id" : "end-event_1", 
                            "name" : "終了",
                            "originalName" : "終了",
                            "asynchronous" : false,
                            "notExclusive" : false,
                            "incomingFlows" : [
                                {
                                    "id" : "sequence-flow_2",
                                    "sourceRef" : "user-task_1",
                                    "targetRef" : "end-event_1"
    
                                }
                            ],
                            "outgoingFlows" : [], 
                            "eventDefinitions" : []
                        },
                        {
                            "id" : "sequence-flow_1",
                            "sourceRef" : "start-event_1",
                            "targetRef" : "user-task_1"
                        },
                        {
                            "id" : "sequence-flow_2",
                            "sourceRef" : "user-task_1",
                            "targetRef" : "end-event_1"
                        }
    
                    ]
                }
    
            ], 
            "signals" : [],
            "pools" : [], 
            "targetNamespace" : "http://www.intra-mart.jp/im_bpm", 
            "messages" : []
        }
    }
 
例2:サブプロセスを利用したプロセス定義
    {
      "error": false,
      "errorMessage" : null,
      "data": {
        "definitionsAttributes": {},
        "processes": [
          {
            "id": "sub_process",
            "name": "サブプロセス",
            "executable": true,
            "lanes": [],
            "dataObjects": [],
            "candidateStarterUsers": [
              "tenant"
            ],
            "candidateStarterGroups": [
              "tenant_manager"
            ],
            "useAdHocTask": false,
            "flowElements": [
              {
                "id": "sub-process_1",
                "name": "サブプロセス",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [
                  {
                    "id": "sequence-flow_3",
                    "sourceRef": "start-event_2",
                    "targetRef": "sub-process_1"
                  }
                ],
                "outgoingFlows": [
                  {
                    "id": "sequence-flow_4",
                    "sourceRef": "sub-process_1",
                    "targetRef": "end-event_2"
                  }
                ],
                "canAddMultiOptionTasks": false,
                "boundaryEvents": [],
                "dataObjects": [],
                "flowElements": [
                  {
                    "id": "start-event_1",
                    "name": "開始",
                    "originalName": "開始",
                    "asynchronous": false,
                    "notExclusive": false,
                    "incomingFlows": [],
                    "outgoingFlows": [
                      {
                        "id": "sequence-flow_1",
                        "sourceRef": "start-event_1",
                        "targetRef": "user-task_1"
                      }
                    ],
                    "eventDefinitions": [],
                    "formKey": "forma:test_app"
                  },
                  {
                    "id": "user-task_1",
                    "name": "ユーザタスク",
                    "originalName": "ユーザタスク",
                    "asynchronous": false,
                    "notExclusive": false,
                    "incomingFlows": [
                      {
                        "id": "sequence-flow_1",
                        "sourceRef": "start-event_1",
                        "targetRef": "user-task_1"
                      }
                    ],
                    "outgoingFlows": [
                      {
                        "id": "sequence-flow_2",
                        "sourceRef": "user-task_1",
                        "targetRef": "end-event_1"
                      }
                    ],
                    "canAddMultiOptionTasks": false,
                    "boundaryEvents": [],
                    "assignee": "tenant",
                    "formKey": "forma:test_app",
                    "candidateUsers": [],
                    "candidateGroups": [],
                    "optional": false
                  },
                  {
                    "id": "end-event_1",
                    "name": "終了",
                    "originalName": "終了",
                    "asynchronous": false,
                    "notExclusive": false,
                    "incomingFlows": [
                      {
                        "id": "sequence-flow_2",
                        "sourceRef": "user-task_1",
                        "targetRef": "end-event_1"
                      }
                    ],
                    "outgoingFlows": [],
                    "eventDefinitions": []
                  },
                  {
                    "id": "sequence-flow_1",
                    "sourceRef": "start-event_1",
                    "targetRef": "user-task_1"
                  },
                  {
                    "id": "sequence-flow_2",
                    "sourceRef": "user-task_1",
                    "targetRef": "end-event_1"
                  }
                ],
                "optional": false
              },
              {
                "id": "start-event_2",
                "name": "開始",
                "originalName": "開始",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [],
                "outgoingFlows": [
                  {
                    "id": "sequence-flow_3",
                    "sourceRef": "start-event_2",
                    "targetRef": "sub-process_1"
                  }
                ],
                "eventDefinitions": []
              },
              {
                "id": "end-event_2",
                "name": "終了",
                "originalName": "終了",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [
                  {
                    "id": "sequence-flow_4",
                    "sourceRef": "sub-process_1",
                    "targetRef": "end-event_2"
                  }
                ],
                "outgoingFlows": [],
                "eventDefinitions": []
              },
              {
                "id": "sequence-flow_3",
                "sourceRef": "start-event_2",
                "targetRef": "sub-process_1"
              },
              {
                "id": "sequence-flow_4",
                "sourceRef": "sub-process_1",
                "targetRef": "end-event_2"
              }
            ]
          }
        ],
        "signals": [],
        "pools": [],
        "targetNamespace": "http://www.intra-mart.jp/im_bpm",
        "messages": []
      }
    }
 
例3:プールを複数配置したプロセス定義
    {
      "error": false,
      "errorMessage" : null,
      "data": {
        "definitionsAttributes": {},
        "processes": [
          {
            "id": "pool1_process",
            "name": "プール1プロセス",
            "executable": true,
            "lanes": [
              {
                "id": "swimlane_2",
                "name": "レーン1-1",
                "flowReferences": [
                  "start-event_1",
                  "user-task_1"
                ]
              },
              {
                "id": "swimlane_1",
                "name": "レーン1-2",
                "flowReferences": [
                  "user-task_2",
                  "end-event_1"
                ]
              }
            ],
            "dataObjects": [],
            "candidateStarterUsers": [],
            "candidateStarterGroups": [],
            "useAdHocTask": false,
            "flowElements": [
              {
                "id": "start-event_1",
                "name": "開始",
                "originalName": "開始",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [],
                "outgoingFlows": [
                  {
                    "id": "sequence-flow_1",
                    "sourceRef": "start-event_1",
                    "targetRef": "user-task_1"
                  }
                ],
                "eventDefinitions": []
              },
              {
                "id": "user-task_1",
                "name": "ユーザタスク1",
                "originalName": "ユーザタスク1",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [
                  {
                    "id": "sequence-flow_1",
                    "sourceRef": "start-event_1",
                    "targetRef": "user-task_1"
                  }
                ],
                "outgoingFlows": [
                  {
                    "id": "sequence-flow_2",
                    "sourceRef": "user-task_1",
                    "targetRef": "user-task_2"
                  }
                ],
                "canAddMultiOptionTasks": false,
                "boundaryEvents": [],
                "candidateUsers": [],
                "candidateGroups": [],
                "optional": false
              },
              {
                "id": "user-task_2",
                "name": "ユーザタスク2",
                "originalName": "ユーザタスク2",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [
                  {
                    "id": "sequence-flow_2",
                    "sourceRef": "user-task_1",
                    "targetRef": "user-task_2"
                  }
                ],
                "outgoingFlows": [
                  {
                    "id": "sequence-flow_3",
                    "sourceRef": "user-task_2",
                    "targetRef": "end-event_1"
                  }
                ],
                "canAddMultiOptionTasks": false,
                "boundaryEvents": [],
                "candidateUsers": [],
                "candidateGroups": [],
                "optional": false
              },
              {
                "id": "end-event_1",
                "name": "終了",
                "originalName": "終了",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [
                  {
                    "id": "sequence-flow_3",
                    "sourceRef": "user-task_2",
                    "targetRef": "end-event_1"
                  }
                ],
                "outgoingFlows": [],
                "eventDefinitions": []
              },
              {
                "id": "sequence-flow_1",
                "sourceRef": "start-event_1",
                "targetRef": "user-task_1"
              },
              {
                "id": "sequence-flow_2",
                "sourceRef": "user-task_1",
                "targetRef": "user-task_2"
              },
              {
                "id": "sequence-flow_3",
                "sourceRef": "user-task_2",
                "targetRef": "end-event_1"
              }
            ]
          },
          {
            "id": "pool2_process",
            "name": "プール2プロセス",
            "executable": true,
            "lanes": [
              {
                "id": "swimlane_3",
                "name": "レーン2-1",
                "flowReferences": [
                  "start-event_2"
                ]
              },
              {
                "id": "swimlane_4",
                "name": "レーン2-2",
                "flowReferences": [
                  "end-event_2"
                ]
              }
            ],
            "dataObjects": [],
            "candidateStarterUsers": [],
            "candidateStarterGroups": [],
            "useAdHocTask": false,
            "flowElements": [
              {
                "id": "start-event_2",
                "name": "開始",
                "originalName": "開始",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [],
                "outgoingFlows": [
                  {
                    "id": "sequence-flow_4",
                    "sourceRef": "start-event_2",
                    "targetRef": "end-event_2"
                  }
                ],
                "eventDefinitions": []
              },
              {
                "id": "end-event_2",
                "name": "終了",
                "originalName": "終了",
                "asynchronous": false,
                "notExclusive": false,
                "incomingFlows": [
                  {
                    "id": "sequence-flow_4",
                    "sourceRef": "start-event_2",
                    "targetRef": "end-event_2"
                  }
                ],
                "outgoingFlows": [],
                "eventDefinitions": []
              },
              {
                "id": "sequence-flow_4",
                "sourceRef": "start-event_2",
                "targetRef": "end-event_2"
              }
            ]
          }
        ],
        "signals": [],
        "pools": [
          {
            "id": "pool_1",
            "name": "プール1",
            "processRef": "pool1_process",
            "executable": true
          },
          {
            "id": "pool_2",
            "name": "プール2",
            "processRef": "pool2_process",
            "executable": true
          }
        ],
        "targetNamespace": "http://www.intra-mart.jp/im_bpm",
        "messages": []
      }
    }
 
例4:メッセージキャッチイベントとシグナルイキャッチベントを利用したプロセス
    {
        "error": false,
        "errorMessage" : null,
        "data": {
          "processes": [
            {
              "id": "message_signal_process",
              "name": "メッセージシグナルプロセス",
              "executable": true,
              "lanes": [],
              "dataObjects": [],
              "candidateStarterUsers": [],
              "candidateStarterGroups": [],
              "useAdHocTask": false,
              "flowElements": [
                {
                  "id": "start-event_1",
                  "name": "開始",
                  "originalName": "開始",
                  "asynchronous": false,
                  "notExclusive": false,
                  "incomingFlows": [],
                  "outgoingFlows": [
                    {
                      "id": "sequence-flow_1",
                      "sourceRef": "start-event_1",
                      "targetRef": "message-catching-event_1"
                    }
                  ],
                  "eventDefinitions": []
                },
                {
                  "id": "message-catching-event_1",
                  "name": "メッセージキャッチイベント",
                  "originalName": "メッセージキャッチイベント",
                  "asynchronous": false,
                  "notExclusive": false,
                  "incomingFlows": [
                    {
                      "id": "sequence-flow_1",
                      "sourceRef": "start-event_1",
                      "targetRef": "message-catching-event_1"
                    }
                  ],
                  "outgoingFlows": [
                    {
                      "id": "sequence-flow_2",
                      "sourceRef": "message-catching-event_1",
                      "targetRef": "signal-catching-event_1"
                    }
                  ],
                  "eventDefinitions": [
                    {
                      "messageRef": "message"
                    }
                  ]
                },
                {
                  "id": "end-event_1",
                  "name": "終了",
                  "originalName": "終了",
                  "asynchronous": false,
                  "notExclusive": false,
                  "incomingFlows": [
                    {
                      "id": "sequence-flow_3",
                      "sourceRef": "signal-catching-event_1",
                      "targetRef": "end-event_1"
                    }
                  ],
                  "outgoingFlows": [],
                  "eventDefinitions": []
                },
                {
                  "id": "signal-catching-event_1",
                  "name": "シグナルキャッチイベント",
                  "originalName": "シグナルキャッチイベント",
                  "asynchronous": false,
                  "notExclusive": false,
                  "incomingFlows": [
                    {
                      "id": "sequence-flow_2",
                      "sourceRef": "message-catching-event_1",
                      "targetRef": "signal-catching-event_1"
                    }
                  ],
                  "outgoingFlows": [
                    {
                      "id": "sequence-flow_3",
                      "sourceRef": "signal-catching-event_1",
                      "targetRef": "end-event_1"
                    }
                  ],
                  "eventDefinitions": [
                    {
                      "signalRef": "signal",
                      "async": false
                    }
                  ]
                },
                {
                  "id": "sequence-flow_1",
                  "sourceRef": "start-event_1",
                  "targetRef": "message-catching-event_1"
                },
                {
                  "id": "sequence-flow_2",
                  "sourceRef": "message-catching-event_1",
                  "targetRef": "signal-catching-event_1"
                },
                {
                  "id": "sequence-flow_3",
                  "sourceRef": "signal-catching-event_1",
                  "targetRef": "end-event_1"
                }
              ]
            }
          ],
          "signals": [
            {
              "id": "signal",
              "name": "SIGNAL"
            }
          ],
          "pools": [],
          "targetNamespace": "http://www.intra-mart.jp/im_bpm",
          "messages": [
            {
              "id": "message",
              "name": "MESSAGE"
            }
          ]
        }
    }
 
ResultObject getProcessDefinition (String processDefinitionId)
プロセス定義IDより、プロセス定義情報を取得します。
パラメータ
processDefinitionId : String
プロセス定義ID
返却値
ResultObject
ResultObject 処理結果
data プロパティには、プロセス定義情報が設定されます。