Day 5 - Advanced Topics and Optimisation
The goal is to learn how to make your automations resilient, efficient, and production-ready by applying advanced techniques such as exception handling, optimisation, and process standardisation.
1. Building Reliable Automations
Even a well-tested process can fail unexpectedly - a slow website, a renamed button, or a missing file. Advanced RPA developers prepare for these situations with error handling, timeouts, and recovery logic.
Objective: A reliable process doesn't just work - it recovers gracefully.
2. Exception Handling
What Is Exception Handling?
Exception handling is the technique of anticipating, catching, and responding to errors during execution. It ensures that when something goes wrong, the process:
Logs what happened.
Handles the failure safely.
Optionally continues with the next task.
Optionally closes all windows and restarts the process
Common Types of Exceptions
| Type | Description | Example |
|---|---|---|
| System Exception | Application or OS-level issues | App crash, missing file |
| Business Exception | Rule or data validation errors | Invalid invoice amount |
| Selector Exception | UI element or Window not found | Moved or renamed button |
| Timeout Exception | Action took too long | Slow response or network delay |
How to Handle Exceptions in Automize
Select a key activity (e.g., "Click Button").
Add a connector of type "Exception."
Connect it to an error-handling block (e.g., "Log", "Notify", "Raise an Error", or "Take a Screenshot").
Optionally loop back to an earlier activity to try again.
When looping back, be sure to add a Maximum value for the connection to prevent indefinite loops.
End gracefully or return to a known state.
Tip: Always log exceptions clearly, including process name, step, and variable values.
Hands-On Exercise: Exception Flow
Objective: Handle an app crash gracefully.
Steps:
Open your Calculator process.
Add a Decision after launching Calculator:
If the Calculator window does not exist,→ Log: "Calculator failed to open."→ End process.
Add an Exception connector from the "Click Equals" step to a "Handle Error" sub-process:
Log: "Calculation failed at step {ActivityName}."
Test by closing Calculator mid-run.
Success Criteria:The process logs the failure and ends cleanly instead of freezing or crashing.
3. Optimising Performance
Automation performance depends on efficiency and structure - not speed alone.
Techniques for Faster, Smarter Automation
Reduce Unnecessary Steps
Combine repetitive actions into sub-processes.
Remove redundant "click" or "wait" steps.
Use Smart Waits
Instead of setting fixed wait periods on connections (i.e. = 5 seconds), replace with "Test if Element exists" or "Test if Window. exists" and set the connection wait to "at most."
Minimise Data Operations
Filter or sort data before looping.
Load only what's needed from Excel or Outlook.
Re-use Assets
Create standard sub-processes for login, file read/write, email send, etc.
Optimise Loops
Break long loops into smaller batches.
Stop looping once goals are met.
Pro Tip:A smaller, well-structured process will outperform a single long automation every time.
Hands-On Exercise: Process Optimisation
Objective: Optimise a process with long delays and redundant steps.
Steps:
Open a process that uses fixed connection times.
Where consecutive activities happen (all within the same application), reduce the connection times to = 0.2 seconds.
Where waiting for elements or windows are required, change the connection's waiting times to > 10 seconds (as an example), and insert "Test if Window exists"
Replace each fixed wait with Wait for Element Exists.
Remove duplicate clicks or unused variables.
Group related steps logically.
Re-run and measure total runtime.
Goal: The process runs faster, with no loss in reliability.
4. Creating Reusable and Modular Processes
Reusable automations reduce development time and errors.
Sub-Processes
A sub-process is a smaller process that can be called by others - for example:
"Login to System"
"Read Excel Data"
"Send Notification Email"
Benefits:
Centralised updates (fix once, used everywhere).
Consistent standards across teams.
Easier debugging.
Best Practice: Build and store sub-processes in a dedicated Library → Components section.
Hands-On Exercise: Reuse a Sub-Process
Objective: Create and call a reusable login process. Any process used within another process, is called a sub-process.
Steps:
Create a new process called "Login to Calculator."
Record opening Calculator, verify it's open, then stop.
Open your main "Perform Calculation" process.
Insert the "Login to Calculator" sub-process at the start.
Run and verify both processes execute in sequence.
Goal: The main process successfully calls and completes the sub-process.
5. Process Readiness and Production Deployment
Before promoting any process to PRODUCTION, it should meet strict readiness criteria.
Production Checklist
| Category | Checks |
|---|---|
| Reliability | All steps run without failure under normal load. |
| Error Handling | Exception paths and logs exist for critical steps. |
| Performance | Total runtime optimised; unnecessary waits removed. |
| Variables | All variables have default values; none are hardcoded. |
| Selectors | Stable and verified against app updates. |
| Documentation | Comments, purpose, and version history included. |
| Environment | Correct DEV → TEST → STAGING → PROD progression used. |
Pro Tip: Have a peer review your process before moving to production - a second set of eyes catches what you miss.
6. Final Hands-On Challenge - End-to-End Automation
Challenge: Invoice Processor
Objective: Create an end-to-end automation combining everything learned this week.
Scenario:
Read invoice data from a PDF file.
Open a website or app to enter the invoice data.
If the amount > 1000, mark it as "High Value".
Save confirmation results to a new Excel sheet.
Log all actions with timestamps.
Handle missing files gracefully.
Guidelines:
Use variables for invoice fields.
Use formulas to calculate totals or classifications.
Add a loop to process all rows.
Use exception handling for missing data.
Log progress using Log Message at key points.
End with a summary log like:
Log: "Process completed - {CountSuccess} successful, {CountFailed} failed."
Success Criteria:The process runs end-to-end, handles errors, and produces a clear success log.
Optional Challenge: Multi-App Optimisation
Create a process that:
Reads a list of names from Excel.
Opens Outlook, drafts an email to each name.
Logs sent status in Excel.
Handles offline or missing data gracefully.
Goal: Demonstrate reliability across multiple applications.
7. Best Practices for Advanced RPA Development
1. Build for Change
Design with future updates in mind - avoid absolute selectors and hardcoded paths.
2. Handle Failures Gracefully
A failed step should never crash the process; it should log, recover, and move on.
3. Prioritise Readability
Your process should tell a story visually.If someone else can understand it at a glance, it's well-built.
4. Monitor and Measure
After deployment:
Review logs daily for anomalies.
Measure success rates and runtime trends.
Continuously refine high-volume processes.
5. Version Everything
Keep version numbers and notes (e.g., v1.2 - Added Exception for Timeout).This ensures traceability for auditing and rollback.
6. Follow Industry Standards
These are standard across major RPA platforms:
Separate development and production environments.
Maintain consistent naming, documentation, and testing frameworks.
Create reusable components for login, error handling, and logging.
Emphasise recoverability over perfection - it's okay to fail gracefully.
End of Day 5 Summary
By completing Day 5, you should now be able to:
✅ Design error-tolerant and resilient automations
✅ Implement exception handling and recovery logic
✅ Optimise performance and maintain clean process maps
✅ Build and reuse modular sub-processes
✅ Validate readiness for production deployment
Congratulations - You're Now an Automize RPA Developer!
You've completed the full Automize RPA Developer Training Series.You now have the skills to design, build, test, and optimise reliable automations that deliver real business value.
Continue expanding your skills through: