apiVersion: camel.apache.org/v1
kind: Integration
metadata:
  name: 'demo'
spec:
  flows:
    - route:
        from:
          uri: kamelet:http-secured-source
          steps:
            - doTry:
                steps:
                  - to: "log:when-a"
                  - to: "log:when-b"
                doCatch:
                  - exception:
                      - "java.io.FileNotFoundException"
                      - "java.io.IOException"
                    onWhen:
                      expression:
                        simple: "${body.size()} == 1"
                    steps:
                      - to: "log:io-error"
            - choice:
                when:
                  - expression:
                      simple: "${body.size()} == 1"
                    steps:
                      - toD: "log:xxx"
                otherwise:
                    steps:
                      - toD: "log:yyy"