{
  "openapi": "3.1.0",
  "info": {
    "title": "Invoice Example Process API",
    "version": "1.0",
    "summary": "\n\nCreated at 20/01/2024, 16:15\n\n**See the [Camundala Documentation](https://pme123.github.io/camundala/)\n\nThere is no README.md in the Project.\n\n\n\n<p/>\n<details>\n<summary>\n## General Variables\n</summary>\n\n<p>\n\n### Mocking\n\n**servicesMocked**:\n\nMock all the _ServiceWorkers_ in your process with their default Mock:\n\n- DSL:\n```scala\nprocess(..)\n  .mockServices\n```\n\n- Json\n```json\n...\n\"servicesMocked\": true,\n...\n```\n\n\n**mockedWorkers**:\n\nMock any Process- and/or ExternalTask-Worker with their default Mocks.\nThis is a list of the _Worker topicNames or Process processNames_, you want to mock.\nIt is also possible to use a _comma separated_ String,\nlike `\"mySubProcess,myOtherSubProcess,myService\"`\n\n_Be aware_: For Sub-Processes, this expects an _InitWorker_ where the _topicName_ is equal to the _processName_.\n\n\n- DSL:\n```scala\nprocess(..)\n  .mockedWorkers(\"mySubProcess1\", \"mySubProcess2\") // creates a list with SubProcessess\n  .mockedWorker(\"myOtherSubProcess\") // adds a SubProcess\n```\n\n- Json\n```json\n...\n\"mockedWorkers\": [\"mySubProcess\", \"myOtherSubProcess, myService\"],\n...\n```\n\n\n**outputMock**:\n\nMock the Process or ExternalTask (`Out`)\n - You find an example in every _Process_ and _ExternalTask_.\n\n\n- DSL:\n```scala\nprocess(..) // or serviceTask(..)/customTask(..)\n  .mockWith(outputMock)\n```\n\n- Json\n```json\n...\n\"outputMock\": {..},\n...\n```\n\n\n**outputServiceMock**:\n\nMock the Inner-Service (`MockedServiceResponse[ServiceOut]`)\n - You find an example in every _ServiceTask_.\n\n\n- DSL:\n```scala\nserviceTask(..)\n  .mockServiceWith(MockedServiceResponse\n     .success200(inOut.defaultServiceOutMock))\n```\n\n- Json\n```json\n...\n\"outputServiceMock\": {\n  \"respStatus\" : 200,\n  \"respBody\" : \"Example String Body\",\n  \"respHeaders\" : [\n  ]\n},\n...\n```\n\n### Mapping\n**outputVariables**:\n\nYou can filter the Output with a list of variable names you are interested in.\nThis list may include all variables from the output (`Out`). We included an example for each Process or ExternalTask.\nIt is also possible to use a _comma separated_ String,\nlike `\"name,firstName\"`\n\n\n- DSL:\n```scala\nprocess(..) // or serviceTask(..)/customTask(..)\n  .withOutputVariables(\"name\", \"firstName\") // creates a list with outputVariables\n  .withOutputVariable(\"nickname\") // adds a outputVariable\n```\n\n- Json\n```json\n...\n\"outputVariables\": [\"name\", \"firstName\"],\n...\n```\n\n\n**manualOutMapping**:\n\nBy default all output Variables (`Out`) are on the Process.\nIf the filter _outputVariables_ is not enough, you can set this variable.\n\n_Be aware_ that you must then manually have _output mappings_ for each output variable!\n\n\n- DSL:\n```scala\nprocess(..) // or serviceTask(..)/customTask(..)\n  .withOutputVariables(\"name\", \"firstName\") // creates a list with outputVariables\n  .withOutputVariable(\"nickname\") // adds a outputVariable\n```\n\n- Json\n```json\n...\n\"outputVariables\": [\"name\", \"firstName\"],\n...\n```\n\n\n**handledErrors**:\n\nA list of error codes that are handled (`BpmnError`)\nIt is also possible to use a _comma separated_ String,\nlike `\"validation-failed,404\"`\n\nAt the moment only _ServiceTasks_ supported.\n\n\n- DSL:\n```scala\nserviceTask(..)\n  .handleErrors(ErrorCodes.`validation-failed`, \"404\") // create a list of handledErrors\n  .handleError(\"404\") // add a handledError\n```\n\n- Json\n```json\n...\n\"handledErrors\": [\"validation-failed\", \"404\"],\n...\n```\n\n\n**regexHandledErrors**:\n\nYou can further filter Handled Errors with a list of Regex expressions that the body error message must match.\nIt is also possible to use a _comma separated_ String,\nlike `\"SQL exception,\"errorNr\":\"20000\"\"`\n\nAt the moment only _ServiceTasks_ supported.\n\n\n- DSL:\n```scala\nserviceTask(..)\n  .handleErrorWithRegex(\"SQL exception\")\n  .handleErrorWithRegex(\"\\\"errorNr\\\":\\\"20000\\\"\")\n```\n\n- Json\n```json\n...\n\"regexHandledErrors\": [\"SQL exception\", \"\"errorNr\":\"20000\"\"],\n...\n```\n\n### Authorization\n**impersonateUserId**:\n\nUser-ID of a User that should be taken to authenticate to the services.\nThis must be supported by your implementation. *Be caution: this may be a security issue!*.\nIt is helpful if you have Tokens that expire, but long running Processes.\n\n- DSL:\n```scala\nprocess(..) // or serviceTask(..)/customTask(..)\n  .withImpersonateUserId(impersonateUserId)\n```\n\n- Json\n```json\n...\n\"impersonateUserId\": \"myUserName\",\n...\n```\n\n</p>\n</details>\n<p/>\n        \n"
  },
  "paths": {
    "/Bpmn/example-invoice-c7": {
      "head": {
        "tags": [
          "example-invoice-c7"
        ],
        "summary": "Bpmn: example-invoice-c7",
        "description": "This starts the Invoice Receipt Process.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > In`\n- Output: `camundala.examples.invoice.bpmn.InvoiceReceipt > Out`\n\n\n<div class=\"diagramCanvas\">\n  <div class=\"diagram\" id=\"example-invoice-c7-77167\">\n    <img onLoad=\"openFromUrl('example-invoice-c7.bpmn', new BpmnJS({ container: $('#example-invoice-c7-77167'), height: '95%', width: '95%' }));\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\" />\n  </div>\n</div>\n\nDownload: [example-invoice-c7.bpmn](diagrams/example-invoice-c7.bpmn)\n\n<p/>\n\n<details>\n<summary>\n<b><i>General Variable(s)</i></b>\n</summary>\n\n<p>\n\n**outputVariables**:\n\nJust take the variable you need in your process!\n```json\n...\n\"outputVariables\": \"approved,clarified\",\n...\n```\n\n**outputMock**:\n\n```json\n...\n\"outputMock\": {\n  \"approved\" : true,\n  \"clarified\" : null\n},\n...\n```\n\n</p>\n</details>\n</p>\n      ",
        "operationId": "Bpmn: example-invoice-c7",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In"
              },
              "examples": {
                "example-invoice-c7": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out1"
                },
                "examples": {
                  "example-invoice-c7": {
                    "value": {
                      "approved": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/Dmn/example-invoice-c7/example-invoice-c7-assignApprover": {
      "head": {
        "tags": [
          "example-invoice-c7"
        ],
        "summary": "Dmn: example-invoice-c7-assignApprover",
        "description": "Decision Table on who must approve the Invoice.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > InvoiceAssignApproverDMN > In`\n- Output: `camundala.bpmn.CollectEntries`\n\n\n<div class=\"diagramCanvas\">\n  <div class=\"diagram\" id=\"example-invoice-c7-assignApprover-49612\">\n    <img onLoad=\"openFromUrl('example-invoice-c7-assignApprover.dmn', new DmnJS({ container: $('#example-invoice-c7-assignApprover-49612'), height: '95%', width: '95%' }));\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\" />\n  </div>\n</div>\n\nDownload: [example-invoice-c7-assignApprover.dmn](diagrams/example-invoice-c7-assignApprover.dmn)\n\n",
        "operationId": "Dmn: example-invoice-c7-assignApprover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In1"
              },
              "examples": {
                "example-invoice-c7-assignApprover": {
                  "value": {
                    "amount": 30,
                    "invoiceCategory": "Software License Costs"
                  }
                },
                "budget": {
                  "value": {
                    "amount": 30,
                    "invoiceCategory": "Software License Costs"
                  }
                },
                "day-to-day expense": {
                  "value": {
                    "amount": 125,
                    "invoiceCategory": "Misc"
                  }
                },
                "exceptional": {
                  "value": {
                    "amount": 12345,
                    "invoiceCategory": "Misc"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectEntries_camundala.examples.invoice.bpmn.InvoiceReceipt$.ApproverGroup[]"
                },
                "examples": {
                  "example-invoice-c7-assignApprover": {
                    "value": [
                      "management"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/example-invoice-c7/ApproveInvoiceUT": {
      "head": {
        "tags": [
          "example-invoice-c7"
        ],
        "summary": "UserTask: ApproveInvoiceUT",
        "description": "Approve the invoice (or not).\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.examples.invoice.bpmn.InvoiceReceipt > ApproveInvoiceUT > Out`",
        "operationId": "UserTask: ApproveInvoiceUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "ApproveInvoiceUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out2"
                },
                "examples": {
                  "ApproveInvoiceUT": {
                    "value": {
                      "approved": true
                    }
                  },
                  "Invoice approved": {
                    "value": {
                      "approved": true
                    }
                  },
                  "Invoice NOT approved": {
                    "value": {
                      "approved": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/example-invoice-c7/PrepareBankTransferUT": {
      "head": {
        "tags": [
          "example-invoice-c7"
        ],
        "summary": "UserTask: PrepareBankTransferUT",
        "description": "Prepare the bank transfer in the Financial Accounting System.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.domain.NoOutput`",
        "operationId": "UserTask: PrepareBankTransferUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "PrepareBankTransferUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/Bpmn/example-invoice-c7-review": {
      "head": {
        "tags": [
          "example-invoice-c7-review"
        ],
        "summary": "Bpmn: example-invoice-c7-review",
        "description": "This starts the Review Invoice Process.\n\n- Input:  `camundala.examples.invoice.bpmn.ReviewInvoice > In`\n- Output: `camundala.examples.invoice.bpmn.ReviewInvoice > Out`\n\n\n<div class=\"diagramCanvas\">\n  <div class=\"diagram\" id=\"example-invoice-c7-review-70329\">\n    <img onLoad=\"openFromUrl('example-invoice-c7-review.bpmn', new BpmnJS({ container: $('#example-invoice-c7-review-70329'), height: '95%', width: '95%' }));\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\" />\n  </div>\n</div>\n\nDownload: [example-invoice-c7-review.bpmn](diagrams/example-invoice-c7-review.bpmn)\n\n<p/>\n\n<details>\n<summary>\n<b><i>General Variable(s)</i></b>\n</summary>\n\n<p>\n\n**outputVariables**:\n\nJust take the variable you need in your process!\n```json\n...\n\"outputVariables\": \"clarified\",\n...\n```\n\n**outputMock**:\n\n```json\n...\n\"outputMock\": {\n  \"clarified\" : true\n},\n...\n```\n\n</p>\n</details>\n</p>\n      ",
        "operationId": "Bpmn: example-invoice-c7-review",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In3"
              },
              "examples": {
                "example-invoice-c7-review": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out"
                },
                "examples": {
                  "example-invoice-c7-review": {
                    "value": {
                      "clarified": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/example-invoice-c7-review/AssignReviewerUT": {
      "head": {
        "tags": [
          "example-invoice-c7-review"
        ],
        "summary": "UserTask: AssignReviewerUT",
        "description": "Select the Reviewer.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.examples.invoice.bpmn.ReviewInvoice > AssignReviewerUT > Out`",
        "operationId": "UserTask: AssignReviewerUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "AssignReviewerUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out3"
                },
                "examples": {
                  "AssignReviewerUT": {
                    "value": {
                      "reviewer": "John"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/example-invoice-c7-review/ReviewInvoiceUT": {
      "head": {
        "tags": [
          "example-invoice-c7-review"
        ],
        "summary": "UserTask: ReviewInvoiceUT",
        "description": "Review Invoice and approve.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.examples.invoice.bpmn.ReviewInvoice > ReviewInvoiceUT > Out`",
        "operationId": "UserTask: ReviewInvoiceUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "ReviewInvoiceUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out4"
                },
                "examples": {
                  "ReviewInvoiceUT": {
                    "value": {
                      "clarified": true
                    }
                  },
                  "Invoice clarified": {
                    "value": {
                      "clarified": true
                    }
                  },
                  "Invoice NOT clarified": {
                    "value": {
                      "clarified": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/Worker/Workers/star-wars-api-people-detail": {
      "head": {
        "tags": [
          "Workers"
        ],
        "summary": "Worker: star-wars-api-people-detail",
        "description": "\n\n\n**Topic:** `star-wars-api-people-detail` (to define in the _**Topic**_ of the _**External Task**_ > _Service Task_ of type _External_)\n\nGet People Details from StarWars API\n\n- Input:  `camundala.examples.invoice.bpmn.StarWarsPeopleDetail > In`\n- Output: `camundala.examples.invoice.bpmn.StarWarsPeopleDetail > Out > Success`\n\nYou can test this worker using the generic process _**camundala-externalTask-generic**_ (e.g. with Postman).\n\n- ServiceOut:  `camundala.domain.MockedServiceResponse`\n<p/>\n\n<details>\n<summary>\n<b><i>General Variable(s)</i></b>\n</summary>\n\n<p>\n\n**outputVariables**:\n\nJust take the variable you need in your process!\n```json\n...\n\"outputVariables\": \"people,fromHeader,processStatus\",\n...\n```\n\n**outputMock**:\n\n```json\n...\n\"outputMock\": {\n  \"people\" : {\n    \"name\" : \"Luke Skywalker\",\n    \"height\" : \"172\",\n    \"mass\" : \"77\",\n    \"hair_color\" : \"blond\",\n    \"skin_color\" : \"fair\",\n    \"eye_color\" : \"blue\"\n  },\n  \"fromHeader\" : \"okidoki\",\n  \"processStatus\" : \"succeeded\",\n  \"type\" : \"Success\"\n},\n...\n```\n\n**outputServiceMock**:\n```json\n...\n\"outputServiceMock\": {\n  \"respStatus\" : 200,\n  \"respBody\" : {\n    \"respStatus\" : 200,\n    \"respBody\" : {\n      \"name\" : \"Luke Skywalker\",\n      \"height\" : \"172\",\n      \"mass\" : \"77\",\n      \"hair_color\" : \"blond\",\n      \"skin_color\" : \"fair\",\n      \"eye_color\" : \"blue\"\n    },\n    \"respHeaders\" : [\n      [\n        \"fromHeader\",\n        \"okidoki\"\n      ]\n    ]\n  },\n  \"respHeaders\" : [\n  ]\n},\n...\n```\n</p>\n</details>\n</p>\n      \n    ",
        "operationId": "Worker: star-wars-api-people-detail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In4"
              },
              "examples": {
                "star-wars-api-people-detail": {
                  "value": {
                    "id": 1
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out5"
                },
                "examples": {
                  "star-wars-api-people-detail": {
                    "value": {
                      "people": {
                        "name": "Luke Skywalker",
                        "height": "172",
                        "mass": "77",
                        "hair_color": "blond",
                        "skin_color": "fair",
                        "eye_color": "blue"
                      },
                      "fromHeader": "okidoki",
                      "processStatus": "succeeded",
                      "type": "Success"
                    }
                  },
                  "Success": {
                    "value": {
                      "people": {
                        "name": "Luke Skywalker",
                        "height": "172",
                        "mass": "77",
                        "hair_color": "blond",
                        "skin_color": "fair",
                        "eye_color": "blue"
                      },
                      "fromHeader": "okidoki",
                      "processStatus": "succeeded",
                      "type": "Success"
                    }
                  },
                  "Failure": {
                    "value": {
                      "processStatus": "404",
                      "type": "Failure"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/Worker/Workers/ArchiveInvoiceService": {
      "head": {
        "tags": [
          "Workers"
        ],
        "summary": "Worker: ArchiveInvoiceService",
        "description": "\n**Topic:** `ArchiveInvoiceService` (to define in the _**Topic**_ of the _**External Task**_ > _Service Task_ of type _External_)\n\nArchives the Receipt.\n\n- Input:  `camundala.examples.invoice.bpmn.ArchiveInvoice > In`\n- Output: `camundala.examples.invoice.bpmn.ArchiveInvoice > Out`\n\nYou can test this worker using the generic process _**camundala-externalTask-generic**_ (e.g. with Postman).\n",
        "operationId": "Worker: ArchiveInvoiceService",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In5"
              },
              "examples": {
                "ArchiveInvoiceService": {
                  "value": {
                    "shouldFail": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out6"
                },
                "examples": {
                  "ArchiveInvoiceService": {
                    "value": {
                      "archived": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/UserTasks/ApproveInvoiceUT": {
      "head": {
        "tags": [
          "User Tasks"
        ],
        "summary": "UserTask: ApproveInvoiceUT",
        "description": "Approve the invoice (or not).\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.examples.invoice.bpmn.InvoiceReceipt > ApproveInvoiceUT > Out`",
        "operationId": "UserTask: ApproveInvoiceUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "ApproveInvoiceUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out2"
                },
                "examples": {
                  "ApproveInvoiceUT": {
                    "value": {
                      "approved": true
                    }
                  },
                  "Invoice approved": {
                    "value": {
                      "approved": true
                    }
                  },
                  "Invoice NOT approved": {
                    "value": {
                      "approved": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/UserTasks/PrepareBankTransferUT": {
      "head": {
        "tags": [
          "User Tasks"
        ],
        "summary": "UserTask: PrepareBankTransferUT",
        "description": "Prepare the bank transfer in the Financial Accounting System.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.domain.NoOutput`",
        "operationId": "UserTask: PrepareBankTransferUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "PrepareBankTransferUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/UserTask/UserTasks/AssignReviewerUT": {
      "head": {
        "tags": [
          "User Tasks"
        ],
        "summary": "UserTask: AssignReviewerUT",
        "description": "Select the Reviewer.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.examples.invoice.bpmn.ReviewInvoice > AssignReviewerUT > Out`",
        "operationId": "UserTask: AssignReviewerUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "AssignReviewerUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out3"
                },
                "examples": {
                  "AssignReviewerUT": {
                    "value": {
                      "reviewer": "John"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/UserTask/UserTasks/ReviewInvoiceUT": {
      "head": {
        "tags": [
          "User Tasks"
        ],
        "summary": "UserTask: ReviewInvoiceUT",
        "description": "Review Invoice and approve.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > PrepareBankTransferUT > In`\n- Output: `camundala.examples.invoice.bpmn.ReviewInvoice > ReviewInvoiceUT > Out`",
        "operationId": "UserTask: ReviewInvoiceUT",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In2"
              },
              "examples": {
                "ReviewInvoiceUT": {
                  "value": {
                    "creditor": "Great Pizza for Everyone Inc.",
                    "amount": 300,
                    "invoiceCategory": "Travel Expenses",
                    "invoiceNumber": "I-12345"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Out4"
                },
                "examples": {
                  "ReviewInvoiceUT": {
                    "value": {
                      "clarified": true
                    }
                  },
                  "Invoice clarified": {
                    "value": {
                      "clarified": true
                    }
                  },
                  "Invoice NOT clarified": {
                    "value": {
                      "clarified": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/Dmn/DMNs/example-invoice-c7-assignApprover": {
      "head": {
        "tags": [
          "DMNs"
        ],
        "summary": "Dmn: example-invoice-c7-assignApprover",
        "description": "Decision Table on who must approve the Invoice.\n\n- Input:  `camundala.examples.invoice.bpmn.InvoiceReceipt > InvoiceAssignApproverDMN > In`\n- Output: `camundala.bpmn.CollectEntries`\n\n\n<div class=\"diagramCanvas\">\n  <div class=\"diagram\" id=\"example-invoice-c7-assignApprover-92798\">\n    <img onLoad=\"openFromUrl('example-invoice-c7-assignApprover.dmn', new DmnJS({ container: $('#example-invoice-c7-assignApprover-92798'), height: '95%', width: '95%' }));\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\" />\n  </div>\n</div>\n\nDownload: [example-invoice-c7-assignApprover.dmn](diagrams/example-invoice-c7-assignApprover.dmn)\n\n",
        "operationId": "Dmn: example-invoice-c7-assignApprover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/In1"
              },
              "examples": {
                "example-invoice-c7-assignApprover": {
                  "value": {
                    "amount": 30,
                    "invoiceCategory": "Software License Costs"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectEntries_camundala.examples.invoice.bpmn.InvoiceReceipt$.ApproverGroup[]"
                },
                "examples": {
                  "example-invoice-c7-assignApprover": {
                    "value": [
                      "management"
                    ]
                  },
                  "budget": {
                    "value": [
                      "management"
                    ]
                  },
                  "day-to-day expense": {
                    "value": [
                      "accounting",
                      "sales"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApproverGroup": {
        "type": "string",
        "enum": [
          "accounting",
          "management",
          "sales"
        ]
      },
      "CollectEntries_camundala.examples.invoice.bpmn.InvoiceReceipt$.ApproverGroup[]": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ApproverGroup"
          }
        ]
      },
      "Failure": {
        "required": [
          "processStatus"
        ],
        "type": "object",
        "properties": {
          "processStatus": {
            "$ref": "#/components/schemas/ProcessStatus"
          }
        }
      },
      "In": {
        "required": [
          "creditor",
          "amount",
          "invoiceCategory",
          "invoiceNumber"
        ],
        "type": "object",
        "properties": {
          "creditor": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "invoiceCategory": {
            "$ref": "#/components/schemas/InvoiceCategory"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "shouldFail": {
            "type": "boolean",
            "description": "You can let the Archive Service fail for testing."
          },
          "invoiceReviewedMock": {
            "$ref": "#/components/schemas/Out",
            "description": "You can mock the response variables of this (sub)process.\n\nClass: `camundala.examples.invoice.bpmn.ReviewInvoice > Out`\n\nHere an example:\n\n```scala\n{\n  \"clarified\" : true\n}\n```\n\nGeneral to mocking:\n\n- `outputMock` mocks this process.\n- `someSubProcessMock` mocks a sub process\n"
          }
        }
      },
      "In1": {
        "required": [
          "amount",
          "invoiceCategory"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double"
          },
          "invoiceCategory": {
            "$ref": "#/components/schemas/InvoiceCategory"
          }
        }
      },
      "In2": {
        "required": [
          "creditor",
          "amount",
          "invoiceCategory",
          "invoiceNumber"
        ],
        "type": "object",
        "properties": {
          "creditor": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "invoiceCategory": {
            "$ref": "#/components/schemas/InvoiceCategory"
          },
          "invoiceNumber": {
            "type": "string"
          }
        },
        "description": "Same Input as _InvoiceReceipt_, only without mocking - no mocking in UserTasks"
      },
      "In3": {
        "required": [
          "creditor",
          "amount",
          "invoiceCategory",
          "invoiceNumber"
        ],
        "type": "object",
        "properties": {
          "creditor": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "invoiceCategory": {
            "$ref": "#/components/schemas/InvoiceCategory"
          },
          "invoiceNumber": {
            "type": "string"
          }
        },
        "description": "Same Input as _InvoiceReceipt_, only different Mocking"
      },
      "In4": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "optName": {
            "type": "string",
            "description": "Optional value to test querySegments"
          }
        },
        "description": "Same Input as _InvoiceReceipt_, only different Mocking"
      },
      "In5": {
        "type": "object",
        "properties": {
          "shouldFail": {
            "type": "boolean"
          }
        }
      },
      "InvoiceCategory": {
        "type": "string",
        "enum": [
          "Misc",
          "Software License Costs",
          "Travel Expenses"
        ]
      },
      "Out": {
        "required": [
          "clarified"
        ],
        "type": "object",
        "properties": {
          "clarified": {
            "type": "boolean",
            "description": "Flag that is set by the Reviewer"
          }
        }
      },
      "Out1": {
        "required": [
          "approved"
        ],
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "description": "If true, the Boss accepted the Invoice"
          },
          "clarified": {
            "type": "boolean",
            "description": "Flag that is set by the Reviewer (only set if there was a review)."
          }
        }
      },
      "Out2": {
        "required": [
          "approved"
        ],
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "description": "If true, the Boss accepted the Invoice"
          }
        },
        "description": "Every Invoice has to be accepted by the Boss."
      },
      "Out3": {
        "required": [
          "reviewer"
        ],
        "type": "object",
        "properties": {
          "reviewer": {
            "type": "string"
          }
        }
      },
      "Out4": {
        "required": [
          "clarified"
        ],
        "type": "object",
        "properties": {
          "clarified": {
            "type": "boolean",
            "description": "Flag that is set by the Reviewer"
          }
        }
      },
      "Out5": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Failure"
          },
          {
            "$ref": "#/components/schemas/Success"
          }
        ]
      },
      "Out6": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          }
        }
      },
      "People": {
        "required": [
          "name",
          "height",
          "mass",
          "hair_color",
          "skin_color",
          "eye_color"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "mass": {
            "type": "string"
          },
          "hair_color": {
            "type": "string"
          },
          "skin_color": {
            "type": "string"
          },
          "eye_color": {
            "type": "string"
          }
        }
      },
      "ProcessStatus": {
        "type": "string",
        "enum": [
          "400",
          "404",
          "output-mocked",
          "succeeded",
          "validation-failed"
        ]
      },
      "Success": {
        "required": [
          "people",
          "fromHeader",
          "processStatus"
        ],
        "type": "object",
        "properties": {
          "people": {
            "$ref": "#/components/schemas/People"
          },
          "fromHeader": {
            "type": "string"
          },
          "processStatus": {
            "$ref": "#/components/schemas/ProcessStatus"
          }
        }
      }
    }
  }
}