feat(canvas): Support root OnException #819
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This PR adds support for the root
OnException
entity. This entity has a root configuration that is linked through theCanvasForm
component but also has asteps
property, effectively turning it into aVisualEntity
.The
getVizNodeFromProcessor
method was extracted from theAbstractCamelVisualEntity
class in order to reuse it in theOnExceptionVisualEntity
class. In an upcoming PR, more methods will be extracted in order to avoid duplication as much as possible.Notes
There are more methods that could be extracted to avoid duplication, for instance:
getNodeLabel()
getTooltipContent()
getComponentSchema()
updateModel()
To make it possible, we would need to change how the
CamelRouteVisualEntity
is created, as currently it requires a rootRouteDefinition
object, ideally, it should receive a{ route: RouteDefinition }
object instead.Screenshot
fix: #561