Automic Workload Automation

 View Only

 External Dependency - Wait if Currently Running?

MatthewA's profile image
MatthewA posted Mar 19, 2025 09:27 AM

We have a workflow with an external dependency.  This external dependency runs every couple of hours.  We are using the "after the last workflow execution end" option.  Is there a way to tell the workflow to wait if the external dependency is currently in a running state?  We don't want these two processes to conflict with each other.  We also don't want to use the "after this workflow start" option because we don't want to hold up the workflow in case the other team has to pause their external dependency process for a period of time.  Is there a best practice for this?  Thanks.

Joel Wiesmann's profile image
Joel Wiesmann

Hi Matthew

You can use a SYNC object to prevent two objects with different names to run at the same. The logic can be built in a way, that one object would wait for the other to end.

https://docs.automic.com/documentation/webhelp/english/AA/24.4/DOCU/24.4/Automic%20Automation%20Guides/Content/AWA/Objects/obj_Sync.htm

Regards
Joel

MatthewA's profile image
MatthewA

Hi Joel, thank you for responding.  For the sync object option, I'm assuming that the other team would have to modify their external dependency to use that sync object?  Can you think of another way to achieve this without having to go that route?  Is it possible to use a Precondition in the workflow perhaps that would check the running state of the external dependency process?

Joel Wiesmann's profile image
Joel Wiesmann

Hi Matthew

You don't use external dependencies anymore in sync - scenarios.

  • Use external dependencies, if your solution depends on another solution. 
    Example: Workflow 1 creates a file, workflow 2 must process the file. There is a clear order.

  • Use sync objects, if your object must not run at the same time like another object.
    Example: Workflow 1 and workflow 2 manipulate data. The order of their execution does not matter but they must not run at the same time, as this could cause data corruption or performance issues.

The use of sync objects requires that the objects involved are changed so that they change/read the state of the sync object.

If you were to implement precondition checks, you would have to implement them in both workflows. Workflow 1 would have to check whether workflow 2 is running and vice versa. You would then also have to implement recurring precondition checks, which I personally do not recommend (I can elaborate further on this if you want). There are also other options that involve AE scripts or similar. In *my opinion*, however, these are not best practices.