Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 65

Controlling Tool Container Execution

Recommended resources

Introduction

Welcome to your next lesson on workflow optimization and management. In our previous session, you learned how to use the Cache and Run Workflow feature. This is a powerful technique for optimizing your development speed by saving the state of your data at a specific point, allowing you to iterate on downstream tools without re-running time-consuming upstream processes.

Today, we'll explore another essential technique for managing complex workflows. Instead of controlling the flow of data with caching, you'll learn how to control the flow of execution by managing which tools run. Specifically, this lesson will teach you how to disable tool containers to manage the execution of complex workflows.

Mastering this skill will give you a new level of control, enabling you to test different analytical paths, isolate sections for debugging, and make your development process even more efficient.


1. The Tool Container: More Than Just Organization

At its core, the Tool Container is used to group tools together on the canvas. This is invaluable for organizing large, complex workflows into logical sections, much like creating functions or modules in a programming script. You can collapse containers to save canvas space, color-code them, and give them descriptive captions.

However, the Tool Container's most powerful feature for workflow management is its ability to be disabled.

When you disable a Tool Container, you instruct Alteryx to completely ignore it and every tool inside it during a workflow run. The tools will not be initiated, no data will be processed, and no records will pass through. This provides a simple yet highly effective way to control execution.

Let's look at the official documentation to see how this works.

Tool Container Tool - Alteryx Help

The Alteryx Help page for the Tool Container Tool provides a concise explanation of its features. We'll focus on the sections that cover disabling and enabling the container.

Please read the introduction, followed by the 'Disable a Container' and 'Enable Container' sections. Notice the two distinct methods for toggling the container's state: using the configuration window and using the switch on the container itself.

As you've just read, you have two simple ways to disable a container:

  1. Check the Disabled box in the tool's Configuration window.
  2. Click the toggle switch at the top left of the container on the canvas.

When disabled, the container and its contents will appear dimmed, giving you a clear visual cue that this section of the workflow is inactive.


2. Disabling Containers vs. Caching

You might be thinking, "This sounds similar to caching. When should I use one over the other?" This is an excellent question, and understanding the difference is key to becoming an efficient Alteryx developer.

Feature Best For How it Works Use Case Example
Caching Speeding up development on downstream tools. Saves a snapshot of the data at a specific point. Upstream tools don't re-run, but their output data is fed into the next active tool. Your workflow's first half involves a 20-minute data download and preparation. You cache the data after this process to rapidly test different configurations of your reporting tools.
Disabling a Container Controlling execution paths and isolating processes. Prevents a group of tools from running entirely. No data is processed, and no records pass through the container. Your workflow has two different methodologies for calculating a forecast. You place each methodology in a separate container and disable one while you test and validate the other.

In short:

  • Use caching when you want to skip running slow upstream tools but still use their output.
  • Use a disabled container when you want to prevent a section of the workflow from running at all.

3. The Control Container: A Tool for Sequencing

While the standard Tool Container is excellent for manual control during development, Alteryx provides a more advanced option in the Developer tool palette for managing execution order: the Control Container.

The primary purpose of the Control Container is to enforce a specific sequence of operations. For example, you can configure your workflow so that Container B will not start running until Container A has completely finished. This is crucial for processes that have dependencies, especially when using the Alteryx Multi-threaded Processing (AMP) engine, which tries to run tools in parallel whenever possible.

Let's get a high-level overview from the documentation.

Control Container Tool - Alteryx Help

The documentation for the Control Container tool explains its unique role in managing the sequence of execution. It's a more advanced tool that you should be aware of.

First, read the introduction to understand the main purpose of the Control Container. Then, review the 'Tool Components' section to see how its input and output anchors differ from a standard container. Finally, read the 'Disable a Container' section to see how it relates to today's lesson.

As you saw, the Control Container introduces a powerful concept of orchestration based on data flow—it can be activated by an incoming stream of records.

For the purpose of today's lesson, the key takeaway is that the Control Container can also be disabled in the exact same way as a standard Tool Container (using the toggle switch or configuration pane). When you need to manually turn off a sequenced part of your workflow, the same skill applies.

Key Distinction:

  • Tool Container: Manually enabled/disabled. Used for organization and simple execution control.
  • Control Container: Can be activated/deactivated by data flow. Used for enforcing execution order (sequencing). Also supports manual disabling.

4. A Preview: Dynamic Container Control

The ability to disable containers isn't just for manual development work. It becomes incredibly powerful when used in Analytic Apps and Macros. You can connect Interface tools (like a Check Box or Drop Down) to a container's disabled state, allowing a user to choose which parts of a workflow to run.

Dynamic Workflow Selection with Container Control
This workflow illustrates how Interface tools (top left) can be used to dynamically enable or disable different tool containers. A user's selection in an Analytic App could determine whether "Input Container 1", "Input Container 2", or "Input Container 3" runs. We will cover how to build this in the modules on Analytic Apps and Macros.

This image provides a glimpse into a more advanced application. For now, simply recognize that the manual disable/enable feature you learned today is the foundation for building these sophisticated, user-driven workflows later.


Conclusion

In this lesson, you've added another essential workflow management technique to your skillset. You now have two distinct methods for controlling your workflow during development and execution.

Key Takeaways:

  • Tool Containers are used for organizing workflows and can be disabled to prevent a section of tools from running.
  • Disabling a container is ideal for testing alternative logic, debugging, or temporarily turning off parts of a workflow.
  • It's important to differentiate this from caching, which is used to save data and speed up downstream processing.
  • The Control Container is a more advanced tool for enforcing execution sequence, but it can be manually disabled using the same methods as a standard Tool Container.

Preview of the Next Lesson:
Now that you have more control over what runs and when, the next logical step is to manage what happens when things go wrong. In the next lesson, you will learn how to implement custom error handling and validation using the Message and Test tools. This will enable you to build more robust and reliable workflows that can validate their own results and provide clear feedback.