KaotoIO/kaoto-backend

[BUG] Aggregate EIP is not allowing nested steps

lordrip opened this issue · 1 comments

Describe the bug
The aggregate EIP can have nested steps, but currently, Kaoto doesn't offer a mechanism to allow it.

To Reproduce
Steps to reproduce the behavior:

  1. Starting with a start step (timer)
  2. Add an aggregate EIP
  3. Click on the branches tab from the mini-catalog
  4. See that the branches tab is disabled
    image

Expected behavior
The aggregate EIP should allow to define nested steps

Additional context
Simple YAML structure showcasing aggregate nested steps:

- route:
    id: route-8e8b
    from:
      uri: kamelet:timer-source
      id: from-af58
      parameters:
        message: ${message.body}
      steps:
        - aggregate:
            id: aggregate-4bbc
            correlationExpression: {}
            steps:
              - log:
                  message: ${body}
                  id: log-2fdd
        - log:
            message: ${body}
            id: log-e936

after a sync, this is the result

- route:
    id: route-8e8b
    from:
      id: from-af58
      uri: kamelet:timer-source/
      parameters:
        message: ${message.body}
      steps:
      - aggregate:
          id: aggregate-4bbc
      - log:
          id: log-e936
          message: ${body}

notice that the following part is not supported by Kaoto yet:

            correlationExpression: {}
            steps:
              - log:
                  message: ${body}
                  id: log-2fdd

related to #767, we should extract those step metadata from schema and catalog.