KaotoIO / kaoto

The UI of the Kaoto project
https://kaoto.io
Apache License 2.0
35 stars 26 forks source link

Support `saga` eip #504

Open igarashitm opened 10 months ago

igarashitm commented 10 months ago

Please describe the feature that you want to propose

There're roughly 2 things to do

  1. It's a branching step, need a special handling just like filter. In addition to that, it has 2 parameters compensation and completion, both have uri and parameters to route to the arbitrary endpoint. We might be able to make these compensation and completion to be an artificial node/step in the canvas, then it will look similar with doTry-doCatch-doFinally.
  2. option property is key-value pairs where the value is expression structure
    - saga:
    option:
      - key: prop1
        expression:
          simple:
            expression: ${header.prop1}
      - key: prop2
        expression:
          jq:
            expression: header.prop2
      - key: prop3
        expression:
          jsonpath:
            expression: /body/prop3

    It will be too chaotic to have a key-expression table in the right drawer form and show ExpressionEditor for each entry. It needs some layout separation.

lordrip commented 10 months ago

Maybe setHeaders might require a similar consideration.

igarashitm commented 10 months ago

https://github.com/KaotoIO/kaoto-next/pull/553 adds ExpressionField which adds a hyperlink to open a modal with expression configuration form. It automatically supports saga option expression as well.