Skip to content

feat: add StartProcessByMessageAtElementCmd to process API#293

Open
emaarco wants to merge 2 commits into
developfrom
emaarco/issue-292-plan-and-docs
Open

feat: add StartProcessByMessageAtElementCmd to process API#293
emaarco wants to merge 2 commits into
developfrom
emaarco/issue-292-plan-and-docs

Conversation

@emaarco

@emaarco emaarco commented Jun 16, 2026

Copy link
Copy Markdown
Member

What

Adds StartProcessByMessageAtElementCmd to the Process API — analogous to the existing StartProcessByDefinitionAtElementCmd, but it starts a process at a specific element via a message name instead of a definition key.

This enables starting at a given element for processes that have no plain (none) start event and are entered only through one or multiple message start events — the use case described in #292.

Changes

  • New command api/.../process/StartProcessByMessageAtElementCmd.kt (messageName, elementId, payload, restrictions), with the same Java-friendly constructor overloads as its definition-based sibling. Tagged @since 1.7. No dispatch changes needed — StartProcessApi.startProcess(...) accepts it polymorphically.
  • Docs docs/process-api.md: intro now lists four start variants and includes a startByMessageAtActivity(...) example.
  • README feature matrix: new Start Process by message at row + an icon legend.

Adapter support

The matrix marks the new feature 🚧 (in development) for C7 embedded, C7 remote and CIB7, and ❌ for C8.

C8/Zeebe is not technically supportable: CreateProcessInstance with startInstructions starts by process definition id (not message), and PublishMessage has no startInstructions — the two cannot be combined, and there is no API to resolve a message name to its owning definition.

Adapter implementations are tracked in separate tickets and are out of scope for this PR:

Docs delivery

The published docs site (process-engine-api-docs) imports docs/**/*.md from this repo's develop branch at build time via the mkdocs-multirepo plugin, so no separate docs-repo PR is needed. The site rebuilds on its own push/tag (left to the release).

Refs #292

Adds a new start command analogous to StartProcessByDefinitionAtElementCmd
that starts a process at a specific element via a message name, for processes
that have no plain (none) start event and are entered only via message start
events.

- new StartProcessByMessageAtElementCmd (messageName, elementId, payload,
  restrictions) with Java-friendly constructor overloads
- document the new start variant in docs/process-api.md
- add 'Start Process by message at' row to the README adapter feature matrix
  (C7 embedded/remote and CIB7 in development, C8 unsupported) plus an icon
  legend

Refs #292
@emaarco emaarco marked this pull request as ready for review June 16, 2026 12:31
@emaarco emaarco requested a review from zambrovski June 16, 2026 12:31
@emaarco emaarco self-assigned this Jun 16, 2026
@emaarco emaarco added the Prio: SHOULD Feature is essential for the milestone. label Jun 16, 2026
@emaarco emaarco added this to the 1.7 milestone Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 49.67%. Comparing base (f791d56) to head (4740491).

Files with missing lines Patch % Lines
...neapi/process/StartProcessByMessageAtElementCmd.kt 95.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #293      +/-   ##
=============================================
+ Coverage      47.65%   49.67%   +2.02%     
- Complexity        72       80       +8     
=============================================
  Files             47       48       +1     
  Lines            447      467      +20     
  Branches           9        9              
=============================================
+ Hits             213      232      +19     
- Misses           229      230       +1     
  Partials           5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds unit tests exercising all constructor overloads, payload delegation and
restrictions, to satisfy codecov patch coverage on the new command.

Refs #292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Prio: SHOULD Feature is essential for the milestone.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant