Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API responses with null value for UUID variable types #3856

Open
pvojtechovsky opened this issue Mar 4, 2024 · 0 comments
Open

REST API responses with null value for UUID variable types #3856

pvojtechovsky opened this issue Mar 4, 2024 · 0 comments

Comments

@pvojtechovsky
Copy link

Describe the bug
The REST API method flowable-rest/service/query/historic-variable-instances returns null as value of variable of type uuid

        {
            "id": "85077ed6-d62c-11ee-ae20-86c5a61b31b3",
            "processInstanceId": "827254fd-d62c-11ee-ae20-86c5a61b31b3",
            "processInstanceUrl": "http://test-server/flowable-rest/service/history/historic-process-instances/827254fd-d62c-11ee-ae20-86c5a61b31b3",
            "taskId": null,
            "executionId": "827254fd-d62c-11ee-ae20-86c5a61b31b3",
            "variable": {
                "name": "animalId",
                "type": "uuid",
                "value": null,  //<-------- here is unexpected null
                "scope": "global"
            }
        },

Expected behavior
The UUID variable value should be serialized as string like

"value": "201d919d-9974-4813-8628-ae815f311678",

Code
/flowable-rest/src/main/java/org/flowable/rest/service/api/RestResponseFactory.java
method createRestVariable is searching for a convertor list of variableConverters. But there is no variable converter for variable type org.flowable.variable.service.impl.types.UUIDType so the createRestVariable returns a RestVariable with null value.

Additional context
Problem was reproduced on Flowable 6.8.0, but I checked the sources and it exists on main branch too.

Would be nice to have a fix in next 7.0.x release as we are going to upgrade to that version soon.

I am going to provide a Pull request for the fix soon.

pvojtechovsky pushed a commit to pvojtechovsky/flowable-engine that referenced this issue Mar 4, 2024
pvojtechovsky pushed a commit to pvojtechovsky/flowable-engine that referenced this issue Apr 22, 2024
pvojtechovsky pushed a commit to pvojtechovsky/flowable-engine that referenced this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant