Describe the bug
GlueIntentGenerator.postSetExpr renders a posts: set: value to a Java expression, and its string-literal branch tests the value against "[^"]*" — it only fires when the value still carries its double quotes. YAML strips them first, so an authored
posts:
- name: goodsIssueNote
forEntity: GoodsIssue
event: create
into: StockNote
idempotentBy: GoodsIssue
set:
Note: "issued"
reaches the renderer as issued, misses every branch and falls through the final pass-through, so the template emits
The generated module does not compile. The construct's own javadoc (PostIntent) documents "a quoted string" as a supported form, and GluePostsTest asserts the item/negation/integer/source forms only — so nothing catches it.
Expected
A set: value that is not one of the recognised expression forms and is not numeric renders as a Java string literal (escaped — the #7154 / #7241 family), or generation refuses it with a message naming the rule and the field. Silently emitting an identifier is the one outcome that cannot be right.
Context
Found while building the posts: fixture for #7179 (PR #7245): the fixture had to avoid a string value to keep the generated handler compilable. postSetExpr in components/engine/engine-intent/.../generator/GlueIntentGenerator.java; the pass-through's own comment already calls itself "best effort".
Describe the bug
GlueIntentGenerator.postSetExprrenders aposts:set:value to a Java expression, and its string-literal branch tests the value against"[^"]*"— it only fires when the value still carries its double quotes. YAML strips them first, so an authoredreaches the renderer as
issued, misses every branch and falls through the final pass-through, so the template emitsThe generated module does not compile. The construct's own javadoc (
PostIntent) documents "a quoted string" as a supported form, andGluePostsTestasserts the item/negation/integer/source forms only — so nothing catches it.Expected
A
set:value that is not one of the recognised expression forms and is not numeric renders as a Java string literal (escaped — the #7154 / #7241 family), or generation refuses it with a message naming the rule and the field. Silently emitting an identifier is the one outcome that cannot be right.Context
Found while building the
posts:fixture for #7179 (PR #7245): the fixture had to avoid a string value to keep the generated handler compilable.postSetExprincomponents/engine/engine-intent/.../generator/GlueIntentGenerator.java; the pass-through's own comment already calls itself "best effort".