Camunda:按变量值查找流程实例

Camunda: find process instance by variable value

我能否通过 Camunda REST API 通过流程实例变量值找到流程实例,如此请求中所述: https://groups.google.com/forum/#!topic/camunda-bpm-dev/gJfXkbkY8fc (上面的问题是2014年的,现在应该有标准的方法了吧?)

看起来现在支持:

GET /process-instance

variables: Only include process instances that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows: A valid parameter value has the form key_operator_value. key is the variable name, operator is the comparison operator to be used and value the variable value.

还有一个 POST 端点可以更清晰地表达过滤:

POST /process-instance

variables: A JSON array to only include process instances that have variables with certain values. The array consists of objects with the three properties name, operator and value. name (String) is the variable name, operator (String) is the comparison operator to be used and value the variable value.