contextPath is wrong after deploying a newer version of process application

Hello, I’m using Camunda BPM as tomcat full distribution (CE) and I have deployed a simple process application (.war using maven archetype).
The project runs fine and works as expected until I bring up a new version of both process(bpmn) and war.
Suppose that I updated a user task form and updated the process tag version, in second version.
The war file has a version in the name, so it deploys to a different folder, no overwriting happens.

After deployment, when I go to Tasklist, to see the older running instances I see that contextPath is having newer version in it.

So the call to: http://localhost:9090/engine-rest/task/29a1f8bc-2309-11ea-9eed-00505694068d/form
return the following result:
{
“key”: “embedded:app:forms/form-name.html”,
“contextPath”: “/deployment-name-newer-version”
}
Basically, the older running instances are loading the newer version of the form.

Is this the expected behavior? Is it by design or is it a well-known bug ?
Can this be controlled so that old running process instances continue to use the old forms ?

Thank you in advance

Instead of /engine-rest try with /rest as context path

Hello,
Thanks for the quick answer.
Actually, I was talking about the Tasklist web app,
The result I posted was taken from the network result in browser dev tool.
I’m sorry for the confusion. I’m using the default distribution with cockpit, admin and tasklist web apps.
So, the problem is the behaviour of the task list, and task view.
(http://localhost:8090/camunda/app/tasklist/…)

Hi @roman.levinta,

Try to add below two properties to your new processes.xml file and also change the name attribute of the process-archive tag to a new deployment name different than the one used for the previous deployment

<property name="isResumePreviousVersions">true</property>
<property name="resumePreviousBy">deployment-name</property>

Or simply only try to deactivate ResumePreviousVersions as below

<property name="isResumePreviousVersions">false</property>

Actually I need to test it to confirm that it works

Life cycle of process application deployment is illustrated in below url

https://docs.camunda.org/manual/latest/user-guide/process-applications/the-processes-xml-deployment-descriptor/#process-application-deployment

Edited:
already confirmed that deactivation of ResumePreviousVersions would work.

Hi @hassang,
Thank you so much for the reply.
I tested it with the porcesses.xml below and it looks like it’s working :slight_smile:

<process-archive name="testme2-1.2">
<process-engine>default</process-engine>
<properties>
  <property name="isDeleteUponUndeploy">false</property>
  <property name="isScanForProcessDefinitions">true</property>
  <property name="isResumePreviousVersions">false</property>
  <property name="resumePreviousBy">deployment-name</property>
</properties>

I see that contextPath is being updated and active instances are loading forms per their versions.
{“key”:“embedded:app:forms/test-me.html”,“contextPath”:"/testme2-1.2"}
{“key”:“embedded:app:forms/test-me.html”,“contextPath”:"/testme2-1.1"}
{“key”:“embedded:app:forms/test-me.html”,“contextPath”:"/testme2-1.0"}

Thanks again for your help

Hi @roman.levinta,

Your settings should also work with
isResumePreviousVersions set to true

As you have a different deployment name for each version and resumePreviousBy is set to deployment-name Instead of the process definition.

When you set isResumePreviousVersions to true then you would be able to resume deployment for a previous version.

Assuming that you have updated forms and classes which you would like to apply them on the previous version 1.1, then you can open your previous project where the name attribute of the process-archive is testme2-1.1, update classes & forms then generate the war & deploy

1 Like