1 Reply Latest reply on Nov 15, 2006 3:39 AM by tom.baeyens

    Process data in practice...?

      Hi All,

      Please tell me if this is a right way of seing a "Jbpm application" or if I am missing something:

      There are two Databases, one is the company DB with all the data related to their business (going from Employees data to Sales...) and this other one is the JBPM DB.

      The user defines some variables by using the Task node. The scope of
      some variables will only be the process instance but some other variables will be mapped to the company's DB and will be also used by other process definition.

      My question is for the variables that are mapped to the company's DB:
      The way to initialise/update (from/in the company's DB) those variables is to write a Custom Controller and implement the access from/to of the company's DB in the initializeTaskVariables and submitTaskVariables methods ???
      (Or some custom actions can do the job upon the "node enter" and the "node leave" event but the custom controler seems done just for that...)

      How do the typcal applications handle this ?

      Thank you,

        • 1. Re: Process data in practice...?
          tom.baeyens

          if you company data objects are mapped with hibernate (and they have a string or long id), then you can just store them in the jbpm process variables. jBPM will store a reference to the company objects instead of the real value.

          jBPM tables and your company tables have to be accessed through the same hibernate session and hence jBPM tables and your company tables have to be in the same db.

          of course, you can always store the FK's of your company objects in the process variables. That is a little more clumsy, cause you have to manage the fetching and updating yourself. But it works as well.

          Those are common patterns.