- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 08:53 AM
How can I call a workflow inside a workflow?
E.g. I have a form and a field called Workflow which is a reference field to the wf_workflow table.
I have the main workflow and inside that one more workflow should be called by fetching the data from the field which I created.
I know how to fetch the workflow id from the reference field I created inside the main workflow but unable to find how can I trigger a workflow with workflow id?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 09:00 AM
use below code to trigger workflow from run script activity in your parent workflow.
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow sys_id_from your reference variable'), current, 'update');
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 09:18 AM
You need to use below:
var w = new Workflow();
var context = w.startFlow(sys_id, current, current.operation(), getVars());
Please mark my answer correct/helpful if it helped you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 12:10 PM
then, you can dot talk from your variable which is pointing to wf_workflow table which contains name of workflow.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 09:08 AM
Hi,
In that case make sure your workflow is checked out then you can drag the workflow & drop it in designer. Once done you can connect it after the activity you want it to be triggered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 09:10 AM
In that case workflow will be the same but I want to provide an option to choose workflow by the user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 07:44 AM
you can drag an workflow from one to another and connect it to previous activities? i was just told thats not an option?