cancel
Showing results for 
Search instead for 
Did you mean: 

Processes are not getting deployed in 5.17.0

penusila611621
Champ in-the-making
Champ in-the-making
Hi All,

I am started using 5.17.o version of Activiti. I had created some process definitions as tenant based and updating the tenant id manually in the database since explorer does't support tenant based deployment.

I have notices that most of the times revision id column is not getting updated along with the process definition. When ever I create new process instance, process instance getting created on the older process definitions.  I can see new deployment record in the database but not sure How to check whether the new record is created for the new changes.
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
The revision is only updated when you update the process definition.
If you deploy a new process definition version, this won't affect the revision.

When you start a process definition, you will always start using the latest (highest version) process definition. So either your data is wrong, or you haven't deployed a new process definition.

We would need some more code and table content to know what is happening exactly.

penusila611621
Champ in-the-making
Champ in-the-making
I am updating the process definition by adding new some user activities. Revision id is not changing When I deploy the updated process definition. I need to manually update the revision id to make the updated process definition active.

I will try to post the process definition xml.

trademak
Star Contributor
Star Contributor
You should look at the VERSION_ column instead. That's the one that will get a new number when deploying a new version.

Best regards,

penusila611621
Champ in-the-making
Champ in-the-making
I misquoted as revision, actually I am talking about VERSION_ column. I am compelled to change the VERSION ID for every deployment as the VERSION id is not changing per deployment though process definition changed.

jbarrez
Star Contributor
Star Contributor
> I am updating the process definition by adding new some user activities.

Ok, and what are you doing then? Creating a new deployment with the new xml and deploying it? if so, a new version of the process definition should be deployed.

Can you demonstrate the problem in a unit test, cause I'm not exactly following the use case here

penusila611621
Champ in-the-making
Champ in-the-making
I am doing the following to make my deployed process tenant aware.

1. Creating a process definition and deploying using explorer. Then manually populating tenant id in TENANT_ID_ in ACT_RE_PROCDEF table since the deployment is done through explorer. Assume the VERSION_ is 1 with the first deployment in the table act_re_procdef
2.  Making changes to the process again and deploying the updated process using explorer. This time latestProcessDefinition = processDefinitionManager.findLatestProcessDefinitionByKey(processDefinition.getKey()); line in BpmnDeployer class returning null. Then because of this check         if (latestProcessDefinition != null) {
          processDefinitionVersion = latestProcessDefinition.getVersion() + 1;
        } else {
          processDefinitionVersion = 1;
        }

in the same class setting the VERSION_ to 1 instead of 2 as per the code. I think .findLatestProcessDefinitionByKey(processDefinition.getKey()); line is returning null because of tenant_Id_ is populated.


**************
VERSION_ column is incrementing per deployment if the TENANT_ID_ column is null. If the TENANT_ID_ is populated with any text then VERSION_ is not getting incremented per deployment.

I hope my explanation makes some sense and abstractable.

trademak
Star Contributor
Star Contributor
https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/main/java/org/activiti/...

Line 166 should work for tenant ids as well.
It would make it a lot easier if you can create a unit test showing your issue.

Best regards,