- Introduction to UiPath Maestro™
- Getting started
- How to - Simple process
- How to - Complex process
- Maestro landing page
- Process modeling
- Process implementation
- Process operations
- Process monitoring
- Process optimization
- Licensing
- Reference information

Maestro user guide
How to - Complex process
linkOverview
linkInsurePath identified an invoice processing workflow with UiPath Process Mining. They use UiPath IXP and Document Understanding to process incoming invoices and extract invoice data. After extraction, the finance and accounting teams still process most invoices manually, including resolving vendor disputes.
The process owner, together with process implementers and administrators, decided to address the invoice processing problem with UiPath Maestro™ and platform capabilities.
Process
linkBuild a working invoice processing process to demonstrate how Maestro coordinates work between robots, agents, and humans.
Prerequisites
linkWe need to configure the dependent resources for this scenario.
Data Fabric: APInvoice entity
- Navigate to Data Fabric and
select Import/Export and select Import Schema. Use this file to import.
- Select the APInvoice entity to import and select Import.
Orchestrator: Shared Folder
Use a shared folder in Orchestrator to organize the How To resources.
Navigate to Orchestrator and create a Shared/How To folder.
Automation: Invoice to PO matching
1
, the value is Yes. Otherwise, it is No.
- Navigate to Studio Web and select Import form the Create new
drop-down list. Use this file to import.
- Open the project in UiPath Studio Web and publish to Orchestrator Tenant Processes Feed.
- Navigate to Orchestrator, go to the Shared/How To folder, select the Automations tab, choose Processes, and select Add process.
- Select Invoice.To.PO.Matching in Package Source Name and select Next.
- In the Package Requirements section, select Next .
- Provide Invoice to PO matching for Display Name and select
Create.
See Studio Web Publishing a project for additional details on publishing and deploying projects.
Automation: Post invoice to SAP
fail
, the process throws a runtime exception
that you can repair in instance management.
- Navigate to Studio Web, and select Import from Create New drop-down list. Use this file to import.
- Open the project in Studio Web and Publish to Orchestrator Tenant Processes Feed.
- Navigate to Orchestrator, go to the Shared/How To folder, select the Automations tab, choose Processes, and select Add process.
- Select Post.Invoice.To.SAP in Package Source Name and select Next.
- In the Package Requirements section, select Next .
- Provide Post invoice to SAP for Display Name and select
Create.
See Studio Web Publishing a project for additional details on publishing and deploying projects.
- Navigate to Agents and select Build your agent now.
- Enter the following
details:
Name: Resolve Discrepancies Agent
Description: Resolve discrepancies agent
System prompt: You are an expert in Resolving Invoice Discrepancies
User prompt: If the {{InvNum}} start with 11 you will Resolve the invoice. Else you will reject the invoice and give the {{Reason}} for rejection asNeeds human review since the PO Number doesn't match the Invoice
.When you reject the invoice set {{Decision}} toRejected
and if you approve the invoice set {{Decision}} toResolved
.
- Select Arguments and
enter the following the using the Editor
option:
Inputs
{ "type": "object", "properties": { "InvNum": { "type": "string" }, "PONum": { "type": "string" } }, "required": [ "InvNum" ] }
{ "type": "object", "properties": { "InvNum": { "type": "string" }, "PONum": { "type": "string" } }, "required": [ "InvNum" ] }Outputs{ "type": "object", "properties": { "Decision": { "type": "string" }, "Reason": { "type": "string" } }, "required": [] }
{ "type": "object", "properties": { "Decision": { "type": "string" }, "Reason": { "type": "string" } }, "required": [] } - Publish to Orchestrator Tenant Process Feed.
- Navigate to Studio Web, and select Import from Create New drop-down list. Use this file to import.
- Open the project in Studio
Web and Publish to Orchestrator Tenant Processes Feed.
Note: You may need to navigate to
MainForm_MainForm_load.xaml
and update entities. From Data manager, go to Entities, and select Update entities before you can publish.
- Navigate to Orchestrator, go to the Shared/How to folder, go to the Automations tab, select Apps and choose Deploy app.
Model an agentic process
linkStart by modeling the end-to-end process, then configure the components.
Create an agentic process as a new type of Studio project.
- Navigate to your Automation Cloud™ tenant.
- On the rail on the left side, from the list of products, select Maestro.
- On the Maestro landing page, select Start modeling. Your new agentic process opens.
- Right-click to rename the project
to {your initials} Invoice Process, and the process to Invoice
Process.
- Select the start element and type Invoice received in the name field.
- Click Add: Text annotation
from the toolbox. Type Data Fabric trigger in the annotation.
- Select the start element and
choose Add Task from the toolbox and type Invoice to PO matching
for the task name.
- Select the Invoice to PO matching task and click Add: Text annotation from the toolbox and type Automation to indicate we want this to be an automation task.
Invoice to PO matching outgoing paths
Configure two outgoing paths for the gateway of which only one will be followed based on the outcome from the Invoice to PO matching automation.
- Select the Invoice to PO matching task and click Add: Exclusive
gateway from the toolbox and type Is resolution required? for the
name.
- Select the gateway and choose Add: Task from the toolbox and type Invoice approval for the name. Add Action Center Action app as an annotation to indicate we want this to be a HITL task.
- Select the line just created between the gateway and task and press the Open
properties panel button in the upper right-side of the designer to
change the name to No.
- Select the gateway again and choose Add: Task from the toolbox and type Resolve discrepancies for the name. Drag and position the task under the gateway. Add Agent as an annotation to indicate this will be an agent task.
- Select the line just created between the gateway and task and open the properties panel to change the name to Yes.
Invoice approval outgoing paths
- Select the Invoice approval task and add another Exclusive gateway.
- Select the gateway, choose Add: Task from the toolbox, and type Post invoice to SAP for the name. Add Automation as an annotation to indicate that you want this to be an automation task.
- Select the line just created between the gateway and task and open the properties panel to change the name to Approve.
- Select the gateway again, choose Add: Task from the toolbox and type Notify vendor for the name. Drag and position the task under the gateway. Add Integration Service Outlook connector as an annotation to indicate this will be an API call indicated as a Send task.
- Select the line just created between the gateway and task and open the properties panel to change the name to Reject.
Resolve discrepancies outgoing paths
- Select the Resolve discrepancies task and add another Exclusive gateway.
- Select the gateway and choose the Connect arrow from the
toolbox.
- Select the Notify vendor task to draw a line from the gateway to
task.
- Select the line just created between the gateway and task and open the properties panel to change the name to Rejected.
- Use the Connect tool again to draw a line from the gateway to the Invoice approval task.
- Select the line just created between the gateway and task and open the properties panel to change the name to Resolved.
Resolve discrepancies error boundary event
- Select the Intermediate event in the full toolbox on the left-hand
side and drag-n-drop it to the Resolve discrepancies task.
- Select the Intermediate event and choose Change element from
the toolbox and select Error boundary event.
- Select the Error boundary event, choose Add: Task from the toolbox, and type Resolve discrepancies for the task name. Add Action Center Action app as an annotation to indicate we want this to be a human-in-the-loop task.
- Select the new Resolve discrepancies task. Use the Connect tool again to draw a line from the this new task to the agent gateway.
End events
- Select the Post invoice to SAP task, choose Add: End event, and type Invoice processed for the name.
- Select the Notify vendor task, choose Add: End event, and type Invoice rejected for the name.`
Congratulations! You’ve created your first BPMN end-to-end business process. It's time to add some UiPath capabilities to the process.
Implement an agentic process
linkMessage start event
- Select the start element, choose Change element from the toolbox, and
select Message start event.
- Open the properties panel and in the Implementation section configure
the following:
- Action: Wait for connector event.
- Connector: Data Fabric
- Data Fabric connection: Data Fabric.
Note: Choose Connect to Data Fabric to create a connection you don’t have one already.
- Trigger: Record Created.
- Object: APInvoice.
Note: All outputs will be automatically available as variables in the process configuration.Note: If you are in a shared environment, you can change the Trigger to Record Updated and configure the filter to set CreatedBy E-mail equal to your email.
Invoice to PO matching automation
- Select the Invoice to PO matching task, choose Change element from the toolbox. and select Service task.
- Open the properties panel and in the Implementationsection configure the
following:
- Action: Start and wait for RPA workflow.
- Automation: Invoice to PO matching.
- Configure the inputs by mapping the output from Invoice received message
start event as inputs to the automation. Use the Variable search dialog to find
the variables.
- InvNum: Invoice received > response > Invoice number.
- PoNum: Invoice received > response > PO number
- InvNum: Invoice received > response > Invoice number.
The Is resolution required? gateway
- Select the Is resolution required? gateway, expand the Conditions
to enter the condition for the No and Yes paths, and use the
Expression editor to enter the conditions.
- Use Insert variable to find and insert Invoice to PO matching
output variable ResolutionRequired, set the value to “No”, and select
Save.
- Alternatively, you can simply copy/paste the expressions below into expression
editor:
- No:
vars.ResolutionRequired == "No"
- Yes:
vars.ResolutionRequired == "Yes"
- No:
Approve invoice task
- Select the Approve invoice task, choose Change element from the toolbox, and select User task.
- Open the properties panel and in the Implementation section and configure
the following:
- Action:
Create action app task
- Action*:
Invoice.Approval action app
-
Task title:
{your initials} Invoice approval
.
- Action:
- Configure the inputs by mapping the output from Invoice received message start event as inputs to the app task. Use the Variable search dialog to find the variables for the Data Fabric record Id.
- Select the Resolve discrepancies, choose Change element from the toolbox, and select Service task.
- Open the properties panel and in the Implementation section,
configure the following:
- Action:
Start and wait for agent
. - Automation:
2-way matching agent
.
- Action:
- Configure the inputs by mapping the output from Invoice received
message start event as inputs to the automation. Use the Variable search
dialog to find the variables.
- InvNum: Invoice received > response > Invoice number
- PoNum: Invoice to PO matching > PO number
Resolve discrepancies agent outgoing gateway
- Select the gateway and expand the Conditions to enter the condition for the Resolved and Rejected paths and select the text entry picker to Open expression editor to enter the conditions.
- Copy/paste the expressions below into expression editor.
- Resolved -
vars.Decision == "Resolved"
- Rejected -
vars.Decision == "Rejected"
- Resolved -
Notify vendor send task
- Select the Notify vendor task, choose Change element from the toolbox, and select Send task.
- Open the properties panel and, in the Implementation section,
configure the following:
- Action:
Integration Servies - API execution
- Connectors:
Microsoft Outlook 365
- Connection:
{your outlook connection}
Note: SelectConnect to Microsoft Outlook 365
if you don’t already have a connection available. - Activities:
Send email
- Trigger:
Email sent
- Action:
- In the Filter section,
configure the Primary inputs for the Send email activity:
- To:
{
Invoice received
>response
>Invoice email
} - Subject:
Invoice rejected
- Body:
Invoice rejected because {
Resolve discrepancies > message
}
- To:
{
- Select the gateway and expand the Conditions to enter the condition for the Approve and Reject paths and select the text entry picker to Open expression editor to enter the conditions.
- Copy/paste the expressions below into expression editor:
- Approve:
vars.Action == "Approve"
- Reject:
vars.Action == "Reject"
- Approve:
- Select the Post invoice to SAP, choose Change element from the toolbox, and select Service task.
- Open the properties panel and in the Implementation section configure
the following:
- Action:
Start and wait for RPA workflow
- Automation:
Post Invoice to SAP
. - Configure the inputs by mapping the output from Invoice to PO
matching task as inputs to the automation.
- PurchaseOrderId: fail
Note: We want this automation to fail so that we can fix runtime later.
- Action:
Congratulations! You’ve now fully configured your first agentic process.
It's time for some debugging.
Debug a business process
link- Invoice Number starts with x > No resolution required, go to Invoice Approval human-in-the-loop.
- Invoice Number starts with 1x > Resolution required, go to Resolve Discrepancies Agent, Agent rejects.
- Invoice Number starts with 11 > Resolution required, go to Resolve Discrepancies Agent, Agent resolves.
- On the top-left of the page, select Debug step-by-step.Note: You can select Test configuration to confirm the input variables and connections used in the project.
- Hover to the left of the Invoice to PO matching task and select to
add a breakpoint.Note: Configure breakpoints for your End events. This offers you enough time to inspect all variables before finishing the debug session.
- Select Next step to move the execution past the Message start event.
- Update the response Global variable for the Invoice received Message
start event with the following response object, then select enter or tab to
commit the change:
{ "Currency": "USD", "DueDate": "2025-02-14", "InvoiceDate": "2025-02-14", "InvoiceEmail": "[email protected]", "InvoiceNumber": "12345", "PONumber": "4551232", "TotalAmount": 10000, "VendorName": "Acme", "Source": 1, "Status": 6, "Id": "6F92ECF6-D1EA-EF11-90CB-6045BD93BF30", "UpdateTime": "2025-02-14T18:22:40.6233376Z", "CreateTime": "2025-02-14T12:48:19.3578548Z", "UpdatedBy": { "Email": "[email protected]" }, "CreatedBy": { "Email": "[email protected]" } }
{ "Currency": "USD", "DueDate": "2025-02-14", "InvoiceDate": "2025-02-14", "InvoiceEmail": "[email protected]", "InvoiceNumber": "12345", "PONumber": "4551232", "TotalAmount": 10000, "VendorName": "Acme", "Source": 1, "Status": 6, "Id": "6F92ECF6-D1EA-EF11-90CB-6045BD93BF30", "UpdateTime": "2025-02-14T18:22:40.6233376Z", "CreateTime": "2025-02-14T12:48:19.3578548Z", "UpdatedBy": { "Email": "[email protected]" }, "CreatedBy": { "Email": "[email protected]" } } - Select the expander to inspect and/or further change the values.
- Select Update 1 variables and Update variables in the dialog to commit the changes.
- Select Next step or Continue to move the execution to the end with the new values.
Congratulations! You’ve fully debugged your first agentic process.
It's time to s publish and deploy your process.
Publish and deploy a business process
link- Select Publish to
publish the process.
- Navigate to Orchestrator, and
in the Automations tab, and select Add process.
- On the Connect to Microsoft Outlook 365 screen, select Connect.
-
Use your email credentials to complete the connection. The new connection will be automatically selected,.
- Select Next.
- Enter
{your initials} Invoice Processing
for the Display Name and choose Create.
Congratulations! You’ve now fully deployed your first agentic process!
It's time for some runtime instance management.
Manage a business process
link- Navigate to Maestro home page.
- In the Process instances view, choose
{your initials} Invoice Processing
to open the All instances view for your process. - You can select the model background to see Global variables,
Incidents, Action history, as well as the Execution
trail. You can select a node in the model or the Execution
trail to inspect Details and Variables for that
execution step.
Note: You need to action any human-in-the-loop steps in Action Center if execution is paused there.
p
Congratulations! You’ve fully managed your first agentic process,
It's time to fix your broken process.
Fix a business process
linkFor this exercise, cause a failure in execution so you can use the instance management to recover.
- Open a new Tab and navigate to Data Fabric > APInvoice > Data and add a
record that has Invoice Number that starts with 2xxxx to ensure we get to
the Post invoice to SAP step.
Note: If you are in a shared environment, you can use an existing record that has CreatedBy E-mail that matches the filter you configured.
- Navigate to your process All instances page, select the refresh button for the list and choose the latest instance.
- When the execution is paused on a human-in-the-loop step, you must open
Actions (formerly Action Center) to assign and complete the task.
-
Open a new browser tab and select Actions in the left navigation menu.
- Select Inbox, then go to Unassigned.
- Find and select your task and choose Assign to self.
- Find your task in Pending and select Approve once the form load.
- Go back to your agentic process tab, wait for Post invoice to SAP step to fail, and select on the node or the execution step. Note the Errors and Variables.
- Update the variable to fix the input by changing ‘fail’ to ‘1234’ and select Save.
- Select Update 1 variable to update the variable and add a Comment.
- In the Action History tab, select Retry, add a comment and choose Retry instance to retry the step with the new variable. Watch the instance complete.
Congratulations! You successfully fixed a broken instance.
Migrate to a new version of a business process
linkFix the issue created in the previous section so it doesn’t happen again.
Prepare failed instance
- Open a new Tab and navigate to Data Fabric > APInvoice > Data and add a record
that has Invoice Number that starts with 2xxxx to ensure we get to the Post
invoice to SAP step.
Note: If you are in a shared environment, you can an existing record that has CreatedBy E-mail that matches the filter you configured.
- Navigate back to your to All instances page, select the refresh button for the list and choose the latest instance.
- When execution is paused on a human-in-the-loop step, you must open Actions (formerly Action Center) to assign and complete the task.
- Open a new browser tab and select Actions in the left navigation menu.
- Select Inbox, choose Unassigned, select your task, and choose Assign to self
- Find your task in Pending and select Approve once the form loads.
- Go back to your Maestro tab, wait for the Post invoice to SAP step to fail, and then select the node or the execution step.
- Open
{your initials} Invoice Processing
process in UiPath Studio. - Fix the broken Post invoice to SAP step by configuring a PO number as input.
- Select the Post invoice to SAP and open the properties panel.
- In the Inputs section configure the inputs by mapping the output from
Invoice to PO matching task as inputs to the automation.
- PurchaseOrderId:
Invoice to PO matching
>PoNum
.
- PurchaseOrderId:
- Publish the process to the Tenant feed.
- Find your process in Orchestrator and select Upgrade to latest version from the menu.
- Navigate back to Maestro, go to your process and your running instance.
- This time, instead of fixing the variable, use the Migrate option.
- Select the new version of your process, add a comment, and choose Migrate
instance.
- Now you need to inform the engine to continue processing on the new version. Select Retry, add a comment, and choose Retry instance to continue execution which will now complete successfully.
Congratulations! You’ve successfully migrated a running instance to a new version.