snow-flow 10.0.1-dev.414 → 10.0.1-dev.415
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -153,18 +153,24 @@ async function createFlowViaScheduledJob(
|
|
|
153
153
|
" r.steps.version_insert = { success: !!verSysId, sys_id: verSysId + '' };",
|
|
154
154
|
"",
|
|
155
155
|
// Create snapshot in sys_hub_flow_snapshot (this is what latest_snapshot points to!)
|
|
156
|
+
// Reference snapshot fields: parent_flow, master, internal_name, type, run_as,
|
|
157
|
+
// access, active, status, name, sc_callable, callable_by_client_api
|
|
156
158
|
" var snapId = null;",
|
|
157
159
|
" try {",
|
|
158
160
|
" var snap = new GlideRecord('sys_hub_flow_snapshot');",
|
|
159
161
|
" if (snap.isValid()) {",
|
|
160
162
|
" snap.initialize();",
|
|
161
163
|
" snap.setValue('name', flowName);",
|
|
162
|
-
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
164
|
+
" snap.setValue('internal_name', intName);",
|
|
165
|
+
" snap.setValue('parent_flow', flowSysId);",
|
|
166
|
+
" snap.setValue('type', isSubflow ? 'subflow' : 'flow');",
|
|
167
|
+
" snap.setValue('run_as', runAs);",
|
|
168
|
+
" snap.setValue('access', 'public');",
|
|
169
|
+
" snap.setValue('active', true);",
|
|
170
|
+
" snap.setValue('master', true);",
|
|
171
|
+
" snap.setValue('status', 'draft');",
|
|
172
|
+
" try { snap.setValue('sc_callable', false); } catch(e) {}",
|
|
173
|
+
" try { snap.setValue('callable_by_client_api', false); } catch(e) {}",
|
|
168
174
|
" snapId = snap.insert();",
|
|
169
175
|
" r.steps.snapshot_insert = { success: !!snapId, sys_id: snapId + '' };",
|
|
170
176
|
" } else { r.steps.snapshot_insert = { success: false, error: 'table not valid' }; }",
|