pefernan commented on code in PR #3554:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3554#discussion_r1686371559
##########
jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/ForEachNodeInstance.java:
##########
@@ -319,21 +317,13 @@ private boolean areNodeInstancesCompleted() {
return getNodeInstanceContainer().getNodeInstances().size() == 1;
}
- private boolean evaluateCompletionCondition(String expression,
Map<String, Object> tempVariables) {
- if (expression == null || expression.isEmpty()) {
- return false;
- } else {
- try {
- Object result =
MVELProcessHelper.evaluator().eval(expression,
- new ForEachNodeInstanceResolverFactory(this,
tempVariables));
- if (!(result instanceof Boolean)) {
- throw new IllegalArgumentException("Completion
condition expression must return boolean values: " +
- result + " for expression " + expression);
- }
- return ((Boolean) result).booleanValue();
- } catch (Exception t) {
- throw new IllegalArgumentException("Could not evaluate
completion condition " + expression, t);
- }
+ private boolean evaluateCompletionCondition(ReturnValueEvaluator
completeConditionEvaluator, Map<String, Object> tempVariables) {
+ try {
+ KogitoProcessContextImpl context = (KogitoProcessContextImpl)
ContextFactory.fromNode(this);
Review Comment:
Cast not needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]