Intent: relation.field form fields + declarative setField glue#6088
Merged
Conversation
A BPM user-task form's model is the process variables, which carry a to-one relation's FK id but not the related entity's own fields - so a form field like book.title / book.price rendered but stayed empty. The decision resolver already solved this for gateway conditions; this generalizes it to user-task forms. - ProcessResolverSupport scans user-task forms (not just decision conditions) for relation.field references and anchors each resolver at the EARLIEST step that needs it (a path shared by a form and a later decision now resolves before the form, and the process-global variable still serves the decision). - BpmnIntentGenerator inserts the resolver service task before its anchor step (any kind) and rewrites decisions against all process resolvers. - FormIntentGenerator binds a relation.field control to the <relation>_<field> resolver variable, types it from the target entity's field, and marks it readonly. - IntentParser validates a form relation.field is a one-hop to-one of forEntity with the field present on the target. - IntentEngineIT covers a shared (form+decision) and a form-only relation field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A serviceTask with no `call` used to scaffold a hand-written custom.<Step>
Java stub. This adds a declarative field-set action so an approval outcome
("Approve -> status ACTIVE, Reject -> REJECTED") is expressed as glue, no
custom code.
- setField: a serviceTask `args: { setField: <field>, value: <literal> }` sets
a string/text field of the process trigger entity, generated as a
gen/events/<Process><Step>.java JavaDelegate (SetFieldSupport -> the `setters`
glue collection -> SetField.java.template + the setters case in
generateUtils.js). It loads the entity by its PK process variable and persists
via updateWithoutEvent (a workflow write must not re-fire onUpdate reactions).
- next: `args: { next: <step|end> }` overrides a step's linear successor so a
decision's two branches converge on a common step instead of the first falling
through into the second. The existing then/else fall-through is left intact
(LoanApproval relies on it), so convergence is explicit.
- Parser validates setField is a string/text field of the trigger entity with a
value present, and that `next` targets a declared step or `end`.
- IntentSettings scaffolds `setters` overrides; IntentEngineIT covers the
approve/reject diamond end to end (BPMN + glue + generated JavaDelegates).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up intent-engine work on top of the merged Harmonia runtime UI (#6078). Supersedes #6087, which could not be reopened after this branch was rebased onto the squash-merged #6078 (its head commit was orphaned). Two commits, both against current master:
1. Resolve
relation.fieldform fields via a process resolver stepA BPM user-task form's model is the process variables, which carry a to-one relation's FK id but not the related entity's own fields — so a form field like
book.title/book.pricerendered but stayed empty. Generalizes the decision resolver to user-task forms: scans forms forrelation.field, anchors each resolver at the earliest step that needs it, and binds the form control to the<relation>_<field>process variable.2. Declarative
setFieldglue action + explicitnextstep routingA
serviceTaskwithargs: { setField: <field>, value: <literal> }sets a string/text field of the trigger entity via a generatedgen/events/<Process><Step>.javaJavaDelegate (persisting withupdateWithoutEvent), instead of a hand-writtencustom/stub.args: { next: <step|end> }overrides a step's linear successor so a decision's two branches converge — enabling "Approve → status ACTIVE, Reject → REJECTED" as pure glue.Covered by
IntentEngineIT(18/18 green locally, including the new approve/reject diamond and the relation.field form cases).🤖 Generated with Claude Code