flowable / flowable/flowable-engine
Infinite recursion when query for case definition model detail by using Rest API
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
`curl -X GET --header 'Accept: application/json' 'http://flowable-rest-server:8081/flowable-rest/cmmn-api/cmmn-repository/case-definitions/{caseDefinitionId}/model'
`
Send request to get the cmmn deployment model, get recursive json response.
```
{
"id": null,
"name": null,
"targetNamespace": "http://www.flowable.org/casedef",
"expressionLanguage": null,
"exporter": "Flowable Open Source Modeler",
"exporterVersion": "6.8.0",
"author": null,
"creationDate": null,
"cases": [
{
"id": "dataRequest",
"xmlRowNumber": 3,
"xmlColumnNumber": 89,
"extensionElements": {},
"attributes": {},
"documentationTextFormat": null,
"documentation": null,
"name": "Data Request",
"initiatorVariableName": "initiator",
"planModel": {
"id": "planModel",
"xmlRowNumber": 4,
"xmlColumnNumber": 98,
"extensionElements": {},
"attributes": {},
"documentationTextFormat": null,
"documentation": null,
"name": "Plan Model",
"parent": null,
"planItemRef": null,
"defaultControl": null,
"lifecycleListeners": [],
"planItem": null,
"sentries": [
{
"id": "sentry4",
"xmlRowNumber": 14,
"xmlColumnNumber": 56,
"extensionElements": {},
"attributes": {},
"documentationTextFormat": null,
"documentation": null,
"name": "exitDefineTravelData",
"parent": {
"id": "planModel",
"xmlRowNumber": 4,
"xmlColumnNumber": 98,
"extensionElements": {},
"attributes": {},
...
```
`{"message": "Bad request","exception": "Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: org.flowable.cmmn.model.Sentry[\"parent\"]->org.flowable.cmmn.model.Stage[\"sentries\"]->java.util.ArrayList[0]->org.flowable.cmmn.model.Sentry[\"parent\"]->org.flowable.cmmn.model.Stage[\"sentries\"]->java.util.ArrayList[0]->org.flowable.cmmn.model.Sentry[\"parent\"]->org.flowable.cmmn.model.Stage[\"sentries\"]->java.util.ArrayList[0]->org.flowable.cmmn.model.Sentry[\"parent\"]...`
cmmn model
[data-request.cmmn.txt](https://github.com/flowable/flowable-engine/files/12615298/data-request.cmmn.txt)
**Expected behavior**
The API should return the cmmn deployment model details.
**Code**
n/a
**Additional context**
https://hub.docker.com/r/flowable/flowable-rest
v6.8.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.