Jump to content

Returning from external workflows?


Recommended Posts

Posted (edited)

Hi everyone.  I have several workflows that call others using the "call external trigger" feature.  This has worked well, allowing me to create islands of work that I can chain together for new efforts.  I am finding that there are few common tasks that I have to duplicate at the start of a few flows through (e.g. run app X, Y, & Z if not already started).  I'd like to centralize those tasks into one entity I can easily maintain, but I don't see a solution similar to "call external trigger" to accomplish this that will return to the calling flow.

 

For example, from this:

 

WorkFlow1: [hotkey A] -> [ensure app X & Y is running]->[check if app Z is busy] -> [do stuff]

WorkFlow2: [hotkey B] -> [ensure app X & Y is running]->[check if app Z is busy] -> [do different stuff]

 

To this:

 

WorkFlow1: [hotkey A] -> [run workflow3 and wait until it is finished] -> [do stuff]

WorkFlow2: [hotkey B] -> [run workflow3 and wait until it is finished] -> [do different stuff]

WorkFlow3: [ensure app X & Y is running]->[check if app Z is busy]

Edited by Sheldon
Posted

Workflow 3 should accept the name of an External Trigger to call when it's done. Workflows 1 & 2 should pass their respective trigger names to Workflow 3 when calling it.

Posted

Thank-you deanishe.  It's nice to know its possible.  Is there an example I could review to see how to pass the name of the external trigger to another workflow, and then call it when that workflow finished?

Posted

Not that I'm aware of, and it's too late for me to write a demo now. Not that I would do it that way, anyhow.

 

I suspect the approach most experienced developers would take would be to write the "check X, Y & Z" bit as a single script/workflow element, and then copy that between workflows.

 

A little copying is better than a little dependency, as they say in Go (the language, not the game).

 

"This workflow doesn't work without this other workflow (which does nothing useful on its own)" isn't an approach I've ever encountered.

 

There are workflows that (optionally) integrate with others, but all of them work independently, too.

Posted (edited)

Thanx again.  The above is an example to demo the need.  I have encapsulated everything I can into single entities that can be copied between workflows.  It's more like what you suggested, workflows integrating with others to create new flows or enhance existing ones without having to update every copy when tools or processes change.

Edited by Sheldon
spelling fixes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...