2 Replies Latest reply on Nov 25, 2005 5:11 AM by Luca Buraggi

    JBPM delegation with config-type=

    Luca Buraggi Newbie

      Even after reading the user guide chap. 13, I still can't figure out how to pass complex type parameters to a delegation class.
      I would appreciate any example about passing a list, set, collection to a class like this:

      public class MyAction implements ActionHandler {
       // the list values should be configured by the process definition file
       private java.util.List myList;

      What exactly should I put in the body of the action to configure myList with, let say, "salt", "sugar" and "pepper" ?
      <action class="org.test.MyAction">

      and what if some list item is not a String, but for instance, an int ?

      Thank you for any help.

        • 1. Re: JBPM delegation with config-type=
          Rainer Alfoeldi Novice

          This here results in the method setReadData( Map readData ) being called on SimpleAction. The values of the Map are ( 'AccessName''XXX', 'BundlingKey'BundlingKeyA' ).

          I even use nested Maps this way. For the other types read the source code, its not that complex. Start out with org.jbpm.instantiation.FieldInstantiator.getValues().

          <node name="SimpleAction">
           <action name="SimpleAction" class="com.SimpleAction" config-type="bean">
           <readData element-type="java.util.Map">


          • 2. Re: JBPM delegation with config-type=
            Luca Buraggi Newbie

            Thank you very much.

            I'm now looking at the source code ...