
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 10:49 AM
Hi everyone,
We have a script which calls out a subflow to run within a parent workflow. Previously, we had these subflows integrated directly within the main workflow (see screenshot below), but this practice has caused some issues with Geneva version.
Now with the script, we have this set-up:
This is the script currently:
var
gr = new GlideRecord('wf_workflow');
- gr.addQuery('name', 'SC Assign RITM to Appropriate SD');
- gr.query();
if
(gr.next()) {
var
wf = new Workflow();
var
workflowId = '' + gr.sys_id;
var
vars = {};
- wf.startFlow(workflowId,
current, current.operation, vars);
}
However, we can't seem to make it work despite tweaking the script above. Appreciate any expertise you can extend on this one, thanks!
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 01:16 PM
This worked for me:
var wf = new Workflow();
var workflowId= wf.getWorkflowFromName('SC Assign RITM to Appropriate SD');
if (workflowId) {
var vars = {};
var context = wf.startFlow(workflowId,current,"update",vars);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 01:17 PM
Thanks for clarifying!! Good to know.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 01:12 PM
Sorry replace wflw with wf. My bad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 01:16 PM
This worked for me:
var wf = new Workflow();
var workflowId= wf.getWorkflowFromName('SC Assign RITM to Appropriate SD');
if (workflowId) {
var vars = {};
var context = wf.startFlow(workflowId,current,"update",vars);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2016 03:30 PM
Hi Stacey,
It's now working! Thanks so much!!
Eliza