{"id":24552959,"url":"https://github.com/npdeehan/camunda-endpoint-diversity-example","last_synced_at":"2026-01-04T04:03:39.318Z","repository":{"id":226014853,"uuid":"767463854","full_name":"NPDeehan/Camunda-Endpoint-Diversity-Example","owner":"NPDeehan","description":"This is an example of how camunda is able to integrate Kafka, Frontend Applications, Rest services and more.","archived":false,"fork":false,"pushed_at":"2024-03-05T12:10:58.000Z","size":317,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T01:34:30.612Z","etag":null,"topics":["bpmn","camunda-8"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NPDeehan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-05T10:42:18.000Z","updated_at":"2024-05-09T09:25:00.000Z","dependencies_parsed_at":"2024-03-05T13:30:51.250Z","dependency_job_id":"dd26064d-a5cf-4a4f-b309-f9c8b0756e5b","html_url":"https://github.com/NPDeehan/Camunda-Endpoint-Diversity-Example","commit_stats":null,"previous_names":["npdeehan/camunda-endpoint-diversiity-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FCamunda-Endpoint-Diversity-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FCamunda-Endpoint-Diversity-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FCamunda-Endpoint-Diversity-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FCamunda-Endpoint-Diversity-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NPDeehan","download_url":"https://codeload.github.com/NPDeehan/Camunda-Endpoint-Diversity-Example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878491,"owners_count":20362433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bpmn","camunda-8"],"created_at":"2025-01-23T01:33:42.611Z","updated_at":"2026-01-04T04:03:39.260Z","avatar_url":"https://github.com/NPDeehan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camunda Endpoint Diversity Example\n\n![bpmnStockExample](img/CamundaStocks.svg)\n\nThis example integrates a variety of systems simulating some of the complexity of building true end-to-end orchestrations. This integration includes REST services, Kafka Events and Front end Applications. Each of these are distributed across different servers. \n    \n\n### Credentials and Account Creation\n\nYou’ll need a Kafka instance running. (the easiest place to do that is [confluent.cloud](https://confluent.cloud/)). You’ll need a Camunda 8 Cluster (the easiest place to do that is [Camunda SaaS](https://signup.camunda.com/accounts)). Then the fun can start.\n \nConnecting the two systems requires authentication and from your Kafka instance you’ll need the following.\n\n* **Username** -  You’ll get this from creating an API Key for your Kafka instance\n* **Password** - Same as the username, it’s part of the API Key creation\n* **Bootstrap** **Server** - After you create a Kafka cluster you’ll find this in the cluster settings.\n\n🔐 It’s important to know that it’s best practice not to simply copy and paste this sensitive information directly into the model but rather to [create a secret](https://docs.camunda.io/docs/components/console/manage-clusters/manage-secrets/) for each of these in your Camunda cluster. Then you can reference it by typing `{{secrete.yourSecreteHere}}` followed by the name of the key you want to access. \n\nFor this example to work you'll need to create secretes with the following names:\n* KafkaUsername\n* KafkaPassword\n* KafkaBootstrapServer\n\nNow you’re ready to upload and deploy the process.\n\n### Deploy and Start\n\nOnce you have both accounts, it's pretty easy to get started.\n\n#### Camunda Setup\nUpload the bpmn model and the forms from their respective folders and add them to your Camunda 8 account. From the modeler you can deploy the process to a cluster. \n\n#### Kafka Setup\nYou'll need to create 2 topics Kafka.\n`NewDetails` and `Portfolio` \n\nTo start an instance you can create a message on your Kafka cluster to a topic called `NewDetails`\nThe message payload should look like this:\n\n``` JSON\n{\n\"name\" : \"NiallCorp\",\n  \"details\" : { \n    \"update\": \"Hawk Oriented Coffee Company\", \n    \"status\":  \"Great\",\n    \"value\" : 80},\n  \"newStock\" : true\n}\n```\nThe message should then be picked up by the start event and a process instance should start.\n\n\n### Triggering the Events\n\n#### Intermediate Kafka Message\n![interEvent](img/Intermediate.png)\n\nIn this part of the process a token is waiting for a Kafka message. The message will contain updates about a specific stock item. Once a new message comes in, the result in parsed and added to the existing data structure for the stock item.\n\nTo trigger this event create a message on the `NewDetails` topic with the following payload \n\n``` JSON\n{\n\"name\" : \"NiallCorp\",\n  \"details\" : { \n    \"update\": \"The Company has branched out to include owls\", \n    \"status\":  \"Really Great\",\n    \"value\" : 180},\n  \"newStock\" : false\n}\n```\nThe `name` variable is the correlation key. Process instances will only be triggered if it has a matching variable with the same name. \n\nThe content of the `details` object is added to an existing list in the script task. \n\n```\nappend(details, newDetails)\n```\n#### Intermediate Webhook\n![webhook](img/webhookIntermediate.png)\n\nAfter being deployed a URL will be generated and appear in the webhook tab in the modeler's properties panel. You can then use postman to trigger the event. You'll need to include the following payload\n```JSON\n{\n    \"name\" : \"Camunda\",\n    \"highValueSale\" : false\n}\n```\n\nthe `highValueSale` variable will determine if the front end application is activated or not as it's evaluated in the gateway following the event","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpdeehan%2Fcamunda-endpoint-diversity-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpdeehan%2Fcamunda-endpoint-diversity-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpdeehan%2Fcamunda-endpoint-diversity-example/lists"}