3 Replies Latest reply on May 11, 2007 11:57 AM by jruud

    How to deal with complex Action children (configInfoElements

    jruud

      Our custom actions are able to process complex (nested) children like in the example below (the parent... stuff):

      <node name="Cancel Bill">
       <action class="MyAction">
       <parent>
       <child>CANCEL</child>
       </parent>
       </action>
      </node>


      However, I'm a little confused as to how GD 3.1 deals with these complex elements (we're currently using the XML editor to modify them, but plan on adding custom property pages).

      Assuming I understand correctly, children of Delegation subclasses like Action are stored in a configInfoElements collection. However, I get the feeling that ConfigInfoElement may possibly not have been designed to deal with complex elements (for example because: ConfigInfoElementDomAdapter.doModelAdd(XmlAdapter) seems to be intentionally ignoring any children).

      In order to support complex structues like those above, does it make sense to try to make it work with the ConfigInfoElement approach (and extending it if necessary), or should I rather create my own semantic element and xml adaper to deal with the complex Action children? (any pointers on this would be very helpful!)

      Thanks, John

        • 1. Re: How to deal with complex Action children (configInfoElem
          kukeltje

          I'm not sure I totally get where what exactely your problem is. Is it just the GPD? Since complext structure like this should work in 3.2 engine, at least if the variable parent is of type org.dom4j.Element. You can read this in chapter 18.2.3.1 of the 3.2 docs and also have a look at the FieldInstantiatorTest.java in org.jbpm.instantiator package of the tests.

          • 2. Re: How to deal with complex Action children (configInfoElem
            kukeltje

            John filed issue http://jira.jboss.com/jira/browse/GPD-78 for this. So seems to be GPD related

            • 3. Re: How to deal with complex Action children (configInfoElem
              jruud

              Hi Ronald, you're correct in that my question is related to GPD 3.1 only (the complex structures are working for us in the 3.1 *engine*).

              Issue GPD-78 deals with configInfoElements as well, but the problem there is that NO children (even non-complex ones) get added to XML adapters. Becuase of this no XML is created for the children, so this is likely a bug.

              Back to the original topic, I haven't posted any bug report regarding complex Action children (yet), as I first was seeking some feedback/ideas about the feasibility of using ConfigInfoElement/ ConfigInfoElementDomAdapter to support complex Action children in GD 3.1 (hopefully that makes sense, if not please ask)