2 Replies Latest reply on Jul 24, 2007 10:57 AM by Alex Ka

    jboss seam bijection problem

    parag talekar Newbie

      jboss seam 1.2.1

      I am having trouble understanding how bijection work with jbpm. Here is a simple jpdl:

      <process-definition name="MyWorkflow">
       <start-state name="start">
       <transition to="decide"></transition>
       <decision name="decide" expression="#{myManager.result}">
       <transition to="assigntask" name="assigntask"></transition>
       <transition to="end" name="end"></transition>
       <task-node name="assigntask">
       <task name="Evaluate">
       <assignment actor-id="adminuser"></assignment>
       <transition to="end" name="cancel"></transition>
       <transition to="decide" name="retry"></transition>
       <end-state name="end"></end-state>

      Notice that the decision task calls #{myManager.decide} which a SFSB:
      @Name ("myManager")
      public class MyManagerImpl implements MyManager,
       Serializable {
       private static final long serialVersionUID = 1L;
       private Log LOG;
       @PersistenceContext (type = PersistenceContextType.EXTENDED)
       private EntityManager entityManager;
       @In (required = false)
       @Out (scope = BUSINESS_PROCESS, required = true)
       private Long id;
       @CreateProcess(definition = "MyWorkflow")
       public void begin() {
       id = new Long(10);
       public String getResult() {
       // NPE :-(
       // why doesnt id get injected?
       int x = id.intValue();
       public void destroy() {

      I get a NPE in getResult() when it is called by jBPM. How come id never gets injected back?

      I set logging to TRACE on org.jboss.seam.Component and I get the "injecting dependencies of" message when begin() is called. But I DONT see the same messages when the jBPM task node executes the getResult() expression.

      Am I missing something in a config file?

      Thanks in advance.