Please suggest alternative class of activiti 5.15.1

cancel
Showing results for 
Search instead for 
Did you mean: 
jkanjariya
Member II

Please suggest alternative class of activiti 5.15.1

Hi,

These are the following java class files missing in activiti 6.0.0 but available in activiti 5.15.1 version.

Can you suggest how we can find alternative of this class for this functionality.Because of we are using this class and Now we are upgrade activiti version so,how we can deal with it.

org.activiti.engine.impl.jobexecutor.JobExecutor
org.activiti.engine.impl.jobexecutor.MessageAddedNotification
org.activiti.engine.impl.persistence.entity.TimerEntity
org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator

org.activiti.engine.impl.pvm.PvmTransition
org.activiti.engine.impl.pvm.process.ActivityImpl
org.activiti.engine.impl.pvm.process.TransitionImpl

org.apache.commons.lang3.StringUtils
org.activiti.rest.common.api.ActivitiUtil
org.activiti.rest.common.api.DefaultResource

org.activiti.rest.service.application.ActivitiRestServicesApplication
org.activiti.rest.editor.main.EditorRestResource
org.activiti.rest.editor.main.PluginRestResource
org.activiti.rest.editor.main.StencilsetRestResource
org.activiti.rest.diagram.application.DiagramServicesInit
org.activiti.rest.editor.application.ModelerServicesInit
org.activiti.rest.service.application.ActivitiRestServicesApplication
org.activiti.rest.diagram.services.ProcessDefinitionDiagramLayoutResource
org.activiti.engine.impl.pvm.process.ActivityImpl
org.activiti.rest.common.api.SecuredResource
org.activiti.rest.common.api.ActivitiUtil

1 Reply
JadB
Member II

Re: Please suggest alternative class of activiti 5.15.1

  • For org.activiti.engine.impl.jobexecutor.JobExecutor :

The async executor (org.activiti.engine.impl.asyncexecutor.AsyncExecutor) is the only one executor available starting 6.0.0. More details : https://www.activiti.org/userguide/#jobExecutorConfiguration Also, make sure to activate it, it's not activated and not started by default.

  • For org.activiti.engine.impl.jobexecutor.MessageAddedNotification :

It was related to the old JobExecutor. Now with the AsyncExecutor, you can use (org.activiti.engine.impl.jobexecutor.AsyncJobAddedNotification), here's a snippet :

 

        AsyncExecutor jobExecutor = Context.getProcessEngineConfiguration().getAsyncExecutor();
        AsyncJobAddedNotification asyncJobAddedNotification = new AsyncJobAddedNotification(job, jobExecutor);
        commandContext.addCloseListener(asyncJobAddedNotification);

 

 

  • For org.activiti.engine.impl.persistence.entity.TimerEntity :

You can use org.activiti.engine.impl.persistence.entity.TimerJobEntity instead

  • For org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator :

You should use activiti-image-generator-6.0.0.jar where you can find org.activiti.image.impl.DefaultProcessDiagramGenerator

 

  • For org.activiti.engine.impl.pvm.* :

Here's the official explanation : https://www.activiti.org/migration#_pvm_classes

All classes from the org.activiti.engine.impl.pvm package (and subpackages) have been removed. This is because the PVM (Process Virtual Machine) model has been removed and replaced by a simpler and more lightweight model.

This means that usages of ActivitiImpl, ProcessDefinitionImpl, ExecutionImpl, TransitionImpl are invalid.
  • For org.apache.commons.lang3.StringUtils :

This is not related to Activiti. If they removed the dependency, you can still import it : https://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.9

  • For all classes related to activiti-rest, I suggest reading https://www.activiti.org/userguide/#_rest_api as they're not using Restlet anymore. SpringMVC is now used with an easy integration with SpringBoot, and Spring in general.

 

Kind regards,

Jad Bouchouka