17 Jul 2024 03:58 PM
Hello "workflow friends",
Can you select to run a task based on the trigger e.g. "Manual trigger or Event trigger".
Or can I select this within the js?
KR Henk
Solved! Go to Solution.
18 Jul 2024 12:07 AM
Hello,
If you want to know what type of trigger the workflow is using, it is shown in the label on the first tile.
If you set an event trigger, you still have the option to manually trigger an execution by hitting "Run" at the top.
Thanks
18 Jul 2024 08:06 AM
Hello Cameron-Leong,
Thanks for your reply!
But what I like to know if the same information is available from within the workflow e.g.
If you have a manual trigger, can you skip a task based on this info,
Thanks Henk
18 Jul 2024 03:10 PM
The team provided a solution via a JS task that looks promising to me:
import { executionsClient } from "@dynatrace-sdk/client-automation"; export default async function ({ execution_id }) { const executionInfo = await executionsClient.getExecution({ id: execution_id, }) return { triggerType: executionInfo.triggerType }; }
triggerType
with a value like Manual
.If you like to do it with the automation-utils, you could also writeimport { execution } from '@dynatrace-sdk/automation-utils'; export default async function ({ execution_id }) { const ex = await execution(execution_id); return { triggerType: ex.triggerType }; }
18 Jul 2024 03:15 PM
Wolfgang.
Yes this will help (-; Thanks to you and the team,
KR Henk