A problem with StartEvent's formProperty and BoundaryEvent
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 03:39 AM
I encountered a problem like this:
I created a StartEvent with a formProperty which is not required, and a UserTask attached by a TimerBoundaryEvent.
When I didn't give the fromProperty a value then push the 'start process' button in the Activiti Explorer, wait until the TimerBoundaryEvent reaching the deadline, a error happened:
Error occurred while executing job: src-resolve: Cannot resolve the name 'extension' to a(n) 'element declaration' component.
But if I gave the fromProperty a value , the error didn't happen.
I don't know why that happens. It seemes like that the StartEvent's formProperties should be 'required' even if the attribute 'required' is 'false'.
Any help is appreciated!
I created a StartEvent with a formProperty which is not required, and a UserTask attached by a TimerBoundaryEvent.
When I didn't give the fromProperty a value then push the 'start process' button in the Activiti Explorer, wait until the TimerBoundaryEvent reaching the deadline, a error happened:
Error occurred while executing job: src-resolve: Cannot resolve the name 'extension' to a(n) 'element declaration' component.
But if I gave the fromProperty a value , the error didn't happen.
I don't know why that happens. It seemes like that the StartEvent's formProperties should be 'required' even if the attribute 'required' is 'false'.
Any help is appreciated!
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 11:28 AM
Hi,
I can only help if you provide details about the BPMN 2.0 XML file and the Java code you are using.
Best regards,
I can only help if you provide details about the BPMN 2.0 XML file and the Java code you are using.
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 11:54 AM
not providing a value is like the property not being there. In EL this results in an exception (just the way EL works) This is not realy strange since null is a 'valid' value for objects, so the expression could not return null..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 08:31 PM
Hi,
I can only help if you provide details about the BPMN 2.0 XML file and the Java code you are using.
Best regards,
the xml file is generated through a web-js bpmn designer appliction I designed by myself, so the xml's activiti nodes and gateway nodes and sequenceFlow nodes may not be arranged in the same order as it generated by the Eclipse Designer, but it can be deployed on the Activiti Engine succussfully.
This is the xmlfile excluding <bpmndi:BPMNDiagram> :
<process name="testForm" id="testForm">
<startEvent name="开始" id="theStart1304" activiti:initiator="initiator"/>
<userTask name="用户任务" id="userTask1392" activiti:assignee="kermit"/>
<endEvent name="结束" id="theEnd1554"/>
<sequenceFlow name="迁移流" id="seqFlow1635" targetRef="theEnd1554" sourceRef="userTask1392"/>
<boundaryEvent name="边界事件(定时器)" id="node2046" attachedToRef="userTask1392" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT5S</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<endEvent name="结束" id="theEnd2205"/>
<sequenceFlow name="迁移流" id="seqFlow2286" targetRef="theEnd2205" sourceRef="node2046"/>
<userTask name="用户任务" id="userTask2843" activiti:assignee="kermit">
<extensionElements>
<activiti:formProperty name="表单项" id="var3690" writable="true" required="false" type="string"/>
</extensionElements>
</userTask>
<sequenceFlow name="迁移流" id="seqFlow2961" targetRef="userTask1392" sourceRef="userTask2843"/>
<sequenceFlow name="迁移流" id="seqFlow2998" targetRef="userTask2843" sourceRef="theStart1304"/>
</process>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 08:47 PM
not providing a value is like the property not being there. In EL this results in an exception (just the way EL works) This is not realy strange since null is a 'valid' value for objects, so the expression could not return null..
Thank you! But how do I set a 'string' type property the value ''(String.Empty).
I made a test last night using the xml file above. I gave a mapping-variable to the property, so the xml changed to:
<process name="testForm" id="testForm">
<startEvent name="开始" id="theStart1304" activiti:initiator="initiator"/>
<userTask name="用户任务" id="userTask1392" activiti:assignee="kermit"/>
<endEvent name="结束" id="theEnd1554"/>
<sequenceFlow name="迁移流" id="seqFlow1635" targetRef="theEnd1554" sourceRef="userTask1392"/>
<boundaryEvent name="边界事件(定时器)" id="node2046" attachedToRef="userTask1392" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT5S</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<endEvent name="结束" id="theEnd2205"/>
<sequenceFlow name="迁移流" id="seqFlow2286" targetRef="theEnd2205" sourceRef="node2046"/>
<userTask name="用户任务" id="userTask2843" activiti:assignee="kermit">
<extensionElements>
<activiti:formProperty name="表单项" id="var3690" writable="true" required="false" variable="var3691" type="string" />
</extensionElements>
</userTask>
<sequenceFlow name="迁移流" id="seqFlow2961" targetRef="userTask1392" sourceRef="userTask2843"/>
<sequenceFlow name="迁移流" id="seqFlow2998" targetRef="userTask2843" sourceRef="theStart1304"/>
</process>
at this time, I didn't give the property 'var3690' a value(leave it blank), and timer job worked fine, it didn't throw the exception!
