Skip to content

fix(templates): the BPM starter's form calls its client-Java service - #6631

Merged
delchev merged 1 commit into
masterfrom
fix/bpm-starter-form-java-endpoint
Aug 9, 2026
Merged

fix(templates): the BPM starter's form calls its client-Java service#6631
delchev merged 1 commit into
masterfrom
fix/bpm-starter-form-java-endpoint

Conversation

@delchev

@delchev delchev commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Fixes red master nightly

BPMStarterTemplateIT is failing on master on both the H2 and the PostgreSQL leg.

#6619 migrated the BPM starter's two TypeScript files to client Java but left everything that talks
to them pointing at the retired TypeScript, so the sample does not work at all:

  • The form posted to /services/ts/<project>/api/ProcessService.ts/processes — a file that PR deleted
    — and branched on response.status != 202, the status the TS service used to set, where the
    client-Java @Controller answers 200. That is the failure the nightly reports: the alert reads
    Unable to trigger a new process: 'undefined', because the error branch prints response.message,
    which the form-builder's $http shim never sets. It now posts to
    /services/java/<project>/<javaPackageName>/ProcessService/processes and uses a proper error
    callback instead of an exact-status branch, which also gives the failure path a real message.
  • The service task logged a different line than before the migration (Process instance [id] with variables vs Process variables), which the test asserts. Restored, so the sample's observable
    behaviour is unchanged by the port.

The test itself also watched the wrong logger: console.log from the retired TypeScript landed on
app.out, while the SDK logger nests the given name under app., so the Java task logs to
app.<package>.MyServiceTask — which an appender bound to app.out never sees, and which
logback-test.xml pins to ERROR. It now watches the app tree, so it observes any client-application
log and does not depend on the package name derived from the project.

Verified locally by the commit's author: the process starts through the Java controller and the task
logs app.bpmtestproject.MyServiceTask - Hello World! Process variables: {param1=string-param-value, param2=777.0}.

Full rationale is in the commit message.

🤖 Generated with Claude Code

Master's nightly is red on BPMStarterTemplateIT, on both the H2 and the
PostgreSQL leg. #6619 migrated the BPM starter's two TypeScript files to
client Java but left everything that TALKS to them pointing at the retired
TypeScript, so the sample no longer works at all:

- the form still posted to /services/ts/<project>/api/ProcessService.ts/
  processes, a file that PR deleted, and branched on `response.status != 202`
  - the status the TS service used to set, where the client-Java @controller
  answers 200. Hence the failure the nightly reports: the alert reads
  "Unable to trigger a new process: 'undefined'" (the error branch prints
  `response.message`, which the form-builder's $http shim never sets). It now
  posts to /services/java/<project>/<javaPackageName>/ProcessService/processes
  and, since that shim rejects on a non-2xx, uses a proper error callback
  instead of an exact-status branch - which also gives the failure path a real
  message.
- the service task logged a different line than before the migration
  ("Process instance [id] with variables" vs "Process variables"), which the
  test asserts. Restored, so the sample's observable behaviour is unchanged
  by the port.

And the test itself watched the wrong logger. `console.log` from the retired
TypeScript task landed on "app.out"; the SDK logger nests the name it is given
under "app.", so the Java task logs to app.<package>.MyServiceTask - which an
appender bound to app.out never sees, and which logback-test.xml pins to ERROR.
It now watches the "app" tree, so it observes any client-application log and
does not depend on the package name derived from the project.

Verified by running BPMStarterTemplateIT locally: the process starts through
the Java controller and the task logs
`app.bpmtestproject.MyServiceTask - Hello World! Process variables:
{param1=string-param-value, param2=777.0}`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev merged commit 0b7f107 into master Aug 9, 2026
18 checks passed
@delchev
delchev deleted the fix/bpm-starter-form-java-endpoint branch August 9, 2026 13:26
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.

1 participant