【发布时间】:2022-11-08 20:27:59
【问题描述】:
我正在处理一个具有 dataObject 和一些 serviceTasks 的 BPMN 文件。我想检查 serviceTask 变量是否存在于 dataObject 中。如果存在,则应跳过服务任务。所以,我正在使用 skipExpressions 来实现这一点。
这是示例 BPMN:
<process id="TASK_FLOW_TESTING" name="TASK_FLOW_TESTING" isExecutable="true">
<dataObject id="optionalInputList" name="optionalInputList">
<extensionElements>
<flowable:value>
["input1","input2"]
</flowable:value>
</extensionElements>
</dataObject>
<dataObject id="_ACTIVITI_SKIP_EXPRESSION_ENABLED" name="_ACTIVITI_SKIP_EXPRESSION_ENABLED" itemSubjectRef="xsd:boolean">
<extensionElements>
<flowable:value>true</flowable:value>
</extensionElements>
</dataObject>
<serviceTask id="REFRESH_TASK" name="REFRESH_TASK" flowable:async="true" skipExpression="/*something should be here*/" flowable:triggerable="true" flowable:class="com.delegates.customDelegate">
<extensionElements>
<flowable:field name="inputData">
<flowable:string>["input1"]</flowable:string>
</flowable:field>
<flowable:field name="outputDataConfig">
<flowable:string>["output1"]</flowable:string>
</flowable:field>
</extensionElements>
</serviceTask>
如果我的 input1 存在于 dataObject 的 optionalInputList 中,我想跳过刷新任务。 我可以在 BPMN 中实现这一点吗?
【问题讨论】: