At the previous post, I explained how to create a workflow that runs at a specific time range with AMP ON. At this post, I would like to explain the AMP OFF version.
Basic Concepts(Review)
Basically, you can use the Date Time Now tool.

You can get the date and time when the workflow runs by this tool. And also you can compare it and available time slots list, and then the Designer decide continuing to run the workflow. However, the method for stopping the workflow varies depending on whether you use AMP engine or E1 engine, prevent input, or prevent output. In this post, I explain about AMP OFF version.
Cheking the available time slots
Checking the available time slots are the same as the previous post(AMP ON).

Please check the previous post if you want to know the detail.
それでは今回の主題に移ります。
for the AMP Engine OFF
How do you create the workflow that controls the order of the tools with AMP OFF? When you use the Original Alteryx Engine(E1 Engine), you have to use the trick to manage the order of the tool running. And you have to do the different approach for input and output.
for Output
When you want not to output the data in a specific time slots, on the other words, want to limit to write the database, you have create the workflow as follows.

And also, you have to enable the option “Cancel Running Workflow on Error” at the Workflow Configuration’s Runtime panel.

As the other important point, you have to connect the Message tool’s output to the Append Fields tool.

This connection makes you to manage the tool running order. In other words, after the “Check the Available time slots” container completes, the result is added to the data which is before the Data Output tool. In other words The Output Data tools doesn’t start until this Append Fields tool is completed. The tools that doesn’t send the data until the execution is completed like an Append Fields tool is called “Blocking tool”.
So, if the error occurs on the Messege tool at the above workflow, the workflow run would be cancelled and stop the executing. In the other words, the Output Data tool would not output the data.
Note that logically speaking, when you disable the option “Cancel Running Workflow on Error”, the data should be stopped at the Message tool with the option “Error – And Stop Passing Records Through This tool”. But at the current Designer, the data go through the Message tool so far and create the file that have only header or write the database by the Output Data tool.

And the tools that is before the Field Appends tool might be started before the Red Box part is completed. So, if you manage the input of the data, you have to take other way.
for Input
Control the input part, you have to go to the Batch macro route. For example, you can create the very simple batch macro as follows for this case.

You create a batch macro and copy the workflow that you want to run. The Control Parameters tools is dummy, so you don’t have to connect anything. Basically, when the Control Parameter tool have zero record, the Batch macro never run. If you want to create an exact workflow, you put into the workflow to container, connect the Control Parameter tool to the Container. And set the Action tool to disable the Container if the count from the Control Parameter tool is zero.
The workflow which call this macro is as follows.

This method is worked well for the AMP Engine ON, too. When you use the AMP Engine and you can’t use the Control Container, this method would be worked. And in this method, the Contorol parameter manage that the macro work or not, so you can disable the option “Cancel Running Workflow on Error”.
Conclusion
- I have explained how to create a workflow that runs at a specific time range when the AMP OFF.
- The Batch macro way is useful for the Designer 2020.2 to 2022.3 with AMP Engine ON which doesn’t have the Control Container tool.
Sample workflow download
The next blog post is…
The next post would be about how to control the execution order of multiple workflows.
コメント