4 Replies Latest reply on Sep 20, 2007 6:52 AM by Tomaz Cerar

    Problem with injection when using jbpm process

    Tomaz Cerar Master


      I have a component that handles the actions that are invoked by user and by jbpm process. In a case when user calls method #{handler.startProcess} all object are properly injected, but if i call methods on same component from jbpm process, the object is null!
      Why would this happen?

      the code for user submit is:

      <h:commandButton action="#{handler.startProcess}" value="Start" />

      and in that method the object is not null and I can use it.

      and in jbpm process I have.
      action expression="#{handler.checkData}"/>

      inside method checkData the object is null, but it shouldn't not be!

      the component is defined as pojo not as ejb.
      public class Handler {

      and the object that I am injecting:

      @In(required = true)
       Uporabnik uporabnik;

      Is defined in components.xml as
      <component name="uporabnik" class="si.package.UporabnikLocal"/>

      the object Uporabnik i'm outjecting like this:
      @In(create = true)
       @Out("uporabnik",scope = ScopeType.SESSION)
       private Uporabnik uporabnik;

      I am using nightly build CVS.2007-09-05_22-19-40

      Does anyone knows where the problem is?