Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Chained Workflows

elaenscetric
7 - Meteor

Hi All - We're having 3 workflows and scheduled like 1st workflow was triggered at particular time in Gallery and it will trigger 2nd workflow via Alteryx Service command line event. Except first workflow the other 2 workflows will run as Ondisk jobs but recently We're facing many issue with this approach. Is there anyway to schedule all 3 workflows in Gallery in chained manner like once first completed successfully 2nd workflow should run & once 2nd workflow completed successfully 3rd workflow should run.

7 REPLIES 7
fmvizcaino
17 - Castor
17 - Castor
In this Data in the Wild episode, you'll learn how to use chained apps Alteryx Designer when developing analytics applications. We'll teach you how to transform your manual processes into a more automated and sophisticated workflow. If you have any questions or suggestions for a future video ...
elaenscetric
7 - Meteor

We don't need app. Need to know alternate approach for workflows.

ArtApa
Alteryx
Alteryx

Hi @elaenscetric - There are a couple of ideas that you may try:

 

 - New Runner tool: https://help.alteryx.com/20214/designer/runner-tool

or 

- Alteryx Server APIs: https://help.alteryx.com/developer-help/server-api-overview

 

elaenscetric
7 - Meteor

@ArtApa Do you have any reference solution to call Alteryx server API in automated way. Like one workflow completed successfully , then it should trigger another workflow.

dougperez
12 - Quasar

Hello @elaenscetric 

I have done a few api server integrations, see this code from some of my tests:

from alteryx_gallery_api_v3_compatible import *
import pandas as pd
from pandas import DataFrame
import requests

client_key = ""
client_secret = ""
workflowname = ''

gallery_url = '/gallery/api/v1'

con = Gallery(gallery_url, client_key, client_secret)
subs = con.subscription()
subs2 = subs[1]
df = DataFrame(subs2)
df = df.loc[df['fileName'] == workflowname]
df = df['id'].to_string(header=False, index=False)
execwork = con.execute_workflow(df)
print(execwork)

fmvizcaino
17 - Castor
17 - Castor

Hey @elaenscetric ,

 

You cannot use the server APIs to run workflows, only analytical apps. You will need to transform all of your workflows to analytical apps, then you will be able to run them.

@patrick_digan has developed a macro that can help you do this task. 

https://community.alteryx.com/t5/Engine-Works/Using-the-Alteryx-API-from-Alteryx/ba-p/318565

 

Best,

Fernando Vizcaino

davidhe
Alteryx Alumni (Retired)

@ArtApa so the runner tool appears to only provide the status of the workflow upon completion, how does it trigger a subsequent workflow?