]
Alejandro Guizar updated JBPM-2715:
-----------------------------------
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Assignee: Huisheng Xu (was: Alejandro Guizar)
Applied patch (thank you Huisheng!). Resolved document element conflict in mailType.
Missing elements in jpdl-4.3.xsd
--------------------------------
Key: JBPM-2715
URL:
https://jira.jboss.org/browse/JBPM-2715
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Environment: Windows Vista, java 1.6, jboss 4.2.2.GA
Reporter: Florent Legendre
Assignee: Huisheng Xu
Priority: Critical
Fix For: jBPM 4.4
Attachments: JBPM-2715.patch
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
The xsd file for the jpdl has created validation errors in 4.0, 4.1, 4.2 and now also
4.3, but the difference is that the parsing of the jpdl has become more efficient in 4.3
and now throws an exception when defining an argument on a constructor element.
The main problem here is that the declaration of arg elements does not allow for any
child, which means that you can define the type of the argument, but not its value, making
it pretty useless.
Here are the extracts of the various problematic files:
jpdl-4.3.xsd (from line 921):
==========
<complexType name="argType">
<annotation><documentation>The method arguments.
Each 'arg' element should have exactly one child element
that represents the value of the argument.
</documentation></annotation>
<attribute name="type" type="string">
<annotation><documentation>The java class name representing
the type of the method. This is optional and can be used to
indicate the appropriate method in case of method overloading.
</documentation></annotation>
</attribute>
</complexType>
An example jpdl which would trigger the error (as the string element in the arg does is
not valid based on the xsd):
=========================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<process name="MyProsess"
version="1"
xmlns="http://jbpm.org/4.3/jpdl">
<start name="start">
<transition name="myTransition"
to="end">
<event-listener class="com.comp.MyEventListener">
<field name="myObjectField">
<object class="com.comp.MyObjectField">
<constructor>
<arg type="java.lang.String"><string
value="hello world"/></arg>
</constructor>
</object>
</field>
</event-listener>
</transition>
</start>
<end name="end"/>
</process>
And finally, the problems, obtained with org.jbpm.pvm.internal.xml.Parser.getProblems()
when this error occurs:
==========================================================================================
xml validation error: cvc-complex-type.2.1: Element 'arg' must have no character
or element information item [children], because the type's content type is empty.
[line=48 column=35 ]: org.xml.sax.SAXParseException: cvc-complex-type.2.1: Element
'arg' must have no character or element information item [children], because the
type's content type is empty.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: