Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

How to Use One Workflow to Execute Another Workflow

Alteryx Alumni (Retired)
Created on

A user might want to schedule a workflow to run each day at 7:30 AM; however, the workflow takes approximately 30 minutes to run, and the data may not always be available by 7:30. To avoid rescheduling the time-consuming workflow, it is more efficient to have a smaller workflow that checks the database to ensure the data is up to date, and then executes the main workflow when the given criteria have been met.


This can be accomplished with a Test tool from the Developer category, and a workflow event.

The following is an example of a simple logical test used to determine whether or not to kick off the main workflow. If the two input dates equal each other the test workflow will return an error.



By selecting the "Events" tab and Adding a Run Command the event can be configured to begin another process upon successful completion of this module. Configuration guidelines are:

Run Event When - Choose "After Run Without Errors"
Command - Select the AlteryxEngineCmd.exe which is usually located at "C:\Program Files\Alteryx\Engine\AlteryxEngineCmd.exe" depending on your installation

Command Arguments [Optional] - Navigate to the module you wish to schedule upon successful completion of this module. (NOTE: the filepath and module name must not have any spaces to work properly)





By scheduling the smaller test workflow at a certain time interval (e.g., every 10 minutes) for a given period of time each day of the week, the larger and more complex workflow will only execute upon the successful completion of the basic module, saving processing time and the need to re-run a complex module.


Where can I find a description of what the error codes mean?

I've been able to get mine running using this method, but always get: The external program "....AlteryxEngineCmd.exe" returned an error code: 1"

ACE Emeritus
ACE Emeritus

To find out the error code values you can go to the folder containing AlteryxEngineCmd.exe (mine is in "C:\Program Files\Alteryx\bin") in the command prompt and type "AlteryxEngineCmd" -- you get samples of how to use it and a description of the error codes, but here they are --


0 = Success

1 = Warnings Exist

2 = Errors Exist

There is another way that I have found and many others have found very helpful and easy.


Adam Rilely from Alteryx has built a few macros that allows you to run a module after a success of another one.


These are called Runners




You can create a workflow with that utilzes the runner to kick off the first module and then have a conditional runner to run if it's successful.


That way you don't need to worry about worry about the second module, you can then also have it run after a failure to have it rerun the module again until successful


Sample Workflow.png


I prefer to use this methodolgy since it puts the work back on the workflow and not behind the scenes so I can see which path the work went.


You can download these macros plus so many more on Adam Riley's sight




I hope this helps.



Levell x Dunn,


Could you be gentle enough to post an example of how to use the conditional runner macro (attached or in any way). I have tried using it with no success. It always throws out the output in the Failure section, even though I'm using the test tool inside the macro it runs and the test should yield a positive result.



Hi Ehatie,


As long as you're test module's work on their own then the conditional runner should be give you a positive.


Here is an example where I have 6 modules running back to back and if they error out then I have the sytem compile the error codes together via a table and then email me the results.


runner example.png


Can you share what error codes are you getting when it sends to the Failure section, that could help narrow down the scope and see what may be the root cause of the issue.




So more than an error code, what I keep struggling with is:

Given that to a conditional runner I input a given random set of data. This data will be taken and tested inside the workflow that the conditional runner uses. Now what I struggle to get is, why is it always sending the input data out through the failure output, if the workflow (that ends with a test tool) that is been run, works without issues and reports no failure on the test tool was given.

I have tried the conditional runner and it always fails on trying to run the 2nd item.  The error seems to be because it's repeating the path twice and cannot therefor find the workflow.

ACE Emeritus
ACE Emeritus
I use the runner very frequently on my local desktop. We recently upgraded our license to obtain server. When I try and upload the workflow with the runner's in it to my company's gallery, it doesn't work. I am not sure what I'm missing or if the runners cannot work here.
The runners use command line so you are not able to have spaces in the location path of the macro(.xymc) or the workflow(.yxmd) and also the names of the macro or workflow can not have spaces.
ACE Emeritus
ACE Emeritus
Thanks, I had forgotten that!

Is anyone using the conditional runner in a scheduler environment?  I am trying to use it and I can get the conditional runner to work if I don't UNC the module path (it doesn't have spaces).  However, if I UNC the path, it looks as though the conditional runner puts the shortcut path in front of my UNC. 



Filepath:   G:\my_directory\module.yxmd

UNC:   \\fs30\cust$\my_directory\module.yxmd


When I put the UNC path in my conditional runner, this is the error it gives me:


Error Opening file: G:\my_directory\Alteryx Version:¶Started running G:\my_directory\\fs30\cust$\my_directory\conditional_runner_test_module.yxmd¶Error - Alteryx Engine: Can't read the file "G:\my_directory\\fs30\cust$\conditional_runner_test_module.yxmd"¶Finished in 0.1 seconds with 1 error¶: The system cannot find the path specified. ¶ (3)



In order to schedule this, I have to UNC the paths.  Anyone have any ideas? 


@jm_idm Do you have the latest version of the CReW macros on the scheduler machine?  I think this was a bug that was fixed.


I'm not sure...I'll check with our tech guys.   Thanks!



I downloaded the version of the macros here: 


I put it in my module and it gives me the same errors.  

I have seen my coworkers have a similar issue where their mapped drive is used when entering file locations. I have not had a chance to look into their problem. Not sure if Alteryx is replacing or the user is selecting the location using their mapped drives. I make it a point not to map locations to ensure I always use the full path so all users are able to access the locations. Not everyone will have their "G:\" mapped to the same locations.

I put the full path in the process b/c the scheduler requires it.  However, it seems that the macro is adding the G:\ mapping back to the front of my path.  I even copied the full UNC path and put it into the Macro so I never mapped it as 'G:\...' and still have the issue.  

My scheduler setup is running workflows locally and not from location. When ever I make a change to the workflows I need to update the workflow locally on scheduler. In order to update in the View Schedules window on the Workflow tab you would select the workflow and click the Update App, Workflow, or Package and navigate to the recently updated workflow.

@jm_idm Does the Run As user have access to that network drive?

Looking back at your error I am also seeing a possible copy/paste issue. You error says "Started running G:\my_directory\\fs30\cust$\my_directory\conditional_runner_test_module.yxmd". Looking at the File path and UNC information you gave looks like you pasted what you want running \\fs30\cust$\my_directory\conditional_runner_test_module.yxmd in front of the G:\my_directory you had before. Also, ensure if you are running locally, update your scheduled job as I had explained in my previous post.

I would also suggest testing that the server can access that location.

I would try using the UNC path and attempt to open the workflow. If that works it may be the version of runner tools you have or as @SFreiter mentioned the loaded schedule job isn't being updated.


I know for us we have been successfully in using the UNC with the crew tools on the server


Using UNC FQDN in Runner tools.jpg