Every install resets flows to draft/inactive + stale master snapshot throws "Plan does not exist" (breaks SP catalog item) #81
Unanswered
IhorKochetkov
asked this question in
Help and Questions with SDK or Fluent
Replies: 2 comments 1 reply
-
|
Related prior art: #65 — custom action types also deploy in Draft state, and per that thread this blocks the SDK installer from activating flows that reference them. Same lifecycle gap, two artifact types; probably best triaged together. (Both currently require the same manual Flow Designer publish/activate ritual after every install.) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
A solution for this is being worked on to publish flows and related entities through the SDK |
Beta Was this translation helpful? Give feedback.
1 reply
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 (Flow()withtrigger.application.serviceCatalog, stages, tryCatch), deployed vianow-sdk installfrom CI on every merge.We hit a chain of flow-lifecycle problems that make source-managed flows operationally fragile. All verified on a Yokohama/Zurich-line instance.
1. Every install deactivates the flow
The generated
sys_hub_flowpayload hard-codes<status>draft</status>and<active>false</active>, and there is no Fluent property to ship a flow active/published. Consequence: every app deploy — including ones that don't touch the flow — resets a production flow to draft/inactive, and someone must reactivate it in Flow Designer afterwards. For a CI pipeline that installs on every merge, that means recurring outage windows for catalog fulfillment.2. After an update install, the master snapshot is stale — and it crashes the Service Portal
When the install updates a previously-activated flow, the flow's existing
master_snapshotstill points at the old compiled plan, whose definition records the install just replaced. Anything that reads the master snapshot then throws:In our case the SC Catalog Item widget died on this ("Item not found" for the whole item) because it computes estimated delivery time from the flow's stages. We worked around the widget crash with
hideDeliveryTime: trueon the item, but the underlying stale plan still affects execution.3. Recovery requires a manual Flow Designer edit — plain reactivation is not enough
After the install, FD's Deactivate → Activate reuses the stale snapshot (latest == master, so FD sees "nothing to publish" and only re-arms the trigger). The only way to get a fresh snapshot/plan is: Edit flow → make some change → Save → Activate. So the per-deploy ritual is a manual, undocumented, easy-to-forget sequence — per flow, per environment.
Asks
now-sdkpost-install step that performs the equivalent of FD's publish+activate — compiling a fresh snapshot/plan from the just-installed definition).Plan does not exist.Related reports from the same build: #79 (domain separation), #80 (
catalog_variablessilent drops).Beta Was this translation helpful? Give feedback.
All reactions