3 Replies Latest reply on Aug 23, 2007 4:24 AM by Martin Ehrlich

    Node configuration with Maps - How to?

    Martin Ehrlich Newbie


      I can't get a node configuration for am Map to run.

      My jPDL looks like this:

      <action class="baseJbpmActionHandler.MyHandler" >

      In the ActionHandler I wnat to have a Map (HashMap) with these entrys.

      There is no example in the documentation. So:

      How does the ActionHandler where I can inject these entries into look like?

      Thank You!


        • 1. Re: Node configuration with Maps - How to?
          Jean Guyer Newbie

          I have an actionHandler with a List ,not a map.
          Hope this will help you :

          <action name="initProcessHeader"
           <el>label.process|Demande de produits et prestations</el>
           <el>txt.info| </el>
           <el>label.sortie_stock|Sortie produit</el>
           <el>label.validation_preco|validation précommande</el>

          public class InitProcessHeaderHandler implements ActionHandler {
           List<String> lstVariables;
           public void execute(ExecutionContext contextInstance) throws Exception {
           // TODO Auto-generated method stub
           for (String element : lstVariables) {
           createProcessVarFromElement(contextInstance, element);

          • 2. Re: Node configuration with Maps - How to?
            Ronald van Kuijk Master

            Examples in the SOURCE!!!!!

            Map should work, the variable should be called 'vars'

            • 3. Re: Node configuration with Maps - How to?
              Martin Ehrlich Newbie


              I do not know what I did wrong yesterday. Today everything worked fine. The mysteries of software development! ;-)

              Here is my answer to my problem:

              public class SubProcessHandler extends SubProcessNode implements ActionHandler {
               private Map<String, Object> vars = new HashMap<String, Object>();
               public void execute(ExecutionContext contxt) throws Exception {
               Iterator varIt = this.vars.entrySet().iterator();
               while (varIt.hasNext()) {
               Entry entry = (Entry)varIt.next();
               System.out.println("################# " + entry.getKey() + " - " + entry.getValue());