Groups and workflow architecture
Divide a long macro into readable stages, reusable helper groups and explicit recovery paths.
Groups and subgroups
Groups organize steps. Subgroups provide a hierarchy; calls and transfers determine execution. A hierarchy is useful for organization, but does not mean that running a parent automatically runs all children.
A practical structure
- Preparation: application and window checks.
- Main task: the user’s actual goal.
- Helper — Common check: a reusable task called from different locations.
- Recovery: verify an unexpected state again.
- Result: verify completion from the actual interface.
Go, call and return
Go to group transfers execution. Call group creates a return point. Return resumes its caller. Stop ends the entire run. These four behaviors are not interchangeable.
Shortcuts and entry group
Choose group shortcuts in group management and resolve conflicts with run and emergency-stop shortcuts. A duplicated group needs a new shortcut. Verify the project entry group separately.
Preserve dependencies
Include referenced groups when exporting a group that calls or transfers to them. Selecting a subgroup can preserve its ancestor folder context without including every action in the parent.
Keep large projects readable
Organize by task, rather than creating a group for every click. Name both condition branches clearly. Call common recovery logic instead of copying it, and avoid excessive block nesting.