Flowable-Admin - problem with Variables


#1

Hi,

I tried the new version Flowable (6.1.1) and found that Flowable-Admin UI app has a problem with Variables show. When I set custom Object with settings(strings…) as variable and I start the proces, then in Flowable-Admin UI app I do not see the variables (attached screen). Would you please look at it.

Best regards
Livio


#2

I’ve tested it with an object variable, and it’s shown in the overview (although the value is shown as binary as it doesn’t know how to display it):

What kind of variable are you using? How are you setting it? Any stacktrace?


#3

Hi Joram,

I used only a string variable in my object. Variables are not showing becouse I’m having a problem with “deserialize object in variable”.

Link to my test project:

I have no idea.
I’m grateful for every advice.

Best regards
Livio


#4

Hi Joram,

It already works. I’m sorry, my fault. I forgot to add jar file with my source code to Tomcat’s lib folder.

I have a question about adding custom mechanism for serializing. What should I do when I want the FlowableUI app knows my own serialization?

Thanks for your advice.
Livio


#5

Depends on what you want to serialize? What kind of object? Is it needed to serialize it or is storing an identifier(and do a lookup) enough?

For the rest api, you can have custom serializers, see http://www.flowable.org/docs/userguide/index.html#_request_parameters :

It’s possible to support additional variable-types with a custom JSON representation (either simple value or complex/nested JSON object). By extending the initializeVariableConverters() method on org.flowable.rest.service.api.RestResponseFactory, you can add additional org.flowable.rest.service.api.engine.variable.RestVariableConverter classes to support converting your POJO’s to a format suitable for transferring through REST and converting the REST-value back to your POJO. The actual transformation to JSON is done by Jackson.