- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 06:44 AM
Hello All, I have a workflow called "Sample Workflow" in one custom scoped app. I am trying to start it in a UI action from another custom scoped app.
var wf = new Workflow();
var wfId = wf.getWorkflowFromName("Sample Workflow");
var vars = {};
vars.u_var1 = var1_value;
wf.startFlow(wfId, null, "Sample Workflow", vars);
When I click on the UI action, I am getting an error which says "Workflow undefined, maybe missing global qualifier"
Does anyone have any pointers on what is missing? how do I declare global qualifier?
Thanks in Advance
Prashant
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 06:46 AM
Hi Prashant,
Easy fix. Add global. in front of your Workflow instantiation.
var wf = new global.Workflow();
var wfId = wf.getWorkflowFromName("Sample Workflow");
var vars = {};
vars.u_var1 = var1_value;
wf.startFlow(wfId, null, "Sample Workflow", vars);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2018 07:08 AM
absolutely correct so it was UI action that did it
THANK YOU
I will buy you a beer at Knowledge 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2018 06:54 AM
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2018 07:44 AM
i would love to, but in this new community I cannot finde the "Correct response button"???
i can mark as Helpfull, but not "Correct" ?
br Erik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2018 03:05 PM
Hi Erik,
I fixed this by moving the UI Action 'Show Workflow' into the Global Scope.
Cheers,
Liz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2018 08:43 AM
Thanks Chuck,
This was very helpful. I am also adding the link below which I found very helpful.