flowable / flowable/flowable-engine

When starting a process instance using the rest api the variables are passed back regardless of the returnVariables value

Aperta
#3,653 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia riproducendo la richiesta POST verso /process-api/runtime/process-instances con returnVariables omesso e impostato su false, quindi confronta entrambi i payload di risposta con la documentazione della REST API. Traccia l’endpoint di avvio dell’istanza di processo e la costruzione della relativa risposta per trovare dove vengono incluse le variabili. Il lavoro è completato quando in entrambi i casi le variabili vengono omesse, mentre i dettagli dell’istanza di processo rimangono disponibili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, spring-boot
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.