{"id":24553006,"url":"https://github.com/npdeehan/conditional-bpmn-events-in-action","last_synced_at":"2025-04-15T23:13:52.099Z","repository":{"id":90222802,"uuid":"364498263","full_name":"NPDeehan/Conditional-BPMN-Events-In-Action","owner":"NPDeehan","description":"This is an example of how conditional events can be triggered in Camunda using a simple spring boot project","archived":false,"fork":false,"pushed_at":"2021-05-05T10:08:20.000Z","size":388,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T23:13:48.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2021-05-05T07:42:49.000Z","updated_at":"2023-12-24T14:15:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"281c37c9-5cb9-4dae-b263-0b1c9feed62d","html_url":"https://github.com/NPDeehan/Conditional-BPMN-Events-In-Action","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FConditional-BPMN-Events-In-Action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FConditional-BPMN-Events-In-Action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FConditional-BPMN-Events-In-Action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FConditional-BPMN-Events-In-Action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NPDeehan","download_url":"https://codeload.github.com/NPDeehan/Conditional-BPMN-Events-In-Action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167448,"owners_count":21223506,"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":[],"created_at":"2025-01-23T01:33:49.804Z","updated_at":"2025-04-15T23:13:52.082Z","avatar_url":"https://github.com/NPDeehan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camunda Conditional Events Example\nThis example is a Spring Boot Application using [Camunda](http://docs.camunda.org).\nIn this example i'll show a variety of ways that [BPMN's Conditional Events](https://docs.camunda.org/manual/latest/reference/bpmn20/events/conditional-events/) can be used in your processes so that you can react dynamically to conditions that arrise in your model. \n\n## The Process\nThe [BPMN Process](src/main/resources/process.bpmn) in this example attempts to help a patient find the right fictional medical practitioner to help them with their pain.\n\n![BPMN Process Image](src/main/resources/static/images/process.png)\n\nAt various point data entered by the user can trigger an event. For example if you pick Professor Snape from the selection of doctors and complete the task\n![snape](src/main/resources/static/images/doctorSnape.png)\n\nthe conditional boundary event on the task will trigger. This is because the front end will set the variable `doctor`with the value `snape`and the expression on the conditional event is:\n\n```\n#{doctor == 'snape'}\n```\n\nThis will then send the process to `Go tot he Potoins Room` task.\n\n## Different types of conditional events\n\nThere are lots of way of using conditional events in BPMN and in this example I demonstrate the following:\n\n### Intermediate Conditional Event (with Gateway)\n\n![ConIntGate](src/main/resources/static/images/conditional-gateway.png)\nThis is an example where the process is waiting at a certain point (the gateway) until one of the two events it's waiting for becomes true. Once any one of the events triggeres the process continues along that sequence flow. \n\n### Interrupting Conditional Boundary Event.\n![ConInt](src/main/resources/static/images/conditional-interupting.png)\n\nIf this expression in this event is triggered it will interrupt the process and move the process will continue following the sequence flow leaving from the event. Feel free to read more about it [here in the docs](https://docs.camunda.org/manual/latest/reference/bpmn20/events/conditional-events/#conditional-boundary-event)\n\n### Non-Interrupting Conditional Boundary Event\n![ConNonInt](src/main/resources/static/images/conditional-non-interupting.png)\nIf the expression in this event is triggered the task will not be interrupted but a parallel token will flow to connected activity. This event has the potential to be triggered multiple times as long as the task is still active. Read more about it [here in the docs](https://docs.camunda.org/manual/latest/reference/bpmn20/events/conditional-events/#conditional-boundary-event)\n\n### Interrupting Conditional Even Sub Process. \n![ConSubInt](src/main/resources/static/images/conditional-event-sub-interupting.png)\nThis is an event that is active for the duration of the process instance and if at any point the condition on the event is met the process is interrupted (all other tokens will be cancelled) and the ``Go To The Emergancy Room`` task will become active. \n\n### Non-Interrupting Conditional Even Sub Process.\n![ConSubInt](src/main/resources/static/images/conditional-event-sub-non-interupting.png)\nThis is an event that is active for the duration of the process instance and if at any point the condition on the event is met a token is created in parallel to anything else going on in the process. This can be activated multiple times for each time the condition is met. \n\n## Have fun!\nHave fun exploring how to trigger all the possible events. If you're really lucky you might be able to trigger a special case where Niall and his hawk will attempt to treat you in the emergency room :) \n\n## Running the application\nYou can also build and run the process application with Spring Boot.\n\n#### Manually\n1. Build the application using:\n\n```bash\nmvn clean package\n```\n2. Run the *.jar file from the `target` directory using:\n\n```bash\njava -jar target/Conditional-BPMN-Events.jar\n```\n\nFor a faster 1-click (re-)deployment see the alternatives below.\n\n#### Maven Spring Boot Plugin\n1. Build and deploy the process application using:\n\n```bash\nmvn clean package spring-boot:run\n```\n\n#### Your Java IDE\n1. Run the project as a Java application in your IDE using CamundaApplication as the main class.\n\n### Run and Inspect with Tasklist and Cockpit\nOnce you deployed the application you can run it using\n[Camunda Tasklist](http://docs.camunda.org/latest/guides/user-guide/#tasklist)\nand inspect it using\n[Camunda Cockpit](http://docs.camunda.org/latest/guides/user-guide/#cockpit).\n\n## Environment Restrictions\nBuilt and tested against Camunda Platform version 7.15.0.\n\n## License\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpdeehan%2Fconditional-bpmn-events-in-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpdeehan%2Fconditional-bpmn-events-in-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpdeehan%2Fconditional-bpmn-events-in-action/lists"}