{"id":37029115,"url":"https://github.com/holunda-io/camunda-bpm-data","last_synced_at":"2026-01-14T03:29:16.666Z","repository":{"id":36985878,"uuid":"213882987","full_name":"holunda-io/camunda-bpm-data","owner":"holunda-io","description":"Beautiful process data handling for Camunda 7 Platform.","archived":true,"fork":false,"pushed_at":"2025-06-11T01:23:39.000Z","size":6278,"stargazers_count":34,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-07-11T18:18:13.245Z","etag":null,"topics":["api","bpm","camunda-7","data","process"],"latest_commit_sha":null,"homepage":"https://github.com/holunda-io/c7","language":"Kotlin","has_issues":false,"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/holunda-io.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-09T09:59:51.000Z","updated_at":"2025-06-26T11:48:18.000Z","dependencies_parsed_at":"2024-01-11T18:55:42.954Z","dependency_job_id":"b0bfbb2d-2918-470b-8f64-e0d9218b2713","html_url":"https://github.com/holunda-io/camunda-bpm-data","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/holunda-io/camunda-bpm-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holunda-io%2Fcamunda-bpm-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holunda-io%2Fcamunda-bpm-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holunda-io%2Fcamunda-bpm-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holunda-io%2Fcamunda-bpm-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holunda-io","download_url":"https://codeload.github.com/holunda-io/camunda-bpm-data/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holunda-io%2Fcamunda-bpm-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","bpm","camunda-7","data","process"],"created_at":"2026-01-14T03:29:16.026Z","updated_at":"2026-01-14T03:29:16.656Z","avatar_url":"https://github.com/holunda-io.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Camunda BPM Data\n\n\u003e Beautiful process data handling for Camunda Platform 7.\n\n[![stable](https://img.shields.io/badge/lifecycle-STABLE-green.svg)](https://github.com/holisticon#open-source-lifecycle)\n[![Development branches](https://github.com/holunda-io/camunda-bpm-data/actions/workflows/default.yml/badge.svg)](https://github.com/holunda-io/camunda-bpm-data/actions/workflows/default.yml)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.holunda.data/camunda-bpm-data/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.holunda.data/camunda-bpm-data)\n[![CodeCov](https://codecov.io/gh/holunda-io/camunda-bpm-data/branch/master/graph/badge.svg)](https://codecov.io/gh/holunda-io/camunda-bpm-data)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/02d238f71a8243cb96fd2fe322a710eb)](https://www.codacy.com/gh/holunda-io/camunda-bpm-data/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=holunda-io/camunda-bpm-data\u0026amp;utm_campaign=Badge_Grade)\n\n# Relocation\n\nThis project is **relocated** to https://github.com/holunda-io/c7 and **will be developed** further there.\nLast release produced from this location was **2025.05.1**\nThis repository will be archived.\n\n## Why to use this library in every Camunda project\n\nIf you are a software engineer and run process automation projects in your company or on behalf of the customer\nbased on Camunda Process Engine, you probably are familiar with process variables. Camunda offers an API to access\nthem and thereby manipulate the state of the process execution - one of the core features during process automation.\n\nUnfortunately, as a user of the Camunda Platform 7 API, you have to exactly know the variable type (so the Java class behind it).\nFor example, if you store a String in a variable `\"orderId\"` you must extract it as a String in every piece of code.\nSince there is no code connection between the different code parts, but the BPMN process model orchestrates\nthese snippets to a single process execution, it makes refactoring and testing of process automation projects\nerror-prone and challenging.\n\nThis library helps you to overcome these difficulties and make access, manipulation and testing process variables really\neasy and convenient. We leverage the Camunda Platform 7 API and offer you not only a better API but also some [additional features](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/features.html).\n\nIf you want to read more about data in Camunda processes, have a look on those articles:\n\n  * [Camunda Nation Podcast - Managing Data in Processes, with Simon Zambrovski](https://podcasts.apple.com/us/podcast/managing-data-in-processes-with-simon-zambrovski/id1478382505?i=1000547023972)\n  * [Data in Process (Part 1)](https://medium.com/holisticon-consultants/data-in-process-part-1-2620bf9abd76)\n  * [Data in Process (Part 2)](https://medium.com/holisticon-consultants/data-in-process-part-2-7c6a109e6ee2)\n\n## Quick Introduction\n\n### Setup\n\nIf you just want to start using the library, put the following dependency into your project `pom.xml`:\n\n``` xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.holunda.data\u003c/groupId\u003e\n  \u003cartifactId\u003ecamunda-bpm-data\u003c/artifactId\u003e\n  \u003cversion\u003e1.5.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you are using Gradle Kotlin DSL add to your `build.gradle.kts`:\n\n``` kotlin\nimplementation(\"io.holunda.data:camunda-bpm-data:1.5.0\")\n```\n\nFor Gradle Groovy DSL add to your `build.gradle`:\n\n``` groovy\nimplementation 'io.holunda.data:camunda-bpm-data:1.5.0'\n```\n### Variable declaration\nNow your setup is completed, and you can declare your variables like this:\n\n``` java\nimport io.holunda.camunda.bpm.data.factory.VariableFactory;\nimport static io.holunda.camunda.bpm.data.CamundaBpmData.*;\n\npublic class OrderApproval {\n  public static final VariableFactory\u003cString\u003e ORDER_ID = stringVariable(\"orderId\");\n  public static final VariableFactory\u003cOrder\u003e ORDER = customVariable(\"order\", Order.class);\n  public static final VariableFactory\u003cBoolean\u003e ORDER_APPROVED = booleanVariable(\"orderApproved\");\n  public static final VariableFactory\u003cBigDecimal\u003e ORDER_TOTAL = customVariable(\"orderTotal\", BigDecimal.class);\n  public static final VariableFactory\u003cOrderPosition\u003e ORDER_POSITION = customVariable(\"orderPosition\", OrderPosition.class);\n}\n```\n### Variable access from Java Delegate\n\nFinally, you want to access them from your Java delegates, Execution or Task Listeners or simple Java components:\n\n``` java\npublic class MyDelegate implements JavaDelegate {\n  @Override\n  public void execute(DelegateExecution execution) {\n    VariableReader reader = CamundaBpmData.reader(execution);\n    OrderPosition orderPosition = reader.get(ORDER_POSITION);\n    BigDecimal oldTotal = reader.getOptional(ORDER_TOTAL).orElse(BigDecimal.ZERO);\n\n    BigDecimal newTotal = oldTotal.add(calculatePrice(orderPosition));\n    ORDER_TOTAL.on(execution).setLocal(newTotal);\n  }\n\n  private BigDecimal calculatePrice(OrderPosition orderPosition) {\n     return orderPosition.getNetCost().multiply(BigDecimal.valueOf(orderPosition.getAmount()));\n  }\n}\n```\n\n### Variable access from REST Controller\n\nNow imagine you are implementing a REST controller for a user task form which\nloads data from the process application, displays it, captures some input and\nsends that back to the process application to complete the user task. By doing so,\nyou will usually need to access process variables. Here is an example:\n\n``` java\n@RestController\n@RequestMapping(\"/task/approve-order\")\npublic class ApproveOrderTaskController {\n\n    private final TaskService taskService;\n\n    public ApproveOrderTaskController(TaskService taskService) {\n        this.taskService = taskService;\n    }\n\n    @GetMapping(\"/{taskId}\")\n    public ResponseEntity\u003cApproveTaskDto\u003e loadTask(@PathVariable(\"taskId\") String taskId) {\n        VariableReader reader = CamundaBpmData.reader(taskService, taskId);\n        Order order = reader.get(ORDER);\n        return ResponseEntity.ok(new ApproveTaskDto(order));\n    }\n\n    @PostMapping(\"/{taskId}\")\n    public ResponseEntity\u003cVoid\u003e completeTask(@PathVariable(\"taskId\") String taskId, @RequestBody ApproveTaskCompleteDto userInput) {\n        VariableMap vars = CamundaBpmData.builder()\n            .set(ORDER_APPROVED, userInput.getApproved())\n            .build();\n        taskService.complete(taskId, vars);\n        return ResponseEntity.noContent().build();\n    }\n}\n\n```\n\n### Testing correct variable access\n\nIf you want to write the test for the REST controller, you will need to stub\nthe task service and verify that the correct variables has been set. To simplify\nthese tests, we added some helper code to the famous library `camunda-platform-7-mockito`.\n\nNow you can use `TaskServiceVariableStubBuilder` to stub correct behavior of Camunda Task Service\nand `TaskServiceVerification` to verify the correct access to variables easily. Here is the JUnit\ntest of the REST controller above, making use of `camunda-platform-7-mockito`.\n\n``` java\npublic class ApproveOrderTaskControllerTest {\n\n    private static Order order = new Order(\"ORDER-ID-1\", new Date(), new ArrayList\u003c\u003e());\n    private TaskService taskService = mock(TaskService.class);\n    private TaskServiceVerification verifier = new TaskServiceVerification(taskService);\n    private ApproveOrderTaskController controller = new ApproveOrderTaskController(taskService);\n    private String taskId;\n\n    @Before\n    public void prepareTest() {\n        reset(taskService);\n        taskId = UUID.randomUUID().toString();\n    }\n\n    @Test\n    public void testLoadTask() {\n        // given\n        new TaskServiceVariableStubBuilder(taskService).initial(ORDER, order).build();\n        // when\n        ResponseEntity\u003cApproveTaskDto\u003e responseEntity = controller.loadTask(taskId);\n        // then\n        assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);\n        assertThat(responseEntity.getBody()).isEqualTo(new ApproveTaskDto(order));\n        verifier.verifyGet(ORDER, taskId);\n        verifier.verifyNoMoreInteractions();\n    }\n\n    @Test\n    public void testCompleteTask() {\n        // when\n        ApproveTaskCompleteDto response = new ApproveTaskCompleteDto(true);\n        ResponseEntity\u003cVoid\u003e responseEntity = controller.completeTask(taskId, response);\n        // then\n        assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);\n        verifier.verifyComplete(builder().set(ORDER_APPROVED, response.getApproved()).build(), taskId);\n        verifier.verifyNoMoreInteractions();\n    }\n}\n```\n\n### Kotlin\n\nIf you use kotlin, there is an own collection of factory methods by simple using `CamundaBpmDataKotlin` instead of `CamundaBpmData`.\nFor usage examples, see here: [Examples Kotlin](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/examples-kotlin.html)\n\n### Further documentation\n\nFor further details, please consult our [Quick Start](https://www.holunda.io/camunda-bpm-data/snapshot/quick-start)\nguide or have a look to our primary documentation: [User Guide](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/motivation.html)\n\n## Working Example\n\nWe prepared some typical usage scenarios and implemented two example projects in Java and Kotlin.\nSee our [Examples](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/examples.html) section for usage and configuration.\n\n## License\n\n[![Apache License 2](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\nThis library is developed under Apache 2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholunda-io%2Fcamunda-bpm-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholunda-io%2Fcamunda-bpm-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholunda-io%2Fcamunda-bpm-data/lists"}