Flowable-admin UI fails to show process/task variables

The request and response error that I see in chrome inspect is

Request URL:http://localhost:8080/flowable-admin/app/rest/admin/process-instances/1240005/variables
Request Method:GET
Status Code:400 Bad Request

{"message":"Couldn't deserialize object in variable 'section'","messageKey":"GENERAL.ERROR.BAD-REQUEST"}

This section is actually a task local variable and is an object (a Pojo which implements Serializable and has a serialVersionUID). I was expecting to see its string representation in flowable-admin under variables tab:

{
"pk": 1,
"startId": 5,
"endId": 6
}

I think the variables request call fails in case I do have an object as a process/task variable. I am probably missing something which is leading to this issue. I did try to put the spring boot source code jar package in TOMACT_HOME/webapps/flowable-rest/WEB-INF/lib folder too but that didn’t help.

If the class implements Serializable, it should show something, the java serialized bytes at least. So you’re not seeing even that?

Yes, I am not seeing anything. Does it have to do anything with my Spring boot source code jar placed in TOMCAT_HOME/webapps/flowable-rest/WEB-INF/lib folder. I have tried it but without any success.

I see nothing as the very request flowable-admin makes for fetching variables fails with 400.

@Data
public class SectionVariable implements Serializable {

    private static final long serialVersionUID = 1152040361756319791L;

    private Long pk;
    private Long startIdx;
    private Long endIdx;

    // Constructors
    ...
    ...
}

@Data is a lombok annotation, a shorthand for implementing setters, getters, equals, hashcode, toString etc.

Never mind, there was some issue with the directory structure in Jar. I am now getting binary values and need to work on custom JSON VariableTypes. Thanks.

Any comments on how I can show object variable (may be a custom toString() method) in flowable-admin instead of their binary representation ?

Hi,

In the Flowable user guide there’s a section at the bottom of this link (http://www.flowable.org/docs/userguide/index.html#_request_parameters) about adding custom RestVariableConverter class implementations and add them to the initializeVariableConverters of the RestResponseFactory (In the Flowable Rest or Flowable Task app). There you can add a transformation of the binary representation to JSON and then this will be shown in the Flowable Admin UI.

Best regards,

Tijs