简体   繁体   English

Camunda REST - 如何获得流表达的可能性

[英]Camunda REST - How to get flow expression possibilities

I'm still pretty new to Camunda.我对 Camunda 还是很陌生。

I would like to illustrate a workflow which can be seen as more than a status flow.我想说明一个工作流,它不仅仅是一个状态流。 This flow should not contain any Java logic but should be controlled via the REST API.此流程不应包含任何 Java 逻辑,但应通过 REST API 进行控制。

Now I have a problem with the XOR gateway and REST-engine handling (see picture).现在我遇到了 XOR 网关和 REST 引擎处理的问题(见图)。

Camunda BPM 示例

My goal is, if my process instance is waiting at the user task Status 1 , that I get information how to proceed.我的目标是,如果我的流程实例正在等待用户任务Status 1 ,我将获得如何继续的信息。 So that if I want to reach the next state I have to specify if test is true or false.因此,如果我想到达下一个 state,我必须指定test是真还是假。

I know that in the body of the complete REST-Call you can give variables and so the path is decided.我知道在完整的 REST-Call 的正文中,您可以提供变量,因此决定了路径。 What I want is that I know in advance which options are available (here: true and false) and can choose one of them.我想要的是我提前知道哪些选项可用(这里:真假)并且可以选择其中一个。

So to my question: Is there a REST-Call that can tell me at the point Status 1 that I can give either the variable "test": {"value": "true"} or the variable "test": {"value": "false"} ?所以对于我的问题:是否有一个 REST-Call 可以在Status 1处告诉我我可以给出变量"test": {"value": "true"}或变量"test": {"value": "false"}

Short answer: No. In bpmn, you just know the current element, you cannot look ahead.简短的回答:不。在 bpmn 中,你只知道当前元素,你不能向前看。 The options are part of your business logic, so you will have to provide the rest method yourself.这些选项是您的业务逻辑的一部分,因此您必须自己提供 rest 方法。

(long answer: using the java BPMN API and some fancy model analysis, this would be possible. But still not advised and error prone.) (长答案:使用 java BPMN API 和一些花哨的 model 分析,这是可能的。但仍然不建议并且容易出错。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM