createCatalogTask catalog_variables: variable-set variables unreachable; string entries silently dropped at build #80
Unanswered
IhorKochetkov
asked this question in
Help and Questions with SDK or Fluent
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment:
@servicenow/sdk4.7.2, Fluent-authored flow usingaction.core.createCatalogTaskwithtemplate_catalog_item+catalog_variables, on a Yokohama/Zurich-line instance.Setup: a
CatalogItem()that attaches a shared variable set (standard "Requested For" set used by every item in the org) plus its own inline variables:Issue 1 — no way to reference a variable set's variables in
catalog_variablesThe docs state
catalog_variablesaccepts variable property references ([item.variables.varName]). ButCatalogItem.variables.*only exposes the item's inline variables — variables belonging to an attached variable set are unreachable. There is noVariableSet(...).variables.*surface either.The underlying Flow Designer action supports set variables in its slushbucket (and
getCatalogVariables' template input isst_sys_catalog_items_and_variable_sets— "items or var sets"), so this is purely an authoring-surface gap.Consequence: any catalog item using a shared variable set cannot show those variables on the created
sc_task. The only workaround is editing the slushbucket manually in Flow Designer after every install — because each install overwrites the action'svalueswith the compiled list, reverting the manual edit. That makes a fully source-managed flow impossible for this (common) case.Issue 2 — plain strings in
catalog_variablesare silently dropped at buildAttempting the obvious workaround — passing the set variable's
item_option_newsys_id as a string — produces no build error and no warning; the entry is just absent from the compiled payload. Verified on 4.7.2 by decoding the gzippedvaluesJSON inside the generatedsys_hub_flowXML: only the property-referenced variables serialize (as<sys_id>:item_option_new, comma-separated). Both of these are dropped silently:If string entries are unsupported by design, the build should fail with a diagnostic — a silently shrinking slushbucket is very hard to notice (it only shows up when a fulfiller reports missing variables on a task).
Asks
catalog_variables(e.g. expose them on the item, aVariableSetreference surface, or accept<sys_id>:item_option_newstrings).catalog_variablesentry can't be compiled, instead of silent omission.Beta Was this translation helpful? Give feedback.
All reactions