1 Reply Latest reply on Feb 28, 2007 11:25 AM by estaub

    JbpmContext in multiThreaded system

    srmo642002

      i am using swing to access the jbpm engine
      my application starts by main Thread and it load the process definition and other things such as jbpm context .
      but i need access to jbpm context by JbpmConfiguration.getCurrentJbpmContext from action listener a swing component such as JButton . this return null . because actionListener implementation invoked by another thread .
      what i do ??

        • 1. Re: JbpmContext in multiThreaded system

          See if http://www.jboss.com/index.html?module=bb&op=viewtopic&t=97309 is any help.

          The answer depends on what you need to do. I see three possibilities:

          If you just need to get some data from jBPM, you could load it up earlier.

          If you don't need to use the same context object, you can create another on the listener thread.

          If you need to use the same context object, you'll need to push the work onto the same thread somehow - probably set up a worker thread just for that.

          I haven't done any of this stuff - if anyone knows better, please shout!

          -Ed Staub