0 Replies Latest reply on Jun 20, 2016 10:22 AM by imphilippesimo

    How to store variable in the database without starting any process

    imphilippesimo Newbie

      Hi everyone

       

      i'm thinking about a way of storing a global variable in the jbpm database without starting any process so that, whatever the process is, it can get access to this variable.

       

      i'm using jbpm 6.4, and, I got some ideas:

       

      1)

      I saw the interface KieContext.getVariable()/setVariable() methods, but i am not able to see any implementation of it.

       

      i want to do something like this:

      MyObject variable = someJob();

       

      //store the global variable in the kie context

      KieContextImpl.setVariable(variable);

       

      //retrieve it whenever i want

      KieContextImpl.getVariable(variable);

       

      //starting some process with that variable

       

      2)

      Store the variable while constructing the runtimeEnvironment

      but dont know how to do it?

       

      Thanks