flowable / flowable/flowable-engine
Issue in Workflow App - AppDefinitions not properly fetched
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
I'm fairly new to flowable so please discard if the the issue comes from sort of misunderstanding of the code by myself.
**Describe the bug**
The effect of the issue is that in the workflow/index.html the activeAppDefinition variable is not properly initialized. For user apps the only field that gets the value is the id field but no others (i.e. theme, ...)
_activeAppDefinition:_
id: "hello2-flowable-app"
**Expected**
The activeAppDefinition should get initialized with all the fields in order to properly show headers, name on the app on the navbar and so on. Something like:
_activeAppDefinition:_
appDefinitionId: "62036e43-2cd9-11ec-a36f-1a7b10089eab"
appDefinitionKey: "hello2-flowable-app"
defaultAppId: null
description: ""
groupsAccess: null
icon: "glyphicon-asterisk"
name: "Hello2 Flowable App"
tenantId: ""
theme: "theme-1"
usersAccess: ['admin']
**Code**
The issue seems to be rooted at least to the code in [app-definition-service.js](https://github.com/flowable/flowable-engine/blob/3822276ce226835b57f5dd70aff7312ad08d3166/modules/flowable-ui/flowable-ui-task-frontend/src/main/resources/static/workflow/scripts/services/app-definition-service.js) in the segment between line 44 and 52.
The issue comes from the mismatch between the usage of the field 'id' and the field 'appDefinitionKey'.
The object returned by the rest service has the following profile: no id field but the appDefinitionKey.
_result:_
appDefinitionId: "62036e43-2cd9-11ec-a36f-1a7b10089eab"
appDefinitionKey: "hello2-flowable-app"
defaultAppId: null
description: ""
groupsAccess: null
icon: "glyphicon-asterisk"
name: "Hello2 Flowable App"
tenantId: ""
theme: "theme-1"
usersAccess: ['admin']
But the code on line 47 and 50 keeps referring to it. May be the fix might consist in renaming the references to id as references to appDefinitionKey or (for the more cautious) populate also the id on the activeAppDefinition in order not thave regression issues down the hill.
M.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.