Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Server Discussions

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

Run Work Flows from Third Party application

yolisvip
5 - Atom

Hello all

 

I appreciate your help on my requirement. :)

 

I am using Stone Branch as my consolidation tool to run all my process. Alteryx is really helpful on our daily support process as a reconciliation tool.

 

Is there any way i can run Alteryx WF from command line or webservices?

I can have an agent running on the server.

 

Let me know if you have any idea.  

3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

@yolisvip

 

You can absolutely run Alteryx from command line. Here's articles on how to perform command line execution of workflows or apps.

 

Workflows:

https://help.alteryx.com/10.1/index.htm#Command_Line.htm

 

Analytic App (with parameter input):

https://community.alteryx.com/t5/Advanced-Analytics/Alteryx-Workflow-execution-from-Command-Prompt-N...

yolisvip
5 - Atom

Thank you so much for your help, but i have another question :$ hope you can guide me :

More info..

 

We are looking a way to automate and integrate all our process using an application call Stone Branch.

 

Behind the scene it will have access into the server as a command shell.

Stone Branch has an agent installed on the server and using Python let us code as if we were using a command  prompt into the server

 

As a proof of contact our first step was trigger a simple workflow on a on the command prompt inside the server and it worked.

 

But the prerequisites is to have the workflow saved at the same path that the executable is, this is not right since the default path for Alteryx to save the workflows is: E:\ProgramData\Alteryx\Service\Staging\XProcessCache\ID\WorkFlow.yxmd

 

EXAMPLE - So at this point in order to trigger AudioFilesTransfer workflow we will need to write something like below on the command line:

E:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe E:\ProgramData\Alteryx\Service\Staging\XProcessCache\1B6C734A3B98E0DA\AudioFilesTransfer.yxmd

 

The tricky part here is to know the ID where the workflow can be find it.

folders.jpg

  

 

I really appreciate your help on this

CharlieS
17 - Castor
17 - Castor

It sounds like you need to be able to dynamically update the name of a .yxmd and the output path of that workflow with the ID value so everything is contained within the same folder. This could be achieved with some XML editing. 

 

Create a wizard (app) that inputs a template workflow as text (input the .yxmd, read as text using a \0 delimiter), then edit the XML of the workflow and make the ID updates you need. Then, use the Output tool to write the updated XML as a new filepath that also uses the ID value. A Block Until Done and Run Command tool at the end of this workflow could then run this new workflow.

 

Now your powershell will be running this new wizard with an argument that is the ID value that it will use to update the contents and name of the workflow before running it. The Alteryx Command Line documentation above includes a section on how to pass question values to the engine when running a wizard. 

 

Does that make sense?