4 Replies Latest reply on Feb 22, 2008 11:31 AM by kukeltje

    new rows inserted into jbpm tables every time jboss is start

    bloreguy

      Hi,

      I am a beginner to jbpm and see this issue everytime the jboss server is started. Please note that I do not have create-drop or create entry on startup in my hibernate.cfg.xml

      The following tables are inserted with new entries every time, with the old entries retained. So after some time, the table size of these tables run into 100's of entries, each of them repeated over and over again. Any help is greatly appreciated

      1. jbpm_delegation
      2. jbpm_moduledefinition
      3. jbpm_moduleinstance
      4. jbpm_node
      5. jbpm_pooledactor
      6. jbpm_processdefinition
      7. jbpm_task
      8. jbpm_transition

        • 1. Re: new rows inserted into jbpm tables every time jboss is s
          kukeltje

          jbpm itself does not do anything like this. Most likely you process is deployed over and over again because you use e.g. seam.

          • 2. Re: new rows inserted into jbpm tables every time jboss is s
            bloreguy

            Thanks for your quick reply. I do use Seam. How do I prevent this from happening? Appreciate your response

            • 3. Re: new rows inserted into jbpm tables every time jboss is s
              bloreguy

              It looks like it is a jbpm feature and goes by versioning mechanism. I see the following in the jbpm jpdl reference at
              http://www.jboss.com/products/jbpm/docs/jpdl

              How do I avoid versioning and keep the same process definition unless something has really changed in the process definition file? Any help deeply appreciated. IN my scenario, the server may be brought up and down multiple times and every time this is done, I will lose all contexts from previous actions, unless I store the processDefinition Id in a user database.

              -----------

              Versioning mechanism
              Basically, the versioning mechanism of jBpm comes down to the following principles :

              * every time a process archive is deployed, a new process definition is created in the jBpm database
              * at deployment, jBpm assigns a version number to the process definition. Process archives are considered the same when the name of the process is the same. To assign the version number, jBpm takes 1 + (the highest version number of the current process definitions with the same name). Or 1 if it is the first version. From the jBpm-API you can ask for the latest process definition with a given name.
              * ones a process instance (=one process execution) is started in a given definition, the process instance will keep on executing within the same definition till its finished.
              * this way every process can start in the latest definition and keeps on running in the same definition for its complete lifetime.
              * note that in jBpm it is even possible to version the programming logic associated with a process. By including the classes in the process archive, jBpm will separate the classes per process definition.

              • 4. Re: new rows inserted into jbpm tables every time jboss is s
                kukeltje

                Sorry, no, it is not a jbpm feature that every time an application (seam in this case) says to deploy a process, it get's deployed. Yes, there has been some discussion to change this. How to prevent versioning is probably not what you mean, you want to know how to prevent deployment of the process each time. This is 'simple' and has been mentioned in the (old) seam forums.Just do *not* auto deploy processes from a seam app, but deploy them in a different way, e.g. an ant task, the jbpm web console or whatever.