[en] Run Workflows via Command Line
[en] You can run workflows via the command line with AlteryxEngineCmd.exe
, located in the Alteryx program files root directory. You must have an Engine API license to use AlteryxEngineCmd.exe
.
[en] Example
[en] Run the analytic app contained in the Workflow > Path tag of AppValues.xml.
[en] AlteryxEngineCmd.exe MyWorkflow.yxmd
[en] AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml
[en] AlteryxEngineCmd.exe AppValues.xml
[en] Example return values:
[en] 0: Success
[en] 1: Warnings Exist
[en] 2: Errors Exist
[en] To run workflows via the command line, add the Alteryx root path to your Path System Variables on your computer.
[en] Access to your system variables varies between operating systems. This is the general process:
[en] On your desktop, access your computer's system security options.
[en] Access the Advanced Options.
[en] Access the environmental variables.
[en] Access the path variable.
[en] To edit the variable, enter or paste the Alteryx path. The default path is
C:\Program Files\Alteryx\bin
.
[en] Use this method, unless you run the AlteryxEngineCmd.exe from within the Alteryx root folder, or use the entire path to the executable:
[en] "C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" MyWorkflow.yxmd
[en] Engine Options
[en] AlteryxEngineCmd.exe is a published command-line interface. You can invoke it to run a workflow or analytic application.
[en] If a workflow was saved without AMP Engine enabled, there is an /amp
option that allows you to run a workflow or analytic application using AMP Engine on the Windows platform. The /amp
option has the same effect as the Use AMP Engine check box in the Designer interface Workflow Configuration Runtime tab.
[en] If you don't specify the engine, the version of the engine that was set when the workflow was saved is used.
[en] Functions
[en] Workflows
[en] AlteryxEngineCmd.exe MyWorkflow.yxmd
[en] This function runs a standard Alteryx workflow (.yxmd) at the command line. It's useful for a series of workflows as a batch that needs to be run in sequence.
[en] Example
[en] AlteryxEngineCmd.exe MyWorkflow1.yxmd
[en] AlteryxEngineCmd.exe MyWorkflow2.yxmd
[en] AlteryxEngineCmd.exe MyWorkflow3.yxmd
[en] Analytic Apps
[en] AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml
[en] This function runs an analytic app (.yxwz) and uses the parameters in the AppValues.xml
to dynamically configure the analytic app.
[en] The easiest way to build the AppValues.xml
file is to build an analytic app in the Alteryx interface. After you build the app, open Interface Designer > Test View > View. Paste the XML into a text editor and save the file as an XML file.
[en] Example
[en] "<WizardValues ShowDebugMessages='False'> <Value name='FILEINPUT'>TEST.CSV</Value> </WizardValues>"
[en] AlteryxEngineCmd.exe AppValues.xml
[en] This function is identical to the option above except instead of the YXWZ and the XML parameters, it uses the XML parameter and embeds the YXWZ reference in the XML.
[en] Example
[en] "<WizardValues ShowDebugMessages='False'> <Module>MyAnalyticApp.yxwz</Module> <Value name='FILEINPUT'>TEST.CSV</Value> </WizardValues>"
[en] AlteryxEngineCmd.exe "<<raw xml data stream with no quotation marks or line feeds>>"
[en] This function includes the answers to questions in an analytic app. The XML in an analytic app contains answers to app questions.
[en] Example
[en] AlteryxEngineCmd.exe "<WizardValues ShowDebugMessages='False'><Module>MyAnalyticApp.yxwz</Module><Value name='FILEINPUT'>TEST.CSV</Value></WizardValues>"