cancel
Showing results for 
Search instead for 
Did you mean: 

A problem with StartEvent's formProperty and BoundaryEvent

siqiyiyi
Champ in-the-making
Champ in-the-making
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!
4 REPLIES 4

trademak
Star Contributor
Star Contributor
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,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
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..

siqiyiyi
Champ in-the-making
Champ in-the-making
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>

siqiyiyi
Champ in-the-making
Champ in-the-making
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!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.