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

JBPM-9276 - Stunner Empty ErrorRef for the Error Start Event produces build errors #3386

Merged
merged 2 commits into from Aug 14, 2020

Conversation

hasys
Copy link
Member

@hasys hasys commented Aug 7, 2020

Hi @romartin,

I tested Kogito and XML looks good, will build Business Central locally to perform some End to End tests and will move it to full review. For now code is ready for the review.

Hi @domhanak, @LuboTerifaj, do we need your review here or we can assign it to two Software Engineers?

Thank you!

Business Central

https://drive.google.com/file/d/1OUikD9cxc008URF85eLjrfggPVueKLTK/view?usp=sharing

VS Code extension

https://drive.google.com/file/d/1ZvjXoy2St0A_J1gSXiQsxsgVmVFqUfVo/view?usp=sharing

Repository for tests

https://github.com/bpmn-tutorials/EmptyErrorTest

@hasys hasys requested a review from romartin August 7, 2020 15:37
@sonarcloud
Copy link

sonarcloud bot commented Aug 7, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
5.3% 5.3% Duplication

warning The version of Java (1.8.0_202) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

@hasys
Copy link
Member Author

hasys commented Aug 7, 2020

Jenkins execute compile downstream build

Copy link
Contributor

@romartin romartin left a comment

Choose a reason for hiding this comment

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

@hasys code looks good to me! Thanks agian for this work 👍

@hasys
Copy link
Member Author

hasys commented Aug 12, 2020

Hi @romartin, @LuboTerifaj, @domhanak,

I noticed some differences between XMLs generated by Legacy and New designers:

  • Legacy designer using only one shared Error xml node for all Events with empty error reference.
  • Stunner generates individual Error xml nodes for each Event with empty error reference.

I didn't found any differences at runtime though. I used this (also mentioned in PR description) repo to test several Error Events at runtime and both processes (generated in Legacy and in Stunner) produced the same result:

Console log for the process created in the Legacy designer

12:03:13,647 WARN  [org.kie.server.services.jbpm.ui.FormServiceBase] (default task-19) Unable to find form to render for process 'LegacyNoNameErrorHandling'
12:03:14,571 INFO  [stdout] (default task-19) Script2: error handling
12:03:14,632 INFO  [stdout] (default task-19) Script3: error handling

Console log for the process created in the Stunner

12:03:19,280 WARN  [org.kie.server.services.jbpm.ui.FormServiceBase] (default task-19) Unable to find form to render for process 'StunnerNoNameErrorHandling'
12:03:20,254 INFO  [stdout] (default task-19) Script3: error handling
12:03:20,264 INFO  [stdout] (default task-19) Script2: error handling

Since I can't see any difference at runtime and I didn't found any information in BPMN 2.0 specification how empty error reference should be addressed I think there is no need to fix it in this PR.

Thank you! This PR is ready for the review.

@hasys hasys marked this pull request as ready for review August 12, 2020 10:20
@hasys hasys requested a review from domhanak August 12, 2020 11:28
Copy link
Contributor

@domhanak domhanak left a comment

Choose a reason for hiding this comment

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

LGTM.

Original use case is possible and user can have one event sub process with error start node to handle errors in process.
When there is a named error start event it will take precedence over the one with empty errorRef so that is working too.
Also, there a no build errors for me.
Thanks @hasys

@hasys
Copy link
Member Author

hasys commented Aug 13, 2020

@romartin this PR is ready for merge.

@romartin, @domhanak thank you!

@romartin
Copy link
Contributor

thanks a lot for the great work guys!
@hasys @domhanak

@romartin romartin merged commit 9cfb126 into kiegroup:master Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants