06 Aug 2025
07:47 AM
- last edited on
06 Aug 2025
08:39 AM
by
AntonPineiro
Hi,
Is it possible to trigger a workflow only after the previous one has fully completed?
Right now, I’m facing an issue where a new run starts before the previous one finishes, causing it to reprocess the same data.
Julien
23 Sep 2025 02:58 PM
Hi, each task within a workflow waits for the previous one to finish before continuing to the next. What might be happening is that the workflow is skipping tasks when an error occurs.
To avoid this, you can choose one of the available options to ensure that a task only proceeds after the previous one has completed successfully.
Alternatively, you can configure settings such as increasing the wait time between tasks or enabling retries a certain number of times.
These options help guarantee that a task only executes once the preceding one has run as expected.
23 Sep 2025 03:24 PM
Hi,
Thanks for help.
My issue isn’t related to individual task execution — tasks are running as expected.
The problem lies in the workflow execution itself: if the workflow doesn’t complete within a given interval (e.g., 1 minute), a new instance starts while the previous one is still running, leading to overlapping executions and chaotic behavior.
How can I ensure that only one workflow instance runs at a time and prevent this kind of overlap?
23 Sep 2025 05:19 PM
Hi, what’s the event trigger for that workflow? You might need to define a more specific trigger to avoid overlapping with instances from other executions.
24 Sep 2025 09:07 AM
I tested using a scheduled event, but it turned out to be unreliable due to multiple parallel executions.
After that, I tried with an event trigger:
dt.automation_engine.workflow.id == "XXX" and
event.kind == "WORKFLOW_EVENT" and event.provider == "AUTOMATION_ENGINE" and event.type =="WORKFLOW_EXECUTION"
and dt.automation_engine.state.is_final == true
and dt.automation_engine.is_draft == false
What I was hoping for was to start the process manually once, and then let the loop continue running on its own. However, it doesn’t work that way. Is there some hidden limitation I’m missing?
24 Sep 2025 04:46 PM
I’d recommend triggering the process on demand using the API. This way, you can set a wait time limit for example, one minute or more to help ensure that overlapping executions don’t happen again.
https://docs.dynatrace.com/docs/shortlink/workflows-trigger#on-demand-trigger