2 Replies Latest reply on Oct 23, 2008 11:19 AM by joshua883

    Is it possible to inject a Seam POJO into a JBPM decision node ?

    joshua883

      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
      joshua