Skip to content

feat(templates): client-Java process handlers for template-bpm (#6584) - #6619

Merged
delchev merged 1 commit into
masterfrom
feat/templates-bpm-java
Aug 8, 2026
Merged

feat(templates): client-Java process handlers for template-bpm (#6584)#6619
delchev merged 1 commit into
masterfrom
feat/templates-bpm-java

Conversation

@delchev

@delchev delchev commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Closes #6584. Part of the umbrella #6591.

The BPM starter was the last template wired to the TypeScript stack:

  1. tasks/my-service-task.ts<package>/MyServiceTask.java, a plain
    org.flowable.engine.delegate.JavaDelegate (instantiated per execution via its no-arg
    constructor — not a bean, as DirigibleJavaCallDelegate requires).
  2. process.bpmn.template's service task switches from ${JSTask} + a .ts handler path to
    ${JavaTask} + a handler field holding the class' FQN (${javaPackageName}.MyServiceTask).
  3. api/ProcessService.ts.template<package>/ProcessService.java, an sdk.http @Controller
    starting the process through sdk.bpm.Process, at
    POST /services/java/<project>/<package>/ProcessService/processes with the process variables as
    its JSON body.
  4. Logging goes through sdk.log.Logging.

The .gen descriptor already pointed at template-form-builder-harmonia (repointed when the
AngularJS templates were removed); the issue's last form-builder-angularjs mention lives in the
form-builder README and is reworded, so grep -rn "form-builder-angularjs" components/template is
now empty.

Note the templates render through Velocity, so the Java sources use ${javaPackageName} /
${processId}, not {{…}} — and ${JavaTask} survives verbatim because it is an undefined
reference, the same mechanism ${JSTask} relied on.

Verification (scaffolded, published, run on a live instance)

POST /services/java/demobpm/demobpm/ProcessService/processes  {"greeting":"hi"}
→ {"processInstanceId":"13","processKey":"demoprocess",…}

app.demobpm.MyServiceTask - Hello World! Process instance [13] with variables: {greeting=hi}

The service task ran through the Java delegate (no JS-delegate fallback in the log), the generated
files land at <package>/{ProcessService,MyServiceTask}.java, and the Problems view is clean.

🤖 Generated with Claude Code

The BPM starter scaffolded two TypeScript files; both become client Java:

- tasks/my-service-task.ts -> <package>/MyServiceTask.java, a plain
  org.flowable.engine.delegate.JavaDelegate. The service task in the BPMN
  switches from the JS delegate to the platform's Java call delegate
  (DirigibleJavaCallDelegate, bean name JavaTask) with a handler field holding
  the class' fully qualified name - which is why the handler moves with the
  package.
- api/ProcessService.ts -> <package>/ProcessService.java, an sdk.http @controller
  starting the process through sdk.bpm.Process. It answers at
  POST /services/java/<project>/<package>/ProcessService/processes and takes the
  process variables as its JSON body.

Logging goes through sdk.log.Logging instead of console.log. The .gen descriptor
already pointed at the Harmonia form builder; the last mention of the removed
AngularJS one, in the form-builder README, is reworded.

Part of #6591.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev force-pushed the feat/templates-bpm-java branch from 443dcfa to 0d76689 Compare August 8, 2026 06:16
@delchev
delchev merged commit 1144ce8 into master Aug 8, 2026
8 of 9 checks passed
@delchev
delchev deleted the feat/templates-bpm-java branch August 8, 2026 06:20
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.

templates: template-bpm - client-Java process handlers and the Harmonia form builder

1 participant