3 Replies Latest reply on Mar 25, 2010 6:10 AM by blancocristobal

    Creating new Configuration deletes data in JBPM_DEPLOY* tables (4.3)

    ryanlbart

      Everytime I execute the code below, my JBPM4 database is wiped clean (deployment tables and history tables). Originally, I thought my probelm was that I was deploying the same *.jdpl.xml files time and time again (basically everytime my service started), so I modified my code to only deploy the *.jdpl.xml files if a flag is set. Unfortunately, that didn't solve my problem. It turns out, that my data is still deleted, and it is deleted when I build the process engine. If I don't deploy any *.jdpl.xml files, the database is empty. Deploying the *.jdpl.xml files everytime isn't an option either as it deletes all of the data previosly in the history tables. So I guess I really have two questions.... 1) why does building a process engine delete my data? is there another way to get a process enging? and 2). what is the best practice in terms of deploying *.jdpl.xml files? I am assuming that they should only be deployed when they have been modified.

       

      Thanks in advance!

       

       

       

      protected final ProcessEngine getProcessEngine(String fileName, String fileLocation) throws Exception

      {

           Configuration configuration =

      new Configuration();

           configuration.setFile(getFile(fileName, fileLocation));

       

           return configuration.buildProcessEngine();

      }