Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2715

Missing elements in jpdl-4.3.xsd

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • jBPM 4.4
    • jBPM 4.3
    • Runtime Engine
    • None
    • Low

      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.

              rebody HuiSheng Xu (Inactive)
              renflo Florent Legendre (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: