How to call a sub-workflow from within a workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 07:59 AM
Hi: I'm creating a service catalog to assign assignment groups to a user. I want to have the main workflow call a sub-workflow that will update the user record with one assignment group each time. So the main workflow will have the user record and all assignment groups and will pass the user with only one assignment group to the sub-workflow. Can this be done?
Appreciate your advice! Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 03:00 AM
Hi Julian,
For service catalog i used it for Fuji, For Geneva and Helsinki also the same process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 12:41 AM
Hi Audi,
If you want to pass any values to sub flow (using input variables only it possible), to get input variables in the actions you need to change the value of glide.workflow.enable_input_variable property to true.
Then using scratch pad you can pass the values to created inputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 06:00 AM
Thank you all for your help! I'm still in the planning stage for this. Won't have time to dive in for a while. Will follow up on this chain if more questions arise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2016 05:46 PM
Hi guys:
I went ahead and created the master workflow and subworkflow. It seemed to work overall, but I am having an issue with the subworkflow 'Approval User' script. If I request 2 or more assignment groups, it seems to only request the approval for just one of the assignment groups. The others are skipped according to the 'Result' of the workflow. Here is the Approval User script:
answer = [];
var grp = new GlideRecord ('sys_user_group');
grp.addQuery('name', workflow.scratchpad.agi.trim());
grp.query();
if(grp.next()) {
answer.push(grp.manager);
gs.log("ansMgr:" + answer.toString());
}
gs.log is printing the sys_id of the manager of each group correctly. Any idea why only one of the assignment groups is going through the approval process?
Thanks for your help! Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2018 12:49 AM
Hi Midhun & Chuck,
This is a old post but im still unsure how exactly can we pass the input values to another workflow. The information available on the docs is not well explained. What im looking for is the steps to pass (or declare) and retrieve values from one workflow to another (possibly using subworkflows).