-
Notifications
You must be signed in to change notification settings - Fork 213
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
[incubator-kie-issues-1136] Add script onEntry, on Exit for java #3490
Conversation
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3490 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3490/1/display/redirect Test results:
Those are the test failures: org.jbpm.ruleflow.core.validation.RuleFlowProcessValidatorTest.testOnEntryOnExitValidation[Extracted: message]Expecting ArrayList: ["Node 'name' [jbpm-26fb4859-a5bc-4244-b233-2817c2c68865] Milestone has no incoming connection.", "Node 'name' [jbpm-26fb4859-a5bc-4244-b233-2817c2c68865] Milestone has no outgoing connection."] to contain: ["Node 'name' [jbpm-26fb4859-a5bc-4244-b233-2817c2c68865] On Entry Action is not yet supported in Kogito", "Node 'name' [jbpm-26fb4859-a5bc-4244-b233-2817c2c68865] On Exit Action is not yet supported in Kogito"] but could not find the following element(s): ["Node 'name' [jbpm-26fb4859-a5bc-4244-b233-2817c2c68865] On Entry Action is not yet supported in Kogito", "Node 'name' [jbpm-26fb4859-a5bc-4244-b233-2817c2c68865] On Exit Action is not yet supported in Kogito"] org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[7][BoundaryEventNode] nodes with name [BoundaryEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[10][BoundaryEventNode] nodes with name [BoundaryEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[43][BoundaryEventNode] nodes with name [Boundary event] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[52][BoundaryEventNode] nodes with name [TimerEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[55][BoundaryEventNode] nodes with name [TimerEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[56][BoundaryEventNode] nodes with name [TimerEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[99][BoundaryEventNode] nodes with name [] are not equal |
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3490 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3490/2/display/redirect Test results:
Those are the test failures: org.jbpm.ruleflow.core.validation.RuleFlowProcessValidatorTest.testOnEntryOnExitValidation[Extracted: message]Expecting ArrayList: ["Node 'name' [jbpm-197f923f-b67a-4c06-8810-88fb1dda9432] Milestone has no incoming connection.", "Node 'name' [jbpm-197f923f-b67a-4c06-8810-88fb1dda9432] Milestone has no outgoing connection."] to contain: ["Node 'name' [jbpm-197f923f-b67a-4c06-8810-88fb1dda9432] On Entry Action is not yet supported in Kogito", "Node 'name' [jbpm-197f923f-b67a-4c06-8810-88fb1dda9432] On Exit Action is not yet supported in Kogito"] but could not find the following element(s): ["Node 'name' [jbpm-197f923f-b67a-4c06-8810-88fb1dda9432] On Entry Action is not yet supported in Kogito", "Node 'name' [jbpm-197f923f-b67a-4c06-8810-88fb1dda9432] On Exit Action is not yet supported in Kogito"] org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[7][BoundaryEventNode] nodes with name [BoundaryEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[10][BoundaryEventNode] nodes with name [BoundaryEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[43][BoundaryEventNode] nodes with name [Boundary event] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[52][BoundaryEventNode] nodes with name [TimerEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[55][BoundaryEventNode] nodes with name [TimerEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[56][BoundaryEventNode] nodes with name [TimerEvent] are not equalorg.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[99][BoundaryEventNode] nodes with name [] are not equal |
jbpm/jbpm-flow-builder/src/main/java/org/jbpm/compiler/canonical/AbstractNodeVisitor.java
Outdated
Show resolved
Hide resolved
jbpm/jbpm-flow/src/main/java/org/jbpm/ruleflow/core/factory/NodeFactory.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, but as Martin spotted there are two issues that should be fixed:
actionType
not taken into account when generating the NodeonActionScript
's which makes theonExit
scripts be executedonEntry
.onEntry
/onExit
scripts executed twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @elguardian
private Expression buildDroolsConsequenceAction(ExtendedNodeImpl extendedNodeImpl, String dialect, String script) { | ||
BlockStmt newDroolsConsequenceActionExpression = new BlockStmt(); | ||
if (script != null) { | ||
if (dialect.contains("java")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a log error message for not supported dialect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
cf44053
to
f8a984a
Compare
…che#3490) * [incubator-kie-issues-1136] Add script onEntry, on Exit for java
Closes: apache/incubator-kie-issues#1136