我在Eclipse Luna中使用BPMN2建模器v1.1.3.201503101616,为Jboss EAP 6.1开发JBPM 6.0.3。每次我向活动添加信号边界事件时,都会标记错误“数据输出Signal_1_Output()没有数据类型”。该错误的类型为“jBPM Process Problem”。
例如,这是一个简单的工作流程,我将它放在一起:
这是生成的流程源(带有错误的行标记):
<bpmn2:itemDefinition id="ItemDefinition_4" isCollection="false" structureRef="String"/>
<bpmn2:signal id="SignalFoo" name="SignalFoo"/>
<bpmn2:process id="defaultPackage.Scratch" tns:packageName="defaultPackage" name="Scratch" isExecutable="true" processType="Private">
<bpmn2:property id="str" itemSubjectRef="ItemDefinition_4" name="str"/>
<bpmn2:startEvent id="StartEvent_1" name="StartProcess">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:scriptTask id="ScriptTask_1" name="Script Task 1" scriptFormat="http://www.java.com/java">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
<bpmn2:script>System.out.println("Hello world!");</bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>
<bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="ScriptTask_1">
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
<bpmn2:dataOutput id="DataOutput_1" name="Signal_1_Output"/> <-- Error
<bpmn2:dataOutputAssociation id="DataOutputAssociation_1">
<bpmn2:sourceRef>DataOutput_1</bpmn2:sourceRef>
<bpmn2:targetRef>str</bpmn2:targetRef>
</bpmn2:dataOutputAssociation>
<bpmn2:outputSet id="OutputSet_1" name="Output Set 1">
<bpmn2:dataOutputRefs>DataOutput_1</bpmn2:dataOutputRefs>
</bpmn2:outputSet>
<bpmn2:signalEventDefinition id="SignalEventDefinition_1" signalRef="SignalFoo"/>
</bpmn2:boundaryEvent>
<bpmn2:endEvent id="EndEvent_1" name="End Event 1">
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>
<bpmn2:scriptTask id="ScriptTask_2" name="Script Task 2" scriptFormat="http://www.java.com/java">
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
<bpmn2:script>System.out.println("Goodbye, cruel world!");</bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_3" tns:priority="1" sourceRef="BoundaryEvent_1" targetRef="ScriptTask_2"/>
<bpmn2:endEvent id="EndEvent_2" name="End Event 2">
<bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_4" tns:priority="1" sourceRef="ScriptTask_2" targetRef="EndEvent_2"/>
</bpmn2:process>
尽管有错误,Jbpm能够毫无怨言地运行该过程,并且边界事件似乎正常工作。我无法在互联网上找到任何其他提及此特定错误的内容。我也在寻找调整jBPM进程验证器的方法,但我在eclipse偏好中找不到任何关于它的东西。
这是合法的错误吗?有人可以建议如何解决它吗?或者,有没有办法禁用此验证规则?
答案 0 :(得分:3)
jBPM没有要求指定数据类型(对于边界事件和其他地方)。 Modeler错误地将此标记为错误。你可以打开一个Eclipse BPMN2 Modeler Bugzilla,这样我们可以解决这个问题吗?
答案 1 :(得分:2)
我为此问题打开了https://bugs.eclipse.org/bugs/show_bug.cgi?id=463362。
解决方法是在XML编辑器中打开bpmn文件并修改dataOutput元素:
<bpmn2:dataOutput id="DataOutput_1" name="Signal_1_Output"/>
添加一个名为“itemSubjectRef”的属性,引用文件开头的相应itemDefinition
,例如:
<bpmn2:dataOutput id="DataOutput_1"
itemSubjectRef="ItemDefinition_4" name="Signal_1_Output"/>
这会阻止BPMN2将事件标记为错误。我还没有找到从BPMN2建模器编辑器中进行此更改的方法。
更新
在BPMN Modeler 1.1.4和1.2.0中,