1 Reply Latest reply on Oct 23, 2008 4:23 AM by Simon

    How to inject a Seam component in a Decision Node ?

    rrrrr rrrr Newbie

      Hi all !
      I have a simple Seam POJO which manages my task :

      @Name("SeamBean")
      public class SeamBean
      {
      
       private int items;
      
       public int getItems()
       {
       return items;
       }
      
       public void seItems(int items) {
       this.items = items;
       }
      
      
       @CreateProcess(definition="simple")
       public void startProcess() { }
      
       @StartTask @EndTask
       public void done() {}
      
      }


      Now I need to inject this component in a JBPM Decision node:

      public class MyDecisionNode implements DecisionHandler {
      
       @In(scope=ScopeType.BUSINESS_PROCESS)
       SeamBean seamBean;
      
       public String decide(ExecutionContext executionContext) throws Exception {
      
       System.out.println(seamBean); // NULL !
       }
      
      }
      

      Unfortunately the component is injected as null (I've tried also without declaring the scope = BUSINESS_PROCESS).
      Any idea how to fix it ?
      thanks a lot
      john