Run Workflows By Command Line

You can run workflows via command line using AlteryxEngineCmd.exe, which is located in the Alteryx program files root directory. You must have an Engine API license to use AlteryxEngineCmd.exe.

Example

Run the analytic app contained in the Workflow > Path tag of AppValues.xml.

AlteryxEngineCmd.exe MyWorkflow.yxmd

AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml

AlteryxEngineCmd.exe AppValues.xml

Example return values:

  • 0: Success
  • 1: Warnings Exist
  • 2: Errors Exist

To run workflows via the command line, add the Alteryx root path to your Path System Variables on your computer.

Accessing your system variables will vary between operating systems. This is the general process:

  1. On your desktop, access your computer's system security options.
  2. Access the Advanced options.
  3. Access the environmental variables.
  4. Access the path variable.
  5. Edit the variable by typing or pasting the Alteryx path. The default path is C:\Program Files\Alteryx\bin.

Use this method, unless you are running the AlteryxEngineCmd.exe from within the Alteryx root folder, or are using the entire path to the executable:

"C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" MyWorkflow.yxmd

Engine Options

AlteryxEngineCmd is a published command line interface. It can be invoked to run a workflow or analytic application.

If a workflow was saved without AMP Engine enabled, there is /amp option which allows you to run a workflow or analytic application using AMP Engine in Windows platform. The /amp option has the same effect as the “Use AMP Engine” checkbox in the Designer interface Runtime tab.

If the engine is not specified, the version of the engine that was set when the workflow was saved will be used.

Functions

Workflows

AlteryxEngineCmd.exe MyWorkflow.yxmd

This function runs a standard Alteryx workflow (.yxmd) at command line. It is useful for a series of workflows as a batch that needs to be run in sequence.

Example

AlteryxEngineCmd.exe MyWorkflow1.yxmd

AlteryxEngineCmd.exe MyWorkflow2.yxmd

AlteryxEngineCmd.exe MyWorkflow3.yxmd

Analytic Apps

AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml

This function runs an analytic app (.yxwz) and uses the parameters in the AppValues.xml to dynamically configure the analytic app.

The easiest way to build the AppValues.xml file is to build a an analytic app in the Alteryx interface. After building the app, open the Interface Designer >Test View > View. Copy and paste the XML into a text editor and save the file as a .xml file.

Example

"<WizardValues ShowDebugMessages='False'> <Value name='FILEINPUT'>TEST.CSV</Value> </WizardValues>"

AlteryxEngineCmd.exe AppValues.xml

This function is identical to the option above except instead of having the .yxwz and the XML parameters, it uses the XML parameter and embeds the .yxwz reference in the XML.

Example

"<WizardValues ShowDebugMessages='False'>
<Module>MyAnalyticApp.yxwz</Module>
<Value name='FILEINPUT'>TEST.CSV</Value>
</WizardValues>"

AlteryxEngineCmd.exe "<<raw xml data stream with no quotation marks or line feeds>>"

This function includes the answers to questions in an analytic app. The XML in an analytic app contains answers to app questions.

Example

AlteryxEngineCmd.exe "<WizardValues ShowDebugMessages='False'><Module>MyAnalyticApp.yxwz</Module><Value name='FILEINPUT'>TEST.CSV</Value></WizardValues>"