Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!

'Tis the season to be spooky! Read our new blog, How Spooky is Your City? Mapping and Predicting Scary Stuff. In it, @SusanCS provides a fun glimpse into using data to figure out the creepy quotient of where you live! And don't forget to check out our Digital Costume Thread to get yourself in the mood for a candy binge!

SOLVED

Run chained workflows using API

Highlighted
6 - Meteoroid

Hi,

I looked across the community but didn't find any answer to this question :


How can I run a chained workflow from first to last step using the API ?

 

When I get the workflow information I get :

{
    ...
    isChained: true,
    ...
}

 

Then, I can run the first step using POST on /v1/workflows/{appId}/jobs/ and obtain a job with its id and outputs.

But now I'm stuck, how can I run the next step ?

 

Please let me know if there is any missing information.

 

Regards.

Highlighted

Hi @NPatryC4 

 

Thank you for your query. 

 

Have you reviewed the following article that highlights the different options for chaining workflows together ? 

 

https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Chaining-Workflows-Together/ta-p/3857...

 

There are different options depending on whether you will only use  Alteryx Designer or if you will use Designer with Scheduler. 

 

Thanks, 

Conor 

Highlighted
6 - Meteoroid

Hi Conor,

Yeah, I saw this post, and we have some chained workflows using the last presented technique, using the Interface tool. They run fine when we run them through our gallery. 

 

My question was more technical, I want to run those workflows using the API. At the moment I just managed to run the very first part of those workflows ; "simple" (not chained) workflows run fine too.

 

Thanks.

Highlighted

Hi @NPatryC4 

 

Thanks for providing more clarity. 

 

Can you email support@alteryx.com where a Customer Support case will be opened for this query. 

 

Can you also please attach the chained workflows to your email and a CSE will be able to advise further ?

 

Thanks, 

Conor

Highlighted
6 - Meteoroid

If anyone comes here for the same issue, I contacted the support and there is currently no plan on implementing this, and no workaround except manually chaining workflows together (ie. create n workflows instead of 1 workflow containing n steps).

 

I created an Idea post here.

Highlighted
9 - Comet

 have developed a GalleryRunner macro which will run as chained apps . If interested let me know . 

Highlighted
6 - Meteoroid

Hi ,

Can you share it here ?

I am very interested.

Thanks.

Highlighted
9 - Comet

Yes I will tomorrow.

Highlighted
9 - Comet
Highlighted
8 - Asteroid

Hi :

 

If I am understanding correctly, your use case may be very similar to mine. I wanted to run a workflow through the API and determine if it completed successfully before running he next workflow. I was able to accomplish this by building two macros (okay, two macros that rely on other macros).

  • Run App Macro: this macro accepts the required inputs to submit the POST request to the API. It parses the response and returns the newly created job id.

  • Get Gallery Job Status: this macro accepts the job id as an input and will optionally iterate until the job is Completed, or just return the status.

Using these in tandem enabled me to do what you described without the need for chaining apps.