3 Replies Latest reply on Aug 1, 2008 1:49 PM by Ronald van Kuijk

    ContextInstance of a non-null ProcessInstance is null

    Alex Kavo Novice


      I have this method which I call from a jboss rule:

      public void dosth(org.jbpm.graph.exe.ProcessInstance processInstance){
       System.out.println("The Id of the process is: "+ processInstance.getId() );
       System.out.println("The value of the variabel is: "+ processInstance.getContextInstance().getVariable("owner") );
      The result is:
      The Id of the process is: 1
      The value of the variabel is: null

      I am 100% sure that I have set the process variable before with this code:
      org.jboss.seam.bpm.ProcessInstance.instance().getContextInstance().setVariable("owner", "testowner");

      I made some other tests, so I know very well that this variable has been set perfectly.
      The rule is also working without any problems.
      But why I can't get the ContextInstance out of my non-null ProcessInstance?