Effortless migration from Activiti to Flowable

Although not really a question I would like to confirm how easy it is to migrate from Activiti to Flowable. We are developing and maintaining a case management system used by several municipalities in the Netherlands. The BPMN engine is the hard of the system and recently we migrated from Activiti version 5.22 to Flowable version 5.22. The only thing we needed to do was to change the groupId and artifactId in our Maven pom files and voila. The reason we migrated is the sublime support we receive from the Flowable team. We had an issue with the Skipping Activity Behavior functionality in Activiti because skipping a service task did not work. After consulting the Flowable team they confirmed that the implementation was flawed and they fixed it right away in version 5.23 of Flowable! So be aware that this bug still exists in the latest Activiti 5.x version :wink:
Flowable team: Thank you very much for this awesome support! :+1:

4 Likes

Thanks for the great feedback.

Best regards
Paul.

Hi Andy, good to hear that it was an easy migration.
We are tyring to migrate from activiti5.2.0 to flowable 6.2.0.

I have acitive process running which should also be migrated and must resume its process properly.
i see the active jobs in act_ru_job are moved to act_deadletter_jobs , not sure why this is done.
Facing some issues and also not sure if the flowable UI can show the acitiviti jobs status.

@ansdy/@flowable team, Any information or expereience on this will help.

Hi Rasmikanta,

http://www.flowable.org/docs/userguide/migration.html can help you.
Job management has changed in flowable 6.
There is an upgrade script to transform Flowable 5 jobs to Flowable 6 jobs (see e.g. flowable.h2.upgradestep.6001.to.6002.engine.sql).

To display jobs use flowable-admin app.

Regards
Martin

1 Like

Thanks Martin for your response. Will do the same.

Hi Martin,

Is flowable 5 and activit 5 are same ?

Also, How to enable Flowable v5 compatibility using spring boot.
I tried all the way, but not working.

Regards,
Rasmikanta

Hi Rasmikanta,

Activiti 5 vs Flowable 5. They are quite similar, but I would not say the same.

<bean id="processEngineConfiguration" class="org.flowable.spring.SpringProcessEngineConfiguration">
    <property name="dataSource" ref="dataSource"/>
    <property name="transactionManager" ref="transactionManager"/>
    <property name="databaseSchemaUpdate" value="true"/>
    <property name="flowable5CompatibilityEnabled" value="true" />
    <property name="flowable5CompatibilityHandlerFactory" ref="flowable5CompabilityFactory" />
    <property name="asyncExecutorActivate" value="false"/>
</bean>

<bean id="processEngine" class="org.flowable.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration"/>
</bean>

<bean id="flowable5CompabilityFactory" class="org.activiti.compatibility.spring.SpringFlowable5CompatibilityHandlerFactory" />

I do not know exactly what are you asking for regarding spring boot. (When you start new project you do not need compatibility handler.)

Martin

Hi Martin,

Thanks for your response. I have another question.

Currently I am running a process using activiti 5.2.0 and the process will be completed after doing 6 jobs. But, after the 2nd job I shutdown the application and migrated to flowable 6.2.0. After migration, I saw my current running job which was in act_ru_job table moved to act_ru_deadletter_job table and the job which I stopped in activiti version was not resumed in flowable version.

What is the way for resuming pending job in activiti version to flowable version?

Thanks,
Rasmikanta

only retries <= 0 jobs are moved to ACT_RU_DEADLETTER_JOBtable.

What is the way for resuming pending job in activiti version to flowable version?

org.flowable.engine.ManagementService#moveDeadLetterJobToExecutableJob
org.flowable.engine.impl.cmd.ActivateProcessInstanceCmd

Martin

-- Moving jobs with retries <= 0 to ACT_RU_DEADLETTER_JOB

INSERT INTO ACT_RU_DEADLETTER_JOB (ID_, REV_, TYPE_, EXCLUSIVE_, EXECUTION_ID_, PROCESS_INSTANCE_ID_, PROC_DEF_ID_, 
EXCEPTION_STACK_ID_,     EXCEPTION_MSG_, DUEDATE_, REPEAT_, HANDLER_TYPE_, HANDLER_CFG_, TENANT_ID_)
(SELECT ID_, REV_, TYPE_, EXCLUSIVE_, EXECUTION_ID_, PROCESS_INSTANCE_ID_, PROC_DEF_ID_, 
EXCEPTION_STACK_ID_, EXCEPTION_MSG_, DUEDATE_, REPEAT_, HANDLER_TYPE_, HANDLER_CFG_, TENANT_ID_ 
from ACT_RU_JOB WHERE RETRIES_ <= 0);

DELETE FROM ACT_RU_JOB 
WHERE RETRIES_ <= 0;

Hi Martin,

<bean id=“processEngineConfiguration” class=“org.flowable.spring.SpringProcessEngineConfiguration”>
<property name=“dataSource” ref=“dataSource”/>
<property name=“transactionManager” ref=“transactionManager”/>
<property name=“databaseSchemaUpdate” value=“true”/>
<property name=“flowable5CompatibilityEnabled” value=“true” />
<property name=“flowable5CompatibilityHandlerFactory” ref=“flowable5CompabilityFactory” />
<property name=“asyncExecutorActivate” value=“false”/>
</bean>

<bean id=“processEngine” class=“org.flowable.spring.ProcessEngineFactoryBean”>
<property name=“processEngineConfiguration” ref=“processEngineConfiguration”/>
</bean>

<bean id=“flowable5CompabilityFactory” class=“org.activiti.compatibility.spring.SpringFlowable5CompatibilityHandlerFactory” />

After configuring above steps as mentioned by you for flowable 5 Compatibility Enabled using config file for spring boot application instead of xml file, I am getting the below error.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘processEngine’: FactoryBean threw exception on object creation; nested exception is org.flowable.engine.common.api.FlowableException: invalid command interceptor chain configuration: []

In spring boot application, I am putting the configuration in config file instead of xml file for flowable 5 compatibility as below

import org.activiti.compatibility.spring.SpringFlowable5CompatibilityHandlerFactory;
import org.flowable.engine.compatibility.Flowable5CompatibilityHandlerFactory;
import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FlowableConfig {

@Bean
public SpringProcessEngineConfiguration getSpringProcessEngineConfiguration() {
	return new SpringProcessEngineConfiguration() {
		@Override
		public ProcessEngineConfigurationImpl setFlowable5CompatibilityEnabled(
				boolean flowable5CompatibilityEnabled) {
			// TODO Auto-generated method stub
			return super.setFlowable5CompatibilityEnabled(true);
		}
		
		@Override
		public ProcessEngineConfigurationImpl setFlowable5CompatibilityHandlerFactory(
				Flowable5CompatibilityHandlerFactory flowable5CompatibilityHandlerFactory) {
			flowable5CompatibilityHandlerFactory = new SpringFlowable5CompatibilityHandlerFactory();
			return super.setFlowable5CompatibilityHandlerFactory(flowable5CompatibilityHandlerFactory);
		}
	};
}

}

I have added below dependecy to maven.

<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-basic</artifactId>
<version>6.2.0</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable5-spring-compatibility</artifactId>
<version>6.2.0</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable5-compatibility</artifactId>
<version>6.2.0</version>
</dependency>

Just need a help on this to resolve.

Thanks,
Rasmikanta

Hi,

Have a look on org.activiti.engine.test.cfg.V5ValidationEnabledTest#testRunningV5ProcessInstancesAfterReboot in the flowable source.

Regards
Martin