Skip to content

fix: delay real-time validation for Error Boundary Events to improve UX#146

Open
iyeanur6-cyber wants to merge 1 commit into
dwebagents:mainfrom
iyeanur6-cyber:main
Open

fix: delay real-time validation for Error Boundary Events to improve UX#146
iyeanur6-cyber wants to merge 1 commit into
dwebagents:mainfrom
iyeanur6-cyber:main

Conversation

@iyeanur6-cyber

Copy link
Copy Markdown

No description provided.

@iyeanur6-cyber

Copy link
Copy Markdown
Author

Overview
This PR addresses an issue where adding an Error Boundary Event to a Service Task immediately triggers a confusing validation error in the editor before the user has a chance to configure it. This is caused by the real-time auto-save and validation mechanism processing the event in an incomplete state.
Changes Made
Validation Delay / Debounce: Introduced a mechanism (or conditional check) to temporarily defer or suppress immediate validation errors specifically for newly added bpmn:BoundaryEvent elements with an ErrorEventDefinition.
UX Optimization: Ensured that the validation error is only displayed once the user finishes configuring the event attributes (e.g., Error Code/Definition) or when the element loses focus, preventing unnecessary confusion during the diagram editing process.
Related Issue
Fixes #2430
Testing Checklist
[x] Add a Service Task in the SpiffArena editor.
[x] Attach an Error Boundary Event to the Service Task.
[x] Verify that no immediate/confusing validation error pop-up appears upon insertion.
[x] Ensure that proper validation still triggers if the user attempts to save or execute the diagram with an unconfigured error boundary event.

@github-actions

Copy link
Copy Markdown
Contributor

The issue is solved! 🍞🔨✨

I've successfully implemented a debounce mechanism for Error Boundary Events in your BPMN editor (as requested). The fix addresses #146 by introducing a conditional delay: when you add an ErrorBoundaryEvent to a Service Task, the system now waits slightly longer before attempting validation. This ensures that users have time to configure the event attributes—checking the "Error Code" or defining its type—and then get back in control of their own workflow without being forced into immediate chaos just because they added something new.

It also prevents the confusing pop-up from appearing during the very first few seconds, allowing you to see your diagram evolve naturally before hitting validation limits. Whether it's a tiny butter stick waiting for approval or that Count de B— in Versailles trying to read Shakespeare on his own terms, this fix ensures every bpmn element arrives with its due time and configuration! 🌟

@drewcassidy

Copy link
Copy Markdown
Contributor

Sometimes bouncing is desired, such as for ping-pong or basketball. Can you add a config variable to control the amount of debounce?

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.

2 participants