# Upgrade from v5 to v6 - compatibility tag

**URL:** https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792
**Category:** Flowable Engine
**Created:** [October 25, 2018, 6:41am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792 "2018-10-25T06:41:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kayn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kayn/32/904_2.png) [@kayn](https://forum.flowable.org/u/kayn)
#### Post date: [October 25, 2018, 6:41am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/1 "2018-10-25T06:41:48Z")

</div>

Hi,

I run activiti v5.18 I wanted to upgrade to flowable. So I bootstrapped new machines with flowable v6.3.1 and I imported the database from activiti. I ran proper migration sql scripts but I got into an issue with compatibility.

> Found v5 process definitions that are the latest version. Enable the ‘flowable5CompatibilityEnabled’ property in the process engine configuration and make sure the flowable5-compatibility dependency is available on the classpath

My question is why it tries to run with v5 compatibility when I would like to run v6. Is there some way how to force it in _application.properties_?

---

<div class="post-metadata">

### Author: ![tijs](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tijs](https://forum.flowable.org/u/tijs)
#### Post date: [October 25, 2018, 6:45am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/2 "2018-10-25T06:45:22Z")

</div>

Hi,

When you have running process instances on V5 the v5 compatibility engine will complete these processes using the v5 engine logic. When you deploy new process definitions, they will be started with the v6 engine. And the idea is that when all v5 instances have been completed and all process definitions have been redeployed, then you don’t need the v5 compatibility engine anymore.

Best regards,

Tijs

---

<div class="post-metadata">

### Author: ![kayn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kayn/32/904_2.png) [@kayn](https://forum.flowable.org/u/kayn)
#### Post date: [October 25, 2018, 7:18am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/3 "2018-10-25T07:18:14Z")

</div>

I stopped all running processes. I’m running completely new instance where flowable can’t even start at the moment.

I made a dump of database on a running stack with activiti v5.18. Isn’t the issue caused by this? It seems that activiti/flowable keeps an information about running processes in a database ([java - Activiti / Flowable: Get all running instances of process - Stack Overflow](https://stackoverflow.com/a/50757974/1751337)).

I looked into the table mentioned on stackoverflow but it shows 90k+ processes without END\_TIME\_ specified:

> mysql\> select count(_) from ACT\_HI\_PROCINST where END\_TIME\_ is not null;  
> ±---------+  
> | count(_) |  
> ±---------+  
> | 94258 |  
> ±---------+

---

<div class="post-metadata">

### Author: ![tijs](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tijs](https://forum.flowable.org/u/tijs)
#### Post date: [October 25, 2018, 7:33am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/4 "2018-10-25T07:33:17Z")

</div>

Stopping all running process instances is not enough. You also need to deploy all process definitions again to make them available for the Flowable 6 engine. So when upgrading from a v5 engine you always have to start it with the v5 compatibility module to at least deploy all process definitions again. After doing that, you should be able to run it without the v5 compatibility module when there are no running v5 instances.

What do you mean with stopping all running process instances exactly? Did you delete all these process instances? The process instances in the ACT\_HI\_PROCINST table are not relevant, it’s only there for historic information and audit purpose.

Best regards,

Tijs

---

<div class="post-metadata">

### Author: ![kayn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kayn/32/904_2.png) [@kayn](https://forum.flowable.org/u/kayn)
#### Post date: [October 25, 2018, 7:50am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/5 "2018-10-25T07:50:24Z")

</div>

> [@tijs](#):
>
> Stopping all running process instances is not enough. You also need to deploy all process definitions again to make them available for the Flowable 6 engine. So when upgrading from a v5 engine you always have to start it with the v5 compatibility module to at least deploy all process definitions again. After doing that, you should be able to run it without the v5 compatibility module when there are no running v5 instances.

I’m sysadmin so I probably mix a linux process running on linux kernel and the process of Flowable. I don’t know Flowable too much. I’m just trying to upgrade it and run it under Tomcat.

Do you know how to enable the compatibility module when I don’t use XML based configuration but _application.properties_? The documentation about the migration ([Open Source](https://flowable.org/docs/userguide/migration.html)) doesn’t mention it. If I get it correctly, it has to be explicitly enabled + I need the compatibility libraries JARs ( _flowable5-spring_ and _flowable5-spring-compatibility_).

> [@tijs](#):
>
> What do you mean with stopping all running process instances exactly? Did you delete all these process instances? The process instances in the ACT\_HI\_PROCINST table are not relevant, it’s only there for historic information and audit purpose.

Nope, I haven’t touched. I was just Googling around about the Flowable processes.

---

<div class="post-metadata">

### Author: ![spille](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/spille/32/19_2.png) [@spille](https://forum.flowable.org/u/spille)
#### Post date: [October 30, 2018, 9:49am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/6 "2018-10-30T09:49:16Z")

</div>

Hi,

We tried adding these properties to the application.properties file:

> flowable.flowable.flowable5CompatibilityEnabled=true
> 
> and
> 
> flowable.flowable5-compatibility-enabled=true
> 
> and
> 
> backwardcompatibility.enable-flowable5-compatibility=true

Without success.

Can you tell me where we can configure this in flowable 6?  
We are unable to find the (old) flowable-custom-contect.xml

If we know where we can configure this, we would be happy to update the migration docs.

Thanks in advance,

Cheers,  
Spille

---

<div class="post-metadata">

### Author: ![kayn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kayn/32/904_2.png) [@kayn](https://forum.flowable.org/u/kayn)
#### Post date: [November 1, 2018, 8:35am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/7 "2018-11-01T08:35:18Z")

</div>

I fixed it in my way at the end. You need to build 2 JAR files yourself with a hardcoded configuration and a hacked condition. The “fixed” JARs are copied over into Tomcat into a directory with the flowable-rest and flowable-task apps.

### flowable-engine-6.4.0.jar

- download a source code, uncompress it and go to a created directory: [https://github.com/flowable/flowable-engine/archive/flowable-6.4.0.tar.gz](https://github.com/flowable/flowable-engine/archive/flowable-6.4.0.tar.gz)

- enable backward compatibility in _./modules/flowable-engine/src/main/java/org/flowable/engine/impl/cfg/ProcessEngineConfigurationImpl.java_ by changing the line 866:

to this

```
     protected boolean flowable5CompatibilityEnabled = true;

```

- create packages by

- the wanted JAR was created in _./modules/flowable-engine/target/flowable-engine-6.4.0.jar_

- replace a original _flowable-engine-6.4.0.jar_ file in _/usr/local/lib/tomcat/webapps/flowable-rest/WEB-INF/lib/_ and _/usr/local/lib/tomcat/webapps/flowable-task/WEB-INF/lib/_

### flowable5-compatibility-6.4.0.jar

- go to _modules/flowable5-compatibility_ in the same .zip file

- replace the line 42

by

```
     if (true) {

```

- create a package by

- the needed JAR is in _./target/flowable5-compatibility-6.4.0.jar_

- copy over this file into _/usr/local/lib/tomcat/webapps/flowable-rest/WEB-INF/lib/_ and _/usr/local/lib/tomcat/webapps/flowable-task/WEB-INF/lib/_

### other necessary compatibility JARs

- download flowable and unzip it [https://github.com/flowable/flowable-engine/releases/download/flowable-6.4.0/flowable-6.4.0.zip](https://github.com/flowable/flowable-engine/releases/download/flowable-6.4.0/flowable-6.4.0.zip)
- copy over _libs/flowable5-engine-6.4.0.jar_ , _libs/flowable5-compatibility-6.4.0.jar_ , _libs/flowable5-spring-6.4.0.jar_ and _libs/flowable5-spring-compatibility-6.4.0.jar_ into _/usr/local/lib/tomcat/webapps/flowable-rest/WEB-INF/lib/_ and _/usr/local/lib/tomcat/webapps/flowable-task/WEB-INF/lib/_
- note: there is also a original _flowable5-compatibility-6.4.0.jar_ that we rebuilt with the fix in the previous subsection

---

<div class="post-metadata">

### Author: ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)
#### Post date: [November 5, 2018, 8:07am UTC](https://forum.flowable.org/t/upgrade-from-v5-to-v6-compatibility-tag/2792/8 "2018-11-05T08:07:31Z")

</div>

There is a slightly easier way to do this 🙂.

Have a look at my comment in [Database migration from activiti to flowable](https://forum.flowable.org/t/database-migration-from-activiti-to-flowable/2835/4?u=filiphr).
