Skip to content

Refactor/self contained examples#26

Open
kthoms wants to merge 7 commits into
mainfrom
refactor/self-contained-examples
Open

Refactor/self contained examples#26
kthoms wants to merge 7 commits into
mainfrom
refactor/self-contained-examples

Conversation

@kthoms

@kthoms kthoms commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

kthoms and others added 7 commits July 6, 2026 06:39
…rmations

Add scripts/make-examples-self-contained.py that:
- Removes parent operaton-examples-aggregate reference from all 47 examples
- Adds/updates maven-failsafe-plugin version 3.5.6 with integration-test/verify goals
- Adds rancher profile with Docker socket and Testcontainers environment variables

This makes all examples self-contained and ready to run independently.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix profile ID detection to use exact XML element matching
- Replace string-based 'rancher' detection with proper <id>rancher</id> check
- Fix execution block handling to prevent duplicates
- Handle multiple <profiles> sections by merging them
- Remove old profile variants (rancher-desktop, docker-alternative-rancher, etc.)
- Ensure all 47 examples have exactly one <id>rancher</id> profile
- Verify no duplicate <executions> blocks in failsafe plugin
- All XML is well-formed and properly formatted

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add Colima Docker Desktop profile alongside existing rancher profile.
Profile activates when ~/.colima/default/docker.sock exists and sets
DOCKER_HOST, TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE, TESTCONTAINERS_RYUK_DISABLED
environment variables for failsafe integration tests.

Also update transformation script to generate colima profile.
- Align spring-boot.version to 4.1.0 (project standard)
- Remove hardcoded testcontainers versions, let operaton-bom manage them
Mirror rancher profile for Colima Docker Desktop users running the
full aggregate build from the repository root.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WpWxdzGQPfUGYATcP6Xvxr
Copilot AI review requested due to automatic review settings July 7, 2026 04:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Operaton examples catalog toward “self-contained” builds by removing the Maven parent reference from individual example pom.xml files and standardizing integration-test execution (failsafe) plus Docker-host profiles (Rancher Desktop / Colima). It also adjusts the contract-signing use-case (test wiring + BPMN delegateExpression placement + delegate field injection) and updates the root README’s catalog formatting/content.

Changes:

  • Add a script to rewrite example pom.xml files (remove <parent>, enforce maven-failsafe-plugin config, add rancher + colima profiles).
  • Update many example Maven POMs to be standalone and consistently run ITs via failsafe.
  • Update contract-signing example (IT base URI setup, controller PDF content-type check, BPMN delegate expressions, delegate field injection).

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/make-examples-self-contained.py New utility to rewrite example POMs for self-contained Maven builds and standardized profiles.
README.md Updates catalog/lookup tables and removes the pinned versions table (currently causing standards drift).
pom.xml Adds a colima Maven profile at the aggregate level for Testcontainers socket/env overrides.
examples/use-cases/travel-booking/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/supply-chain-tracking/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/procurement-collaboration/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/order-fulfillment/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/loan-application/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/leave-request/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/insurance-claim/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/incident-management/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/expense-reimbursement/pom.xml Adds failsafe version and docker profiles in the standalone Maven build.
examples/use-cases/employee-onboarding/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/contract-signing/pom.xml Moves to standalone BOM-based dependency management + adds failsafe + docker profiles.
examples/use-cases/complaint-resolution/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/candidate-screening/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/bank-account-opening/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/approval-sla-metrics/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/use-cases/contract-signing/src/test/java/org/operaton/examples/contractsigning/ContractSigningIT.java Switches to @LocalServerPort for RestAssured base URI + sets multipart content-type.
examples/use-cases/contract-signing/src/main/resources/contract-signing.bpmn Moves delegate expressions to operaton:delegateExpression attributes on service tasks.
examples/use-cases/contract-signing/src/main/java/org/operaton/examples/contractsigning/StampSignatureDelegate.java Switches signer role resolution to injected Expression for BPMN field injection.
examples/use-cases/contract-signing/src/main/java/org/operaton/examples/contractsigning/ContractController.java Hardens PDF content-type equality check and names @RequestParams explicitly.
examples/platform-integration/runtime-quarkus/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/platform-integration/integration-keycloak/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/platform-integration/integration-connectors/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/platform-integration/distribution-wildfly/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/platform-integration/distribution-tomcat/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/user-task-forms/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/timer-events/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/signal-events/pom.xml Renames/normalizes docker profile IDs + adds colima profile + pins failsafe version.
examples/core-examples/service-tasks/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/multi-instance/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/message-events/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/integration-rest/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/integration-mail/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/integration-kafka/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/inclusive-gateway/pom.xml Renames/normalizes docker profile IDs + adds colima profile + pins failsafe version.
examples/core-examples/getting-started/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/external-task-worker/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/event-subprocess/pom.xml Renames/normalizes docker profile IDs + adds colima profile + pins failsafe version.
examples/core-examples/error-compensation/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/dmn-decision/pom.xml Reworks/normalizes docker profiles + adds failsafe version and executions.
examples/core-examples/call-activity/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/core-examples/async-continuation/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/xslt-script-task/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/unit-testing/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/spin-json/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/process-migration/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/multi-tenancy/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/job-retry-profile/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/engine-plugin/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/command-interceptor/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/bpmn-model-api-parse/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.
examples/advanced-features/bpmn-model-api-generate/pom.xml Removes parent and adds failsafe + docker profiles for standalone Maven build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines 12 to 16
| Tool | Version |
|---|---|
| JDK | 21 |
| Docker | any recent version (required for tests and local run) |
| Distribution images (`operaton/tomcat`, `operaton/wildfly`, `operaton/operaton`) | `2.1.1` |
| `operaton-keycloak-run` (plugin) | `2.1.0` |
| AWS SDK v2 | 2.29.0 |
| Apache PDFBox | 3.0.7 |

Pinned stack (all examples): Spring Boot **4.1.0**, Operaton **2.1.1**,
Maven Wrapper **3.9.12**, Gradle Wrapper **9.2.0**, PostgreSQL **16**.

Comment thread README.md
| Error boundary event | [error-compensation](examples/core-examples/error-compensation) | Interrupting and non-interrupting |
| Compensation | <ul><li>[error-compensation](examples/core-examples/error-compensation)</li><li>[travel-booking](examples/use-cases/travel-booking)</li></ul> | Manual throw (error-compensation) vs. transaction-driven (travel-booking) |
| Transaction subprocess | [travel-booking](examples/use-cases/travel-booking) | All-or-nothing SAGA; cancel end event triggers auto-compensation |
| Cancel event (end + boundary | [travel-booking](examples/use-cases/travel-booking) | Cancel end event inside transaction + cancel boundary on transaction |
Comment thread README.md
| Event sub-process | [event-subprocess](examples/core-examples/event-subprocess) | Error- and message-triggered |
| External task | [external-task-worker](examples/core-examples/external-task-worker) | Worker API, long polling |
| Async continuation | <ul><li>[async-continuation](examples/core-examples/async-continuation)</li><li>[procurement-collaboration](examples/use-cases/procurement-collaboration)</li></ul> | `asyncBefore`, exclusive job lock |
| Escalation event | [complaint-resolution](examples/use-cases/complaint-resolution | Non-interrupting throw + boundary (parallel), interrupting end event + boundary (cancel) |
Comment thread README.md
| External task | [external-task-worker](examples/core-examples/external-task-worker) | Worker API, long polling |
| Async continuation | <ul><li>[async-continuation](examples/core-examples/async-continuation)</li><li>[procurement-collaboration](examples/use-cases/procurement-collaboration)</li></ul> | `asyncBefore`, exclusive job lock |
| Escalation event | [complaint-resolution](examples/use-cases/complaint-resolution | Non-interrupting throw + boundary (parallel), interrupting end event + boundary (cancel) |
| Collaboration / message flow (two pools | [procurement-collaboration](examples/use-cases/procurement-collaboration) | Two process definitions communicating via message correlation within one engine |
Comment on lines +8 to +13
<properties>
<java.version>21</java.version>
<operaton.version>2.1.0</operaton.version>
<spring-boot.version>4.1.0</spring-boot.version>
<aws-java-sdk-bom.version>2.29.0</aws-java-sdk-bom.version>
</properties>
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.

2 participants