flowable / flowable/flowable-engine
When starting a process instance using the rest api the variables are passed back regardless of the returnVariables value
- Vorherrschende Sprache
- Java
- Sterne
- 9.5k
- Forks
- 2.9k
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
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:
```json
{
"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:
```json
{
"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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die POST-Anfrage an /process-api/runtime/process-instances mit weggelassenem returnVariables und auf false gesetzt zu reproduzieren, und vergleiche anschließend beide Antwort-Payloads mit der REST API-Dokumentation. Verfolge den Start-Endpunkt der Prozessinstanz und die Erstellung seiner Antwort, um herauszufinden, wo Variablen eingeschlossen werden. Als erledigt gilt die Aufgabe, wenn in beiden Fällen Variablen weggelassen werden, während Details zur Prozessinstanz weiterhin verfügbar sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, spring-boot
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100