flowable / flowable/flowable-engine
Loop characteristics collection field
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
Hi everyone, I found a bug when using Groovy as the scripting engine.
At this line:
https://github.com/flowable/flowable-engine/blob/f104f3cd303e5697e72f3e44ce1b59463a036f6f/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/AbstractActivityBpmnParseHandler.java#L80
the collection is set as an expression or a variable name depending if the field value, as a string, contains _{_. This doesn't make sense when we use the Groovy scripting engine, because an expression doesn't always contains _{_, as in JUEL.
I don't know what standard you should respect for this, but could it be possible to always look for an expression if it's Groovy ? How to write a variable name in Groovy is the same as how to write an expression, so always using an expression will also be retro-compatible.
My goal is to be able to use a field of an object as the value of collection field (ex : `a.mylist`), without having to store `a.mylist` in another variable, or without using an hack (ie: `{it->a.mylist}()`).
Thank you.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/AbstractActivityBpmnParseHandler.java at the referenced line and inspect how the collection field is classified. Reproduce the Groovy case with a collection value such as a.mylist, then verify that it resolves without an intermediate variable while existing JUEL-style expressions remain compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100