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

feat(canvas): Support root OnException #819

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Feb 8, 2024

Context

This PR adds support for the root OnException entity. This entity has a root configuration that is linked through the CanvasForm component but also has a steps property, effectively turning it into a VisualEntity.

The getVizNodeFromProcessor method was extracted from the AbstractCamelVisualEntity class in order to reuse it in the OnExceptionVisualEntity 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:

  1. getNodeLabel()
  2. getTooltipContent()
  3. getComponentSchema()
  4. updateModel()

To make it possible, we would need to change how the CamelRouteVisualEntity is created, as currently it requires a root RouteDefinition object, ideally, it should receive a { route: RouteDefinition } object instead.

Screenshot

image

fix: #561

This PR adds support for the root `OnException` entity. This entity has
a root configuration that is linked through the `CanvasForm` component
but also has a `steps` property, effectively turning it into a
`VisualEntity`.

The `getVizNodeFromProcessor` method was extracted from the
`AbstractCamelVisualEntity` class in order to reuse it in the
`OnExceptionVisualEntity` class. In an upcoming PR, more methods will be
extracted in order to avoid duplication as much as possible.

There are more methods that could be extracted to avoid duplication, for instance:
1. `getNodeLabel()`
2. `getTooltipContent()`
3. `getComponentSchema()`
4. `updateModel()`

To make it possible, we would need to change how the `CamelRouteVisualEntity` is created,
as currently it requires a root `RouteDefinition` object, ideally, it should
receive a `{ route: RouteDefinition }` object instead.

fix: KaotoIO#561
@lordrip lordrip force-pushed the feat/support-on-exception branch from ac97411 to a903d8c Compare February 8, 2024 16:12
@lordrip lordrip merged commit 1d4541e into KaotoIO:main Feb 9, 2024
9 checks passed
@lordrip lordrip deleted the feat/support-on-exception branch February 9, 2024 09:09
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.

Support Camel Route onException
2 participants