-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
None
-
False
-
---
-
---
-
-
When a workflow instance is triggered by a cloud event something wrong in the data index happens and you get the following error after a graphql enquiry:
{"errors":[{"message":"The field at path '/ProcessInstances[0]/nodes[1]/enter' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value. The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'DateTime' within parent type 'NodeInstance'","path":["ProcessInstances",0,"nodes",1,"enter"],"extensions":{"classification":"NullValueInNonNullableField"}}],"data":{"ProcessInstances":[null]}}
Steps to reproduce the problem:
Start Quarkus in dev mode.
Start a new instance of correlation_callback workflow through Cloud Event:
curl -X POST -H "Content-Type: application/json" -H "ce-specversion: 1.0" -H "ce-source: coolSystem" -H "ce-type: cbStartEventType" -H "ce-id: f0643c68-609c-48aa-a820-5df423fa4f01" -d '{ "name":"Donato" }' http://localhost:8080
The instance is active and waiting for an event to complete.
The following curl command extract from data index the current status of the workflow instance:
curl 'http://localhost:8180/graphql' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Origin: http://localhost:8180' \ -H 'Referer: http://localhost:8180/graphiql/' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ --data-raw '{"query":"{\n ProcessInstances {\n id\n processId\n processName\n businessKey\n parentProcessInstanceId\n roles\n variables\n state\n start\n lastUpdate\n end\n addons\n endpoint\n addons\n serviceUrl\n nodes {\n id\n nodeId\n name\n enter\n exit\n type\n definitionId\n __typename\n }\n __typename\n }\n}\n","variables":null}' \ --compressed
Advance and complete the workflow instance sending another Cloud Event:
curl -X POST -H "Content-Type: application/json" -H "ce-specversion: 1.0" -H "ce-source: coolSystem" -H "ce-type: cbContinueEventType" -H "ce-id: f0643c68-609c-48aa-a820-5df423fa4f02" -d '{ "name":"Donato" }' http://localhost:8080
Inspect again the data index:
curl 'http://localhost:8180/graphql' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Origin: http://localhost:8180' \ -H 'Referer: http://localhost:8180/graphiql/' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ --data-raw '{"query":"{\n ProcessInstances {\n id\n processId\n processName\n businessKey\n parentProcessInstanceId\n roles\n variables\n state\n start\n lastUpdate\n end\n addons\n endpoint\n addons\n serviceUrl\n nodes {\n id\n nodeId\n name\n enter\n exit\n type\n definitionId\n __typename\n }\n __typename\n }\n}\n","variables":null}' \ --compressed
- is related to
-
KOGITO-8358 Event Date missing on Serverless Workflow + Data Index integration
- Resolved