Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-instance collection expression is invoked with inconsistent delegate execution state #2082

Open
ThorbenLindhauer opened this issue Feb 2, 2016 · 2 comments
Labels
scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI type:bug Issues that describe a user-facing bug in the project.

Comments

@ThorbenLindhauer
Copy link
Member

ThorbenLindhauer commented Feb 2, 2016

This issue was imported from JIRA:

Field Value
JIRA Link CAM-5358
Reporter @ThorbenLindhauer
Has restricted visibility comments true

Current behavior:

  • For a multi-instance activity with a collection expression and an element variable, the collection expression is invoked n + 1 times. Once to determine the number of iterations, and n times to determine the element variable value for every iteration
  • It is possible to use the execution as a variable in the collection expression, e.g. $\{myBean.resolveCollection(execution)\}.
  • for the invocations that determine the element variable, the execution is not in a state that the DelegateExecution interface provides. For example, the method #getCurrentActivityId returns null

Expected behavior:

  • All methods in the DelegateExecution interface can be used when resolving a collection expression

Failing test case: 8d7a4e0

Solution ideas:

  1. Invoke collection expression only once and store the collection somewhere to iterate over it (e.g. next to the multi-instance variables). Downside: collections must be serializable
  2. Make sure the executions are properly initialized before the collection expression is invoked

Links:

@ThorbenLindhauer
Copy link
Member Author

This comment was imported from JIRA and written by user DY4BDpm

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Sorry for not having a Github PR

This is a Patch, based on the current master branch.

passing new tests are (class MultiInstanceTest):
testParallelUserTasksBasedOnCollectionExpression
testSequentialSubProcessOnCollectionExpression

<^FixCAM5358.patch>

@ThorbenLindhauer
Copy link
Member Author

This comment was imported from JIRA and written by user YqDPaDV

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Ok, this patch is obsolete; it uses fields.
The collection should be persisted to the DB probably.
(I have no permission to delete the attachment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI type:bug Issues that describe a user-facing bug in the project.
Projects
None yet
Development

No branches or pull requests

1 participant