3 Replies Latest reply on Aug 13, 2007 4:48 AM by koen.aers

    jPDL Designer and Map parameters in actions

    karmen38

      Hi All,

      I have an action that accepts a parameter of the type java.util.Map. I can pass such parameter from the process XML to this action using this notation:

      <entry>
       <key> key </key>
       <value> value </value>
      </entry>
      

      When I edit such process in jPDL designer I can see all variables passed to the action but Map variables. They are displayed as three squares in the variable entry field. Moreover, when I save the node properties (f.i. change the name of the node) the Map variable disappears completely from the action for this node.

      Could it be that I am doing something wrong or using the wrong combination of tools (see the versions below)? Could it be that Map variables are not supported so far by the designer? If this is the case is the support in the roadmap? Can I add it by myself and submit this to the project or this is something that is not that easy to do?

      I am using Eclipse 3.2 (I did not manage to run the designer under 3.3) and designer 3.1.0.beta2

      Thank you,
      Mark


        • 1. Re: jPDL Designer and Map parameters in actions
          koen.aers

          Hi Mark,

          Complex parameters are not supported by the designer and they probably never will.
          We have already made nodes pluggable, so that you can provide your own configuration form for a custom node, and will probably do this for actions as well in the future.
          But supporting these complex variables in a generic way is close to impossible imo.

          Regards,
          Koen

          Btw. 3.1.0.beta2 was build and tested on Eclipse 3.3.

          • 2. Re: jPDL Designer and Map parameters in actions
            karmen38

            Hi Koen,

            Thank you for the reply. I understand, it makes sense.

            Maybe the designer could just leave the variable as it is, not delete it at all. It can recognize that the variable is not editable by the form and disable the editing and not update the variable in XML. Actually, disabling the editing is not even that important as not deleting the Map in XML. In this case the one can draw the process graphically, define actions and parameters, switch to XML, define additional parameters (Maps) not editable in designer, switch back to the designer and make some changes again without risk of loosing the complex variables.

            Your idea about pluggable nodes is interesting. Where can I read more about it? It could be the way to go for my situation. Does the implementation involves development of Eclipse plugin or it is some code that plugs to the designer and is interpreted by designer? Actually, either way sounds good.

            I will need to re-install Eclipse 3.3 with the designed to check. Will the designer binary package that is available for download from JBoss / jBPM site work with 3.3 or I need to build the designer from CVS? I read a couple of postings here about how to setup designer for Eclipse 3.2 and it works perfectly. I will try again with 3.3.

            Thank you,
            Mark

            • 3. Re: jPDL Designer and Map parameters in actions
              koen.aers

              Hi Mark,

              Deleting the configuration is indeed not a very clean behaviour ;-)
              The idea is definitely that the GPD should behave as you suggest. Can you please file a JIRA issue for this?
              Regarding node pluggablility, the only information at this moment is the plugin itself. All nodes are currently contributed through an extension point. The configuration forms are also contributed through the tabbed properties extension point.
              I plan to write up an article that shows how to do this and also to make the process a lot easier, but in the meantime you will have to bear with reading the code. ;-)
              Also, feel free to ask questions about it here on the forum, there are already a number of people doing this, and I am sure you will get answers if you post particular problems.
              At the moment I am developing on Eclipse 3.3, but there are AFAIK no incompatibilities with Eclipse 3.2.

              Regards,
              Koen