23.1 Integrated Scenario Practice: Designing an End-to-End Solution
Key Takeaways
Scenario questions combine topics; identify each requirement's topic and the rule that decides it.
Event triggers start work on arrival, queues distribute it, and Data Fabric keeps the auditable record.
Business rule exceptions are never retried; system exceptions retry through queue Auto Retry with the framework's MaxRetryNumber set to 0.
Human approvals belong in long-running coordinators with app or form tasks, not in performers.
Promotion relies on packages or solutions plus per-environment connections and assets, with monitoring, alerts, and recording in production.
23.1 Integrated Scenario Practice: Designing an End-to-End Solution
Core Concept: Professional-level questions often describe a business scenario and ask for the best design across several topics at once. This section works through one integrated case, the kind of reasoning the exam expects, and connects each decision to the topic behind it.
The Scenario
A logistics company receives supplier invoices by email in a shared Microsoft 365 mailbox, about 3,000 per month, with peaks at month-end. Requirements:
- Start processing soon after an invoice arrives.
- Extract invoice data, check it against purchase orders in the ERP (desktop client, no API), and post approved invoices.
- Invoices above 25,000 need a manager's approval with the option to change the approved amount.
- Keep an auditable record of every invoice and its status.
- Handle ERP outages without losing invoices; retry technical failures but never retry data problems.
- Finance users ask questions such as "Why was invoice 4471 rejected?" in plain language.
- Promote the solution from test to production without editing workflows.
A Reference Design
| Requirement | Design choice | Topic |
|---|---|---|
| Start on arrival | Integration Service event trigger "Email received" on the mailbox connection, filtered to messages with attachments; polling every five minutes by default | Event triggers |
| Record keeping | Data Fabric entities Invoice and Supplier, Status as a choice set, the PDF in a File field | Data Fabric |
| Workload distribution | Dispatcher creates Invoice records and adds each record Id to an Orchestrator queue; a queue trigger scales performers | Queues, triggers |
| ERP work | REFramework performer with UI automation, Unified Target, and Object Repository descriptors from a shared library | REFramework, UI automation |
| Data problems | Throw BusinessRuleException; set the item Failed with ErrorType Business, never retried | Exceptions |
| ERP outages | System exceptions retried through queue Auto Retry (MaxRetryNumber 0 in Config), MaxConsecutiveSystemExceptions to stop a job during an outage | Retries |
| Approval | A long-running coordinator uses Create App Task with an action app whose schema has an in/out ApprovedAmount and Approve and Reject outcomes, then Wait for App Task and Resume | Long-running workflows, Apps |
| Questions in plain language | A cross-platform automation for Autopilot for Everyone with a String input InvoiceNumber and a short ResultMessage | Autopilot for Everyone |
| Promotion | A solution or package deployed to test and production folders, with connections chosen through Package Requirements and environment values in assets | Solutions, connections, assets |
| Monitoring | Trigger alerts for stuck jobs, Monitoring > Queues, and recording of failed queue transactions | Monitoring, recording |
Why Not the Alternatives?
- A time trigger every 5 minutes would start empty jobs; the event trigger starts only when mail arrives.
- Keeping invoice data only in queue items loses a searchable history after processing; Data Fabric keeps the record, and the queue carries the Id. Queue items also have a Specific Data limit of 256,000 characters.
- Retrying everything in the framework with MaxRetryNumber greater than 0 while also using queue Auto Retry would multiply attempts; with queues, the framework value must be 0.
- A form task would work for simple approval, but the managers also need supplier history lookups during review, which an action app can provide through Integration Service or Data Fabric.
- Waiting for approval inside the performer would hold a robot; the coordinator suspends instead.
Walking Through One Invoice
- 09:02 An email with
INV-4471.pdfarrives. Within the polling interval, the event trigger starts the dispatcher. - The dispatcher saves the PDF to a new Invoice record (Upload File to Record Field), sets Status "Received", and adds a queue item with the record Id and Reference
INV-4471. - The queue trigger starts a performer. Get Transaction Item returns the item; the performer reads the record, extracts the data, and finds no matching purchase order.
- It throws a BusinessRuleException "No PO found". SetTransactionStatus marks the item Failed (Business), and the Invoice record Status becomes "Rejected - No PO".
- A finance user asks Autopilot "Why was invoice 4471 rejected?". The automation reads the record and returns "Rejected: no purchase order found for supplier ACME."
For an amount over 25,000, the performer instead sets Status "Awaiting approval", and the coordinator's app task handles the approval before posting.
Practice Questions for This Scenario
Use the design above to reason about the questions below. For each, identify the topic first, then the rule that decides the answer.
- Which queue setting makes system exceptions retry automatically? (Auto Retry with Max # of retries; framework MaxRetryNumber 0.)
- What happens to an item whose robot crashed mid-processing? (It stays In Progress and becomes Abandoned after about 24 hours, then is retried only if abandoned items retry is enabled.)
- How does the approval step avoid blocking a robot? (Wait for App Task and Resume suspends the coordinator job.)
- How do test and production use different mailboxes? (Package Requirements select the connection per folder.)
In the scenario, a performer finds that an invoice has no matching purchase order. How should the transaction end?
Throw a System.Exception so the queue retries it.
Set the item Successful and add a comment.
Throw a BusinessRuleException so the item is set Failed with ErrorType Business, which is never retried.
Leave the item In Progress for a person to check.
The approval step must not occupy a robot while a manager decides. Which design meets this?
A Message Box in the performer.
A Delay loop checking a spreadsheet.
A form in Assistant on the manager's machine.
A long-running coordinator that uses Create App Task and then Wait for App Task and Resume.
Why does the design store invoice data in Data Fabric and put only the record Id in the queue item?
Queue items cannot contain strings.
The record stays searchable and auditable after processing, several processes and apps share one version of the data, and queue Specific Data has a size limit.
Data Fabric makes queue triggers unnecessary.
Record Ids are required by the Get Transaction Item activity.
Sections you finish are checked off in the contents.
You've completed this section
Continue exploring other exams