Recently I have been working on a project which involved running a series of .bat files at particular points in an Alteryx workflow. To do this we were using two Run Command tools, one at the beginning and one at the end of the workflow. This process was to unlock and lock a database so that it could be edited within the workflow.
Randomly, after I bit of exploring around the Alteryx user interface, I came across the ‘Events’ tab available in the workflow configuration pane.
What the ‘Events’ pane allows us to do is three things.
- Run Commands, either ‘Before Run’, ‘After Run’, ‘After Run with Errors’ and ‘After Run without Errors’
- Send emails, either ‘Before Run’, ‘After Run’, ‘After Run with Errors’ and ‘After Run without Errors’
- Add assets
The ‘Add assets’ is what we are interested in here. Essentially this enables to package files that are not traditional workflow assets (by traditional workflow assets I mean assets that are required for the workflow to run, for example macros or static data-sets).
To me this is a great feature, we can include documentation documents or videos that enable are users to understand how and why they can use the macro.
The proccess of adding files is simple.
- Navigate to the ‘Events’ tab on the workflow configuration panel.
- Make sure the ‘Enable Events’ box is checked
- Go to ‘Add’
- Select ‘Run Command’
- Navigate to the ‘Assets(s)’ tab
- Select ‘Add File(s)’ and add your files.
- Navigate back to the ‘Event’ pane
- Press ‘Okay’
- Go to ‘Options’ and ‘Export Workflow’, you will now see that any additional files you included can be selected to package within your .yxwz (Alteryx zip) file.
Now as you distributed this around your company via the Alteryx server, when they download the workflow/macro/application, the documentation will be extracted with the other required assets.
Once they import the file, any attached files will now be placed in the directory as given by the user! Excellent!