cancel
Showing results for 
Search instead for 
Did you mean: 

DeployCmd (and other Commands) not Serializable

retourfer
Champ in-the-making
Champ in-the-making
Hi
we want to integrate Activiti Workflow Engine in our Client/Server application. This means the activity engine is running in the server application and the user interface is implemented in an Eclipse RCP application. The remoting is done with Spring HttpInvoker.

I was able to access the process engine and all its exported services from within the client application and i can i.e. execute a ProcessDefinitionQuery.

But if i want to deploy a new process definition i fail because the DeployCmd class is not defined Serializable. I checked other command classes and it seem that none is defined Serializable but all contain the declaration
  private static final long serialVersionUID = 1L;

Does this mean that the Activiti Workflow Engine can not be used within a Client/Server application or how should i use it in this scenario?

The issue ACT-835 says that this was a bug and is fixed in version 5.7. I am working with version 5.9 and it seems that this fix is lost again!?!
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

The JIRA issue you are referring to fixed StartProcessInstanceCmd I think.
It would be easy to add this to the DeployCmd as well. Do you need other commands?

Best regards,

retourfer
Champ in-the-making
Champ in-the-making
Hi

currently i only need the DeployCmd but i found some more commands which have serialVersionUID = 1L specified but do not implement Serializable interface.
- AcquireJobsCmd
- DeleteJobsCmd
- GetNextIdBlockCmd

But with the change in DeployCmd i can then deploy a new process definition.

The next problem then comes up if i try to start a new process instance RuntimeService.startProcessInstanceById(id) because the returned ProcessInstance object is also not serializable and i think there will be a lot more classes which are not serializable.

So therefore my questions:
Did somebody already run the activity engine in a distributed environment and if yes how?
Is running activity engine in a client/server environment a scenario which should be supported but does not yet work properly?

trademak
Star Contributor
Star Contributor
Hi,

Right, the REST API would be the default choice for that. Would that work for you?
I haven't heard of any client/server apps that bypass the REST API.

Best regards,

retourfer
Champ in-the-making
Champ in-the-making
Hi

i think i found a solution to make it working without using the REST API. To try now with it i have no time yet.

I used converters on the server side for some not serializable data types like ProcessInstance, StartFormData, … which convert their attributes into a serializable implementation of the interface.

But i use some more classes to be made serializable from the form package
- FormPropertyImpl
- all the FormType classes like BooleanFormType, DateFormType, EnumFormType, LongFormType, StringFormType …

i tried all these changes already and at least my example seems to work fine.

retourfer
Champ in-the-making
Champ in-the-making
Hi

i found some more classes which are not serializable. they are all located in the package org.activiti.engine.impl.persistence.entity. Some of them are serializable but unfortunately not all. I had a short look into some of them and they all have scalar attributes, Strings or references to other entities so i can not see any problem to make them serializable.

regards
Reto
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.