Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Action tool not working when running on schedule

jeffleedaimler
6 - Meteoroid

I have a workflow that outputs a monthly file that's overwritten every month and then a daily file that gets saved with a new name each day. I'm controlling the output using 'Action' tools to update the value of the 'Disable' option of the container it's in depending on a formula using

'DateTimeToday()'. This way, the workflow should read the date of when the workflow is executed and control the containers and the output accordingly. There is no separate user input required.

 

I have this saved as an 'Analytic App' (.yxwz file). All of the container controls using the Action tools work correctly when I click the 'Run as Analytics App' button. When I upload to our company gallery and then manually run the published version, it also works correctly. However, the problem is when I have the same workflow scheduled. The scheduled run seems to ignore all of the Action tools and keeps all containers active. This causes an error because the multiple branches output to the same filename and the Action tools are supposed to control which containers are enabled/disabled. Why is there a difference in Action tool function compared to when I run the workflow manually?

 

Here's a screenshot of my workflow layout:

jeffleedaimler_0-1675187120135.png

 

Here's a screenshot to show the difference in execution details between the scheduled run and the manual run for the exact same published workflow:

jeffleedaimler_1-1675187358160.png

 

I need the monthly file to overwrite the existing file in a shared network folder and it needs to be run on the first weekday of every month.  That kind of custom schedule doesn't appear to be available so that's why I'm trying to control output using the Action tool formula. The daily files are output to keep as logs with the filenames adjusted to include the run date. Please also share if you know a different way of going about this. Thanks.

 

11 REPLIES 11
apathetichell
18 - Pollux

Hi - can you a) share screenshots of your action tools b) confirm that the timezone your server is running the workflow in is the time zone you'd expect it to run in...

 

So my hunch is that the scheduled workflow isn't behaving differently then when run as an app - but the behavior is different because something in the input is different - ie something is off in your action tools or on the workflow timing which you are not triggering when you run manually but the scheduled version is triggering.

jeffleedaimler
6 - Meteoroid

Here is the screenshot of the Action tool configuration.

 

One is to detect if the current date is in January:

jeffleedaimler_0-1675188998972.png

 

 

 

And another is to detect if the current date is the first weekday of month:

 

jeffleedaimler_1-1675189035941.png

 

And yes, all time zone settings are set for Pacific.

apathetichell
18 - Pollux

My suggestion would be to reset (delete/replace) action tool 9. Notice how you have multiple values for "disabled" in the action tool - this happens sometimes but basically there's some junk in the connection between the action tool and the container so you have multiple values being fed in for enable/disable. you only want one value fed in here.

 

So according to my hypothesis 9 is broken and set to always run -64  should be working. Check out the logs to see if that has any connection to reality.

 

 

jeffleedaimler
6 - Meteoroid

I deleted 9 and added a new 'Action' tool as -67 but still have the same issue:

jeffleedaimler_1-1675192462124.png

 

Manual runs still perform correctly while scheduled runs are ignoring all the action tool formulas.

apathetichell
18 - Pollux

your formula should create a false there - no? False means your container isn't disabled which means it will run. True would disable your container.

jeffleedaimler
6 - Meteoroid

Yea. This is one container that should run. I have another container that has the opposite logic. The problem is that both of the containers are enabled on scheduled runs while only one is correctly enabled on manual runs with the same workflow.

apathetichell
18 - Pollux

There is a second series of containers? Is there another container which is disabled? Is there an action tool for it? You can't really troubleshoot this piecemeal like this. Post all of the action tools and if the containers are enabled/disabled. This is a bit frustrating.

 

jeffleedaimler
6 - Meteoroid

I'm attaching an example of my workflow. There are a total of 4 Action tools.

ID 16 enables Container 14 if run in January and disables for rest of the year.

ID 17 enables Container 13 if run on the first weekday of each month and disables for rest of the days.

ID 27 disables Container 26 if run in January and enables for rest of the year.

ID 28 enables Container 25 if run on the first weekday of each month and disables for rest of the days.

 

You'll need to adjust the 'Filename' formula in ID 3 to match a folder destination in your computer. All output files should point to the same folder.

apathetichell
18 - Pollux

O.k. - not seeing the same issues on the action tool you had with multiple disabled values. If you can double check that on your end that would be awesome.

 

If you don't see anything there my next suggestion to troubleshoot would be to move the action tools to text input tools in an outer app - turn your main workflow into an inner app - and add control parameters to map the outer app to the inner app. This would reposition your formulas from an action tool to formula tools in your outer app. Shouldn't make a difference but it would give you more visibility into what's being passed in. If you needed to - you can dump the what you are putting into the batch macro into a .csv file and pick it up later to review....

 

here's an example of the outer/inner strategy.

 

My first hunch is still more disableds in an action tool though.

Labels