4 Replies Latest reply on Aug 6, 2007 4:27 PM by Imran Naqvi

    GPD-78 Adding ConfigInfoElements to Actions and nested Confi

    Imran Naqvi Newbie

      This is mainly to do with Jira issue GPD-78 http://jira.jboss.com/jira/browse/GPD-78. For some reason i was unable to create an account otherwise I would have re-opened the issue myself.
      If someone else is getting the same problem could they re-open this issue.

      Basically my process has an a node with an action element like this:

      <action class="SomeActionHandler">
       <keys>
       <entry>
       <key>VarName</key>
       <value>1122</value>
       </entry>
       </keys>
       <receive>
       <element>030101</element>
       <element>030102</element>
       </receive>
      </action>
      


      When I try to open this template the config info elements do not get created. I've narrowed the problem down to ConfigInfoElementDomAdapter.initialize() and ActionDomAdapter.initialize() methods which need the line addElements(configInfoElement.getConfigInfoElements()); at the end.

      Another issue is with the getTextContent() method in XmlAdapter class. There should be a null check while getting the node value (this issue also comes up when you have nested configInfoElements). So the following in XmlAdapter.java :
      protected String getTextContent() {
       StringBuffer buffer = new StringBuffer();
       NodeList list = getNode().getChildNodes();
       for (int i = 0; i < list.getLength(); i++) {
       buffer.append(list.item(i).getNodeValue());
       }
       return buffer.toString().trim();
       }
      

      should be changed to:
      protected String getTextContent() {
       StringBuffer buffer = new StringBuffer();
       NodeList list = getNode().getChildNodes();
       for (int i = 0; i < list.getLength(); i++) {
       String nodeValue = list.item(i).getNodeValue();
       if (nodeValue != null)
       buffer.append(nodeValue);
       }
       return buffer.toString().trim();
       }
      

      I'd appreciate it if someone could confirm these issues for me.
      Thanks.

        • 1. Re: GPD-78 Adding ConfigInfoElements to Actions and nested C
          Koen Aers Master

          Thanks for reporting these issues.

          Can you please try to specify a minimal process definition for each of the issues you are reporting? If possible attach them to the JIRA issue or else feel free to post them here in the forum.

          Regards,
          Koen

          • 2. Re: GPD-78 Adding ConfigInfoElements to Actions and nested C
            Imran Naqvi Newbie

            I wanted to create jirra issues for these problems but for some reason every time I try to create a user account I get a message saying something like "You are not authorized to create users".

            The minimum process definition for all the issues would be something like this:

            <?xml version="1.0"?>
            
            <process-definition name="Movie" version="11">
            <start-state name="Start">
            <transition to="Get MPEG Properties" />
             </start-state>
            <node name="Get MPEG Properties">
             <action class="SomeActionHandler"><send>010901</send>
            <keys>
             <entry>
             <key>VarName</key>
             <value>1122</value>
             </entry>
             </keys>
             <receive>
             <element>030101</element>
             <element>030102</element>
             </receive>
            </action>
             <transition to="End"/> </node>
            <end-state name="End" />
            


            Other issues that I've noticed with nested config infor elements are:

            1- ConfigInfoElementDomAdapter class needs to defined the getNodeTypes() method and return "configInfoElement" as one of its possible types.

            2- ConfigInfoElement.getConfigInfoElements() always throws a class cast exception. The method is trying to cast from an object[] to a ConfigInfoElement[]. Instead we should cast each object in the array individually and copy it to the resultant array.

            All of these issues have to do with nested config info elements. Koen I know how development efforts go but is it possible you could give me a ballpark figure of when these issues might be adressed. I am runningon a deadline and it would help me out a great deal in my planning. Btw I tried getting past these issues by extending the model class and the Dom Adapter class for ConfigInfoelement but its being (understandably) instantiated directly in the XmlAdapterFactory.

            Thanks,
            Imran


            • 3. Re: GPD-78 Adding ConfigInfoElements to Actions and nested C
              Koen Aers Master

              I think you simply have to create a jboss account on the jboss home page. Then you are allowed to file issues in JIRA. Meanwhile, I will reopen the issue and look at it this week.
              But note that it will not be possible to configure these complex structures out our the box with the current properties view.

              Normally the GA release of the new GPD will be available next week.

              Regards,
              Koen

              • 4. Re: GPD-78 Adding ConfigInfoElements to Actions and nested C
                Imran Naqvi Newbie

                Thats fine. I'm not worried about the UI that much since I can extend the plugin to provide my own UI. But the Config Info adapter class is not extendable as of now.
                I'll create Jira issues for these problems.
                Thanks
                -Imran