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

OnWhen adds additional 'when' step in case of OnException in Route Configurations #1437

Open
vijayrhythm opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vijayrhythm
Copy link

Describe the bug

When we add On Exception Definition with OnWhen statement with YAML DSL, it adds additional when statement unexpectedly when we switch between 'Routes' tab and 'YAML' tab. This cause failure. It appears to require a fix similar to issue 1420 where it resolved the same for CatchDefinition. Please could someone help to resolve it. Thanks.

  • route:
    id: route-d663
    nodePrefixId: route-52e
    from:
    id: from-d6c1
    uri: amqp
    steps:
    - choice:
    id: choice-d1e9
    when:
    - id: when-19d8
    expression:
    groovy:
    id: groovy-1c57
    expression: 1=1
    otherwise:
    id: otherwise-c779
  • routeConfiguration:
    onException:
    - onException:
    id: onException-04a7
    onWhen:
    when:
    id: when-61ee
    expression:
    simple:
    id: simple-c2b6
    expression: ${exception.statusCode} == 500

Steps to reproduce the behavior

  1. Create a flow adding On Exception with OnWhen step in a Route Configuration (below is an example)
    "- route:
    id: route-d663
    nodePrefixId: route-52e
    from:
    id: from-d6c1
    uri: amqp
    steps:
    - choice:
    id: choice-d1e9
    when:
    - id: when-19d8
    expression:
    groovy:
    id: groovy-1c57
    expression: 1=1
    otherwise:
    id: otherwise-c779
    "- routeConfiguration:
    onException:
    "- onException:
    id: onException-04a7
    onWhen:
    id: when-61ee
    expression:
    simple:
    id: simple-c2b6
    expression: ${exception.statusCode} == 500
  2. Switch between Routes (route view) and coming back to YAML editor
  3. We see an additional 'when' statement below On When
    " - routeConfiguration:
    onException:
    • onException:
      id: onException-04a7
      onWhen:
      when:

      id: when-e875
      when:
      id: when-61ee
      expression:
      simple:
      id: simple-c2b6
      expression: ${exception.statusCode} == 500

Variant

Web Application

Container Management (if applicable)

None

Operating System (if applicable)

None

Version

4.8.0

Relevant log output

No response

@vijayrhythm vijayrhythm added the bug Something isn't working label Oct 9, 2024
@vijayrhythm vijayrhythm changed the title Bug OnWhen adds additional 'when' step in case of OnException in Route Configurations Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant