# Advanced Automation and Exception Handling: practice workbook
Talent Engineering Academy | An education initiative by Vitae
Edition 2026.09 | Updated 2026-09-24
Course: https://talentengineering.org/courses/advanced-automation

Design stateful workflows that survive duplicates, partial failures, retries and changing candidate intent.

## Your deliverable
A state machine, failure matrix and recovery specification.

Use fictional information. Keep your completed work in your own secure notes. Exercises and capstone work are self-directed, not independently assessed.

## 1. States and permitted transitions

Your notes:



## 2. Idempotency key and operation boundary

Your notes:



## 3. Retryable versus permanent failure

Your notes:



## 4. Partial completion and compensation

Your notes:



## 5. Exception queue and reconciliation

Your notes:



## 6. Recovery tests and audit events

Your notes:



## Lesson exercises

### 1. Model states and valid transitions

Draw a state machine for interview coordination with withdrawal and rescheduling.

Your response:


Worked example: A candidate withdraws while an interview invitation is queued. The send step reads current application state and cancels the operation, even though the original scheduling event was valid.

Self-review guidance: List permitted transitions and one forbidden transition. Include a stale-event test. The diagram should prevent a past event from overriding a newer decision.

### 2. Make repeated events safe

Specify an idempotency key and handling for simultaneous duplicate events.

Your response:


Worked example: Two workers receive the same booking event. A durable operation record allows one to create the invitation while the other sees it is already in progress or complete. A new interview version uses a distinct operation key.

Self-review guidance: Explain how the key stays stable across retries and changes for a genuinely new operation. Include what happens if the worker crashes after the provider acts but before local completion is recorded.

### 3. Classify failures and recover partial work

Build a failure matrix for six cases with retry, pause or compensation decisions.

Your response:


Worked example: A workflow creates a calendar event but fails to update the ATS. Recovery links the existing event to the application instead of creating another event. If the interview has since been cancelled, it reconciles cancellation too.

Self-review guidance: Distinguish transient, permanent and ambiguous failures. Include an external action that cannot truly be undone and explain the corrective communication needed.

### 4. Test recovery and reconciliation

Write four failure-injection tests and expected reconciliation outcomes.

Your response:


Worked example: A test kills the worker after the calendar provider succeeds. Reconciliation finds the event by its operation reference and completes the local record without sending another invitation.

Self-review guidance: Include concurrent duplicates, lost responses, stale cancellations and a full review queue. Verify final state and external side effects, not just a successful HTTP response.

## Portfolio review
Check that your work is internally consistent, distinguishes facts from assumptions, names decision owners and explains its limitations. Revise gaps before using the method in real work.

## Further reading
- [GOV.UK: Responsible AI in recruitment](https://www.gov.uk/government/publications/responsible-ai-in-recruitment-guide/responsible-ai-in-recruitment): UK guidance on procuring and deploying recruitment AI.
- [NIST: AI Risk Management Framework](https://www.nist.gov/itl/ai-risk-management-framework): Voluntary framework for organising AI risks and controls.

Original educational scenarios. References provide further reading and do not imply endorsement. Check current official rules and appropriate professional advice for real legal, financial or regulated decisions.