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

[incubator-kie-issues-1136] Add script onEntry, on Exit for java #3490

Merged
merged 7 commits into from
May 6, 2024

Conversation

elguardian
Copy link
Contributor

@kie-ci3
Copy link
Contributor

kie-ci3 commented Apr 30, 2024

PR job #1 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-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:

  • PASSED: 3173
  • FAILED: 8

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 equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[10] [BoundaryEventNode] nodes with name [BoundaryEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[43] [BoundaryEventNode] nodes with name [Boundary event] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[52] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[55] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[56] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[99] [BoundaryEventNode] nodes with name [] are not equal

@kie-ci3
Copy link
Contributor

kie-ci3 commented Apr 30, 2024

PR job #2 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-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:

  • PASSED: 2316
  • FAILED: 8

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 equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[10] [BoundaryEventNode] nodes with name [BoundaryEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[43] [BoundaryEventNode] nodes with name [Boundary event] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[52] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[55] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[56] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[99] [BoundaryEventNode] nodes with name [] are not equal

@kie-ci3
Copy link
Contributor

kie-ci3 commented May 1, 2024

PR job #4 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-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/4/display/redirect

Test results:

  • PASSED: 3254
  • FAILED: 7

Those are the test failures:

org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[7] [BoundaryEventNode] nodes with name [BoundaryEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[10] [BoundaryEventNode] nodes with name [BoundaryEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[43] [BoundaryEventNode] nodes with name [Boundary event] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[52] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[55] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[56] [BoundaryEventNode] nodes with name [TimerEvent] are not equal
org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[99] [BoundaryEventNode] nodes with name [] are not equal

Copy link
Contributor

@pefernan pefernan left a 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 Node onActionScript's which makes the onExit scripts be executed onEntry.
  • onEntry/onExit scripts executed twice.

Copy link
Contributor

@martinweiler martinweiler left a 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")) {
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@elguardian elguardian force-pushed the incubator-kie-issues-1136 branch from cf44053 to f8a984a Compare May 6, 2024 07:37
@elguardian elguardian requested a review from porcelli May 6, 2024 10:11
@elguardian elguardian merged commit 9cdc21a into apache:main May 6, 2024
6 checks passed
@elguardian elguardian deleted the incubator-kie-issues-1136 branch May 6, 2024 12:54
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request May 7, 2024
…che#3490)

* [incubator-kie-issues-1136] Add script onEntry, on Exit for java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add script onEntry, on Exit
5 participants