jbpm itself does not do anything like this. Most likely you process is deployed over and over again because you use e.g. seam.
Thanks for your quick reply. I do use Seam. How do I prevent this from happening? Appreciate your response
It looks like it is a jbpm feature and goes by versioning mechanism. I see the following in the jbpm jpdl reference at
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.
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.
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.