Skip to content

refactor: drop Camunda Forms and complete user tasks through domain endpoints - #112

Merged
emaarco merged 2 commits into
mainfrom
emaarco/refactor-drop-camunda-forms-complete-user-tasks
Nov 7, 2026
Merged

emaarco merged 2 commits into
mainfrom
emaarco/refactor-drop-camunda-forms-complete-user-tasks

Conversation

@emaarco

@emaarco emaarco commented Nov 7, 2026

Copy link
Copy Markdown
Member

Why

A user task could be completed two ways: through its Camunda Form in the Tasklist (or the engine REST API), which bypasses the domain services, or through a domain endpoint. Clarify return with supplier was even form-only on purpose. The .form files were one more artifact to keep in step with the variables the process reads. Every example now has one pro-code path, and the logic is the same in all of them.

What

  • All BPMN examples: camunda:formRef / zeebe:formDefinition removed from both user tasks with bpmn-cli (element ids unchanged), documentation now names only the domain endpoint. The .form files and every form entry in deployment patterns, deployment adapters and deployment tests are gone.
  • New POST /api/bike-leasing/{applicationId}/clarify-return in every example, temporal included: no body, answers 202, confirm-only (nothing new on the aggregate, no process variables). ClarifyReturnUseCase, ClarifyReturnService, ClarifyReturnController and their tests are byte-identical across examples; LeasingProcess.completeReturnClarification is implemented the way each process adapter already completes clarifyAlternative. Process tests complete the task through the adapter; openapi.json is re-exported (Kotlin controller returns ResponseEntity<Void>, so Kotlin and Java export the same contract).
  • fullstack-cibseven-embedded: FSD slice features/clarify-return with a "rücknahme geklärt" button in the WITHDRAWN alert on the detail page, regenerated client, copy in de/en. e2e/03-abort.spec.ts clicks the button; helpers/engine-rest.ts only waits for the task.
  • Bruno: 03-abort completes clarify-return through the new endpoint; 10-alternative-via-tasklist is deleted in every example.
  • Engine-specific adaptations:
    • zeebe-vanillabp keeps zeebe:formDefinition externalReference without a form, because VanillaBP 1.10 binds @WorkflowTask by it and refuses to start without it. ClarifyReturnTask now stores the task id on the workflow aggregate (migration V3__clarify_return_task.sql).
    • cibseven- and operaton-process-engine-api pass applicationId into callActivity_cancelBikeOrder, so the user task pool can find the clarify-return task. EngineApiConfiguration subscribes to both task keys.
    • zeebe-process-engine-api's inbox filters out clarify-return tasks.
    • temporal signals returnClarified to <applicationId>-cancel-order.
    • The Camunda 8 examples turn off bpmnlint's camunda-compat/user-task-definition.
  • Docs: every example gets an ADR *-user-tasks-without-forms.md that links the process-engine-recipes cibseven-user-task-forms (Camunda 7 family) or zeebe-external-tasklist (Camunda 8) recipe for the other form types. AGENTS.md, READMEs, Bruno READMEs, skills and the review-process agents no longer describe the form path or the form-only anti-pattern.
  • drift.yml / drift.lock.yml: stale form and Tasklist entries removed, the new single-example files (ADRs, fullstack frontend slice, vanillabp migration) classified; three formerly differing files are identical again and lost their differs entry.

Verification

  • Every variant built locally: ./gradlew build (Kotlin) and ./mvnw verify (Java) in all 12 examples, including process tests and the generated process API drift (unchanged except the new applicationId input in the two process-engine-api C7 examples).
  • fullstack: npm --prefix frontend run verify (37 tests), api:check, npm run lint:bpmn.
  • npm run lint:bpmn in the BPMN examples with lint tooling installed.
  • Root: npm run drift ("12 examples in step"), npm run generate:check, scripts/check-owner.sh, npm test (48/48).
  • Not run locally: the Bruno collections and the Playwright specs, because the local ports are taken; this PR's pre-merge workflows run them for every touched example and variant.

Out of scope / Follow-ups

  • temporal accepts a returnClarified signal sent before the cancel-order workflow waits for it and consumes it later; rejecting it would need an update with a validator in the workflow.
  • The CIB seven Tasklist still lists both tasks as empty tasks; completing one there is not prevented.

Closes #27

…ndpoints

Both user tasks carry no form in any example any more. Every task is
completed through a domain endpoint: the new
POST /api/bike-leasing/{id}/clarify-return (confirm-only, 202) joins
clarify-alternative. Bruno and Playwright no longer complete tasks
through the engine REST API, and the Tasklist scenario is gone.

Each example records the decision in an ADR that points to
process-engine-recipes for the other form types.

Closes #27
@emaarco
emaarco merged commit 229dba7 into main Nov 7, 2026
61 checks passed
@emaarco
emaarco deleted the emaarco/refactor-drop-camunda-forms-complete-user-tasks branch November 7, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: drop Camunda Forms, complete user tasks pro-code only

1 participant