When starting a process instance using the rest api the variables are passed back regardless of the returnVariables value
Framework: Spring Boot Dependency: org.flowable:flowable-spring-boot-starter-process-rest:6.8.0
Describe the bug According to the documentation when calling the REST API to start a process instance, if you do not provide the returnVariables parameter or set it to false the response from the API should not return the variables. The response always return the variables.
Expected behavior When omitting the returnVariables parameter or setting returnVariables to false, it is expected that the return variables should not be returned in the response payload however they are always returned
Code method: POST endpoint: /process-api/runtime/process-instances Request Body:
{
"processDefinitionKey":"AssignDocumentSection",
"variables": [
{
"name":"editorUserId",
"value":"01a3fea5-faa2-4418-a9d6-8055f7128d24"
},
{
"name":"reviewerUserId",
"value":"d311dfc8-344f-4a08-9a00-307b45d1e040"
},
{
"name":"programId",
"value":"p1"
},
{
"name":"documentId",
"value":"d1"
},
{
"name":"sectionId",
"value":"s1"
}
]
}
Response:
{
"id": "3091f47a-f417-11ed-8bc0-326f969db630",
"url": "http://localhost:8080/process-api/runtime/process-instances/3091f47a-f417-11ed-8bc0-326f969db630",
"name": null,
"businessKey": null,
"businessStatus": null,
"suspended": false,
"ended": false,
"processDefinitionId": "AssignDocumentSection:1:2080a4a9-f417-11ed-8bc0-326f969db630",
"processDefinitionUrl": "http://localhost:8080/process-api/repository/process-definitions/AssignDocumentSection:1:2080a4a9-f417-11ed-8bc0-326f969db630",
"processDefinitionName": "AssignDocumentSection",
"processDefinitionDescription": "A simple process to assign a document section and track through completion",
"activityId": null,
"startUserId": null,
"startTime": "2023-05-16T14:26:35.465-04:00",
"variables": [
{
"name": "lookupEditorUserIdResponseStatusCode",
"type": "integer",
"value": 200,
"scope": "local"
},
{
"name": "lookupEditorUserIdResponseHeaders",
"type": "string",
"value": "date: Tue, 16 May 2023 18:26:35 GMT\nserver: uvicorn\ncontent-length: 300\ncontent-type: application/json",
"scope": "local"
},
{
"name": "lookupReviewerUserIdResponseReason",
"type": "string",
"value": "OK",
"scope": "local"
},
{
"name": "sectionId",
"type": "string",
"value": "s1",
"scope": "local"
},
{
"name": "lookupEditorUserIdResponseReason",
"type": "string",
"value": "OK",
"scope": "local"
},
{
"name": "lookupEditorUserIdResponseProtocol",
"type": "string",
"value": "HTTP/1.1",
"scope": "local"
},
{
"name": "lookupReviewerUserIdResponseStatusCode",
"type": "integer",
"value": 200,
"scope": "local"
},
{
"name": "reviewerUserId",
"type": "string",
"value": "d311dfc8-344f-4a08-9a00-307b45d1e040",
"scope": "local"
},
{
"name": "lookupReviewerUserIdResponseHeaders",
"type": "string",
"value": "date: Tue, 16 May 2023 18:26:36 GMT\nserver: uvicorn\ncontent-length: 280\ncontent-type: application/json",
"scope": "local"
},
{
"name": "editorUserId",
"type": "string",
"value": "01a3fea5-faa2-4418-a9d6-8055f7128d24",
"scope": "local"
},
{
"name": "assigneeName",
"type": "string",
"value": "Robert",
"scope": "local"
},
{
"name": "lookupReviewerUserIdResponseProtocol",
"type": "string",
"value": "HTTP/1.1",
"scope": "local"
},
{
"name": "documentId",
"type": "string",
"value": "d1",
"scope": "local"
},
{
"name": "programId",
"type": "string",
"value": "p1",
"scope": "local"
},
],
"callbackId": null,
"callbackType": null,
"referenceId": null,
"referenceType": null,
"propagatedStageInstanceId": null,
"tenantId": "",
"completed": false
}
The expectation is that the variables should not be returned.