11.5.39 BPMNビジネスプロセス定義ファイルの取得
指定した案件のBPMNビジネスプロセス定義ファイルを取得します。案件IDに関連するビジネスプロセス名とビジネスプロセス定義バージョンから,対象となるBPMNビジネスプロセス定義ファイルを取得します。指定した案件のBPMNビジネスプロセス定義ファイルの内容がワーク管理データベースに登録済みの場合は,ワーク管理データベースからBPMNビジネスプロセス定義ファイルの内容を取得します。未登録の場合は,<環境変数CSCIW_HOME>/bpmn/bpmnxmlに配置されたBPMNビジネスプロセス定義ファイルを取得します。
メソッドとURL
- メモ
-
-
このAPIで取得するBPMNビジネスプロセス定義ファイルは,BPMNビジネスプロセス定義の変換コマンド(ciwtransbpmn)の成果物であるBPMNビジネスプロセス定義ファイルです。
-
このAPIで取得できるBPMNビジネスプロセス定義ファイルの文字コードはUTF-8だけです。
-
HTTPヘッダの"Accept"には,application/xmlだけが指定できます(Acceptを省略した場合,application/xmlが適用されます)。
-
- ヒント
-
BPMNビジネスプロセス定義ファイルの格納先ディレクトリは,共通設定ファイルの「BpmnDefinitionFileDir」で変更できます。BpmnDefinitionFileDirについては,「15.2.5 共通設定ファイルに指定する内容」の「(2) BpmnDefinitionFileDir」を参照してください。
GET /v1/bpmn/<案件ID>
<案件ID>:取得するBPMNビジネスプロセス定義ファイルの案件ID(必須)
クエリパラメタ
|
項番 |
名前 |
型 |
指定要否 |
内容 |
|---|---|---|---|---|
|
1 |
userdescription |
文字列 |
省略可 |
ユーザ記述子を指定します。省略した場合はデフォルト値が指定されます。空文字列は指定できません。 |
リクエスト例
リクエストURL
GET http://restserver/csciwws/v1/bpmn/5005
レスポンス
BPMNビジネスプロセス定義ファイルの内容を返します。
ステータスコード
|
項番 |
ステータスコード |
内容 |
|---|---|---|
|
1 |
200 |
成功 |
|
2 |
400 |
リクエストパラメタの不正 |
|
3 |
404 |
データが見つからなかった |
|
4 |
500 |
内部処理エラー |
レスポンス例
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:csciw="http://www.hitachi.co.jp/soft/xml/csciw/bpmn" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test" exporter="uCosminexus Business Process Developer" exporterVersion="02-20" csciw:userCheck="4">
<collaboration id="Collaboration">
<participant id="pool1" name="RestAP" processRef="process_pool1"></participant>
</collaboration>
<process id="process_pool1" name="RestAP" isExecutable="true">
<laneSet id="laneSet_process_pool1">
<lane id="lane1">
<flowNodeRef>Start1</flowNodeRef>
<flowNodeRef>STask1</flowNodeRef>
<flowNodeRef>End1</flowNodeRef>
</lane>
</laneSet>
<startEvent id="Start1" name="TopLevelStart"></startEvent>
<serviceTask id="STask1" name="ServiceTaskA" operationRef="RestCall"></serviceTask>
<endEvent id="End1" name="NoneEnd"></endEvent>
<sequenceFlow id="flow1" sourceRef="Start1" targetRef="STask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="STask1" targetRef="End1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_Collaboration">
<bpmndi:BPMNPlane bpmnElement="Collaboration" id="BPMNPlane_Collaboration">
<bpmndi:BPMNShape bpmnElement="pool1" id="BPMNShape_pool1">
<omgdc:Bounds height="281.0" width="501.0" x="0.0" y="80.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="lane1" id="BPMNShape_lane1">
<omgdc:Bounds height="281.0" width="481.0" x="20.0" y="80.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Start1" id="BPMNShape_Start1">
<omgdc:Bounds height="35.0" width="35.0" x="50.0" y="193.0"></omgdc:Bounds>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="18.0" width="71.0" x="32.0" y="230.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="STask1" id="BPMNShape_STask1">
<omgdc:Bounds height="55.0" width="105.0" x="180.0" y="183.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="End1" id="BPMNShape_End1">
<omgdc:Bounds height="35.0" width="35.0" x="400.0" y="193.0"></omgdc:Bounds>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="18.0" width="47.0" x="394.0" y="230.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="85.0" y="210.0"></omgdi:waypoint>
<omgdi:waypoint x="180.0" y="210.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="285.0" y="210.0"></omgdi:waypoint>
<omgdi:waypoint x="400.0" y="210.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>