![](/img/trans.png)
[英]Opportunities to clear Filter Input Field On Button Click using Angular
[英]Camunda GET opportunities of XOR Gateway using REST
我從您的問題中了解到,您想要訪問網關路由值並將其轉換為下拉菜單,甚至在到達那里之前。 據我所知,這是不可能的。 網關只是查找執行路徑的 if-else 條件。 您可以通過將其傳遞給流程執行、將其保存在某個腳本中或通過 rest api 獲取數據來創建此下拉列表。
有一種選擇可能對您有所幫助。 這個想法是獲得流程定義的 BPMN 2.0 XML。 您可以解析 xml 並獲取網關或任何元素。
標准結果是一個轉義的 XML 字符串,其中包含部署此定義的 XML。
Camunda 的 API 具有以下端點/process-definition/{id}/xml
。 它返回流程定義的BPMN 2.0
XML。
添加了額外的端點,
返回不屬於任何租戶的最新版本的流程定義的 XML
獲取/process-definition/key/{key}/xml
返回 XML 以獲得最新版本的租戶流程定義
GET /process-definition/key/{key}/tenant-id/{tenant-id}/xml
要求
http://localhost:5115/engine-rest/process-definition/Process_16yhb92:1:1605d9ef-be29-11ea-a3af-0242ac160003/xml
圖表
您的 XML 應如下所示:
"bpmn20Xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn:definitions xmlns:bpmn=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"Definitions_0tnus7x\" targetNamespace=\"http://bpmn.io/schema/bpmn\" exporter=\"Camunda Modeler\" exporterVersion=\"3.5.0\">\n <bpmn:process id=\"Process_16yhb92\" isExecutable=\"true\">\n <bpmn:startEvent id=\"StartEvent_1\">\n <bpmn:outgoing>SequenceFlow_05h0ut0</bpmn:outgoing>\n </bpmn:startEvent>\n **<bpmn:exclusiveGateway id=\"ExclusiveGateway_1\">\n**
...
...
sourceRef=\"Task_1mivaws\" targetRef=\"ExclusiveGateway_1\" />\n
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.