Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
Andy Uttley, Alteryx ACE, makes music with Alteryx | Math + Music

Enable workflow inside a container based on condition

Highlighted
7 - Meteor

Hello Everyone. Any help in this would be greatly appreciated. 

 

I am new to working with macros so still wrapping my head around it and getting confused in the process. 

 

I have folder on my drive to which a file is dumped every day. that file simply states that the database has been updated and it is safe to run any workflows needed. 

 

So in short, I want to run all my workflows based on the condition that I have a file dumped into the folder on present day. Since there is no specific time for this file to be placed into the folder, I also want a second condition stating that if a file is not detected, DONOT run any workflow and instead go back after x minutes and look for the file again -and repeat this process until a file which is equal to today's date is located.

 

I want to place this condition in every single workflow that I have. so that each workflow runs according to its time scheduled in the designer, but the first aspect of every workflow would be to look at the file in the directory before it is run. 

 

I have attached an image with some comments as to what I am doing but it does not work. Especially where I have the Action button set to enable container when true and disable when False. This is my first time attempting at something like this, so i am sure there is an easier way. 

 

I know the first part can be converted into a macro, and I would like help with achieving it.

I do not want the container to be inside the macro itself, as the container indicates one of the many workflows I have that should run on their individual schedule, but based on the above mentioned criteria. 

 

since the data is confidential i cannot upload the workflow, but it would help if I could get a similar workflow to help me work this out.

 

 

THANK YOU to anyone who can help, this would be a huge deal for me. 

 

Highlighted
16 - Nebula

I think the problem is with your use of the Control Parameter tool. 

 

As soon as you add a control parameter tool to a workflow, it automatically turns your entire workflow into  batch macro.

 

In my experience, a control parameter tool is always followed by an action tool and you use it to update a value or action inside a tool to change the way it behaves. For instance, you can change the field a filter tool filters on or the file an input data tool loads, etc.

 

I'm attaching a very simple example of how the condition tool can be used to enable or disable a container (you have to run it as an app)

 

So the key to solving your problem is what you'll be using to feed the condition tool.

 

DavidP_0-1590269927694.png

 

Highlighted
7 - Meteor

Thanks for the response - i cannot open the alteryx because I am on a different version (Previous one). any way you could attach something compatible for me to open?

Appreciate it

Highlighted
16 - Nebula

If you open the file in a text editor like notepad, you'll see the Alteryx version in the 1st line. Change this to your version and you should be able to open the file.

 

If you still have problems, let me know which version you're on and I'll change it my end.