1 Reply Latest reply on Dec 7, 2005 7:08 PM by Ronald van Kuijk

    Fields and Extending an ActionHandler

    null null Newbie

      Hello,

      I have an ActionHandler base class that I would like all my other ActionHandlers to extend. I would like certain fields to belong to the super-class but be visible to subclasses like this:


      public abstract class MySuperActionHandler implements ActionHandler {
      
       protected String message;
      
       public void execute(ExecutionContext arg0) throws Exception {
      
       System.out.println(message);
       }
      
      
      }
      


      And let's say I have a sub class called MySubActionHandler and I have an action that looks like this in my process definition:

      <action class="foo.bar.MySubActionHandler">
       <message>Hello World!</message>
       </action>
      


      I have no field called message in my subclass, i want to inherit it and have jBPM be able to inject it into the subclasses. Is this possible? I've tried using both config-type field and config-type bean and neither seems to work. Suggestions please...