Introduction

The CReW macros are a cool set of tools built by a third party that help your flows be production-ready. They were built originally by Adam Riley who as of 2021, is part of the Alteryx development team. He blogs on http://www.chaosreignswithin.com/As per the Alteryx support site, the CReW Runner macros (Runner, Conditional Runner and List Runner) are the only CReW macros supported by Alteryx, but Alteryx Designer ONLY. These macros are not supported when used on Alteryx Server, Alteryx Designer + Scheduler or AAH. 

Caveat: This blog is just for informative purposes. Please read the note on the support of CREW macros on https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/CReW-Macro-Support/ta-p/465740 before using them in production scenarios.

Runner Macros

There are a variety of CReW macros as part CReW macros package. Each tries to make some commonly required tasks easily such as macros to add a delay timer or helping run jobs sequentially. The runner CReW macros are quite an important part of one’s toolset to make your Alteryx flow production-ready. I will list 2 of the important ones here: Runner and conditional runner.

Runner

You can input the address of the Alteryx workflow that needs to be run and it is executed. On success, the ‘S’ input has the succeeded output. On failure, ‘F’ outputs the result of the workflow run i.e Result, Errors, Warning, Time taken, Log and module path. A detailed description is shown below.

The input to the runner is provided as below

The output from the flow is as below

Conditional Runner

If it receives a record then it will execute the workflow. The complete description is pasted below. Usually, it is used with the output of a runner or conditional runner so if the workflow is successfully run.

Use Case

I want Workflow 1 to execute. Only on the success of the workflow 2 needs to be executed. Similarly, Workflow3 needs to be run only when workflow 2 is run successfully. I have shown the example flow below

 

I would use Runner and conditional runner Crew Macro for this purpose. Do note the ‘S’ and ‘F’ success and failure outputs are not the output data of the individual workflows but these are information related to the running of the workflow i.e. whether it ran correctly or what was the time taken to run the workflow and log error.

Conclusion

I have listed 2 important macros that help you execute your flow and log output. I have also described a scenario where they can be used.

In case, your use case requires you to just execute a list of workflows in a sequence where the successful run of a workflow does not require another workflow to be run. Then you might need a list runner Crew Macro. More on that in my next blog!

 

`