Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

Location of macros on server

Highlighted
7 - Meteor

I use macros extensively in my workflows.

 

Suppose I have a macro which is used in three different workflows, all of which have been loaded to the server.

 

If I make a change to the macro, is it then necessary to reload all three workflows to the server?

 

Is there any way to track which workflows a specific macro is used in?

Highlighted
Alteryx
Alteryx

Hi @nhunter

 

This would depend on how the macro is referenced within the workflow. 

 

If it has been packaged up with the workflow, change to the macro itself will not be reflected in the workflows already uploaded on the server. 

If it's referenced as a dependency and located where the server can see it then it would.

 

From my experience, the best practice is to create a shared directory with all the macros you'd like to leverage in scheduled workflows or analytical apps on the server. Map this location in your Designer (Options > User Settings > Edit User Settings > Macros tab) and on the Server and make sure you use UNC path when referencing the workflow dependencies (Options > Advanced Options > Workflow Dependencies). This way you will be able to resolve the macro both locally and when run on the server and changes to it will be reflected in all workflows using it.

 

There's no easy way to see which workflows use a particular macro but because an Alteryx workflow is an xml file under the bonnet you can read it in as a data source into Alteryx, parse it out and check whether it uses a specific component/tool.

 

I hope that makes sense.

 

Michal

Highlighted
7 - Meteor

Thanks, Michal, that makes sense.

 

I just need to find out if I have the correct permissions to create a folder on the server.

Highlighted
7 - Meteor

Hi Michal,

 

We have 2 servers (one dev and one prod).

 

On the dev server we have a shared location for all our macros.  We also have a shared location on the Production server for macros.

 

When we develop a workflow (an app) we use the macros from the shared location on the DEV server.  When we finished testing the workflow and want to deploy it to the PROD server we currently have to go into the workflow and point it to the PROD server location for the macro.

 

This kind of defeats the deploy as tested moto.

 

Is there a way we can easily change the workflows so they point to the PROD macro location instead of the DEV macro location when deploying to our PROD server?

 

I've tried using ENV variables but they don't work when the workflow is run as an appplication.