Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Bean configuration UI #1722

Closed
igarashitm opened this issue May 2, 2023 · 1 comment · Fixed by #1951
Closed

Bean configuration UI #1722

igarashitm opened this issue May 2, 2023 · 1 comment · Fixed by #1951
Assignees
Labels
feature request Thumbs up the issue to vote for it uxd Relates to UX and design
Milestone

Comments

@igarashitm
Copy link
Contributor

igarashitm commented May 2, 2023

Please describe the feature that you want to propose

While beans support at source code level is to be added soon #1721
We also need to design how to let users configure those beans in Kaoto. Since beans is not a part of the flow, we need a separate view for configuring it apart from the flow graph as a tree of steps. We start from beans, but there're other type of "out of the flow" objects that could be defined in the Camel Route, such as error-handler and on-exception.

Possible targets

Camel Route

  • beans
  • error-handler
  • on-exception
  • routes
  • camel-context
  • ...

Kamelet

  • /spec/template/beans

Integration

  • /spec/flows/beans

Related issue about adding contextual endpoint for specific DSLs: KaotoIO/kaoto-backend#657

@igarashitm igarashitm added feature request Thumbs up the issue to vote for it uxd Relates to UX and design labels May 2, 2023
@lhein lhein added this to the 1.1.0 milestone May 4, 2023
@kahboom kahboom self-assigned this May 17, 2023
@igarashitm
Copy link
Contributor Author

igarashitm commented May 18, 2023

Camel Route, Kamelet and Integration uses same schema for beans

Schema

{
  "title": "Beans",
  "description": "Beans Configuration",
  "type": "array",
  "items": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "name": {
        "type": "string"
      },
      "type": {
        "type": "string"
      },
      "properties": {
        "type": "object"
      },
      
    },
    "required": [
      "name",
      "type"
    ]
  }
}

Compatibility issue: key/value style property on Kamelet and Integration

Although it is against schema, runtime allows key/value style of beans property. Even official Kamelets use this style ATM.
apache/camel-kamelets#1475

      - name: dsBean
        type: "#class:org.apache.commons.dbcp2.BasicDataSource"
        property:
          - key: username
            value: '{{username}}'
          - key: password
            value: '{{password}}'

We might go with what schema allows at a first step, then consider loading this old style property and convert to the valid one.
Unfortunately it turned out the object type of properties doesn't work on Kamelet on Camel3. Runtime and schema are out of sync.
https://github.com/apache/camel/blob/camel-3.x/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/main/java/org/apache/camel/dsl/yaml/deserializers/BeanFactoryDefinitionDeserializer.java#L61

so at least for Camel3 Kamelet, we have to support key/value style.

@igarashitm igarashitm self-assigned this May 30, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue May 31, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 1, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 2, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 2, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 9, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 12, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 12, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 12, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 12, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 13, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 16, 2023
igarashitm added a commit to igarashitm/kaoto-ui that referenced this issue Jun 16, 2023
lordrip pushed a commit that referenced this issue Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request Thumbs up the issue to vote for it uxd Relates to UX and design
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants