18 May 2023 08:23 AM - edited 20 Jul 2023 12:46 PM
Can I call another existing workflow from within my new workflow?
Solved! Go to Solution.
18 May 2023 08:31 AM
Yes, triggering a workflow from within a workflow is possible, currently via the automation SDKs and APIs.
On the roadmap is the concept of sub-workflows which can be added as tasks.
27 Oct 2023 09:23 PM
HI.
Can you give an example of how a workflow could trigger another workflow?
Does some task workflow somehow call another one?
Thank you
29 Oct 2023 10:23 AM
Hi
Yes, currently you can use a workflow task like "HTTP request" (calling the workflow API) or "Run Javascript" (adding the Automation SDK).
On the roadmap we have the concept of subworkflows as well. We'll keep you posted.
17 Sep 2024 01:10 AM
Hi Steven,
I belive your looking for the following documentation to run via Javascript (https://developer.dynatrace.com/develop/sdks/client-automation/#runworkflow) and example of how to use this function would be:
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.runWorkflow({
id: "...",
body: {},
});
where id is the UUID of the workflow you want to run