How do I get running workflow name in a run script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 06:03 AM
I need my current running workflow name to a variable. I have a Run Script inside my workflow where I need current workflow name in to a variable. tried using some of the current. method but giving undefined values. Sys Id would be help full for me here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 06:04 AM
Sys Id wont be help full for me here .. There is a typo in above quote
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2017 02:16 AM
I too have the same question. need to get the workflow associated with the current request item in the script and process it. Did you find the solution for it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2017 03:13 AM
Please use this script in the run script activity of the workflow.
var str = 'id=' + current.sys_id.toString();
var wf = new GlideRecord('wf_context');
wf.addEncodedQuery(str);
wf.query();
if(wf.next()){
gs.log(wf.workflow_version.getDisplayValue()); //This is the name of the workflow
gs.log(wf.sys_id); // This is the sys_id of the workflow context
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 12:11 PM
I would like to know the name of the subflow I am in, when I am in a run script or task activity.