[jboss-user] [JBoss jBPM] - How to inject a Seam component in a Decision Node ?

freejohn22 do-not-reply at jboss.com
Wed Oct 22 09:30:23 EDT 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183848#4183848

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183848



More information about the jboss-user mailing list