### Install UiPath CLI Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/vs-code Command executed by the extension to install the required CLI tool globally. ```bash npm install -g @uipath/cli@1.0.0 ``` -------------------------------- ### Branching Logic Example Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/node-agent Example of using a Decision node to route flow based on agent output content. ```text Autonomous Agent → Decision ($vars.agent1.output.content.includes("approved")) → True: continue processing → False: escalate or terminate ``` -------------------------------- ### Summarize Task Configuration Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/summarize Example task description for the Summarize tool to identify and cite specific contract clauses. ```text Read the attached vendor contract and identify every clause that governs data retention and deletion. Summarize each clause in plain language and cite the section it comes from. ``` -------------------------------- ### Define a Complete Rule Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/maestro-case-understanding-exit-rules Examples of rules that define the normal finish condition for a stage. ```text WHEN event("AllRequiredTasksDone") ``` ```text WHEN event("AdjusterDecisionMade") IF adjusterDecision != null ``` -------------------------------- ### Perform JavaScript String Operations Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/expression-syntax Examples of string concatenation, case conversion, and substring checking using variables. ```javascript "Hello, " + $vars.firstName $vars.message.toUpperCase() $vars.email.includes("@uipath.com") ``` -------------------------------- ### Null guard expression Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/node-decision Example expression to verify data presence before proceeding. ```javascript $vars.fetchUser1.output != null ``` -------------------------------- ### Migrate expression logic from C# to JavaScript Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/transitioning-to-javascript Example showing the conversion of a sum calculation and conditional assignment from C# to JavaScript. ```csharp vars.total = items.Sum(x => x.Price); if (vars.total > 10000) vars.priority = "High"; ``` ```javascript vars.total = items.reduce((sum, x) => sum + x.Price, 0); if (vars.total > 10000) vars.priority = "High"; ``` -------------------------------- ### Join External Data with Automation Events Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/enriching-process-optimization-with-external-data Example SQL for contact_data.sql to join external contact data with automation events using Trace_ID and Object_ID. ```sql select contact_data.*, Objects."Trace_ID", concat('Contact',to_varchar({{ pm_utils.id() }})) as "Unique_ID" from {{ source('sources', 'contact_data') }} as contact_data left join {{ref('Objects')}} as Objects ON contact_data."Contact ID" = Objects."Object_ID" ``` -------------------------------- ### GET /v1/instances/{instanceId}/variables Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/subprocess Retrieves variable values for a specific subprocess during runtime execution. ```APIDOC ## GET /v1/instances/{instanceId}/variables ### Description Retrieves variable values for a specific subprocess during runtime execution. ### Method GET ### Endpoint /v1/instances/{instanceId}/variables ### Parameters #### Path Parameters - **instanceId** (string) - Required - The unique identifier of the instance. #### Query Parameters - **parentElementId** (string) - Required - The ID of the subprocess element (e.g., 'outer_subprocess' or 'inner_subprocess'). ``` -------------------------------- ### Approval gate expression Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/node-decision Example expression to route based on a form approval status. ```javascript $vars.reviewForm1.output.approved === true ``` -------------------------------- ### GET /v1/debug-instances/{instanceId}/variables Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/subprocess Retrieves variable values for a specific subprocess during design-time debugging. ```APIDOC ## GET /v1/debug-instances/{instanceId}/variables ### Description Retrieves variable values for a specific subprocess during design-time debugging. ### Method GET ### Endpoint /v1/debug-instances/{instanceId}/variables ### Parameters #### Path Parameters - **instanceId** (string) - Required - The unique identifier of the debug instance. #### Query Parameters - **parentElementId** (string) - Required - The ID of the subprocess element (e.g., 'outer_subprocess' or 'inner_subprocess'). ``` -------------------------------- ### Configure Gateway Conditions Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/how-to-complex-process Use these expressions in the expression editor to define path logic for the 'Is resolution required?' gateway. ```text vars.ResolutionRequired == "No" ``` ```text vars.ResolutionRequired == "Yes" ``` -------------------------------- ### Define an Exit Rule Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/maestro-case-understanding-exit-rules An example of a rule that triggers early termination of a stage when a specific condition is met. ```text WHEN PolicyCheckCompleted event arrives IF policyValid == false ``` -------------------------------- ### Log and continue error pattern Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/flow-error-handling Use this script in a node on the error path to log failure details and return null to allow downstream nodes to continue execution. ```javascript // Script node on the error path console.log('Non-critical step failed:', $vars.step1.error.message); return null; // downstream nodes handle null gracefully ``` -------------------------------- ### Task I/O Mapping Configuration Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/how-to-establish-task-io-and-write-back-contracts Defines input and output mappings for connector and agent tasks within a stage. Ensure output mappings correctly target Case Entity fields to prevent downstream data issues. ```json { "stage": "FNOL Intake", "tasks": [ { "name": "Validate Policy", "type": "connector", "required": true, "runOnlyOnce": false, "input": { "policyNumber": "caseEntity.policyNumber" }, "output": { "caseEntity.policyValid": "taskOutput.isValid" } }, { "name": "Extract Details", "type": "agent", "required": true, "runOnlyOnce": true, "input": { "description": "caseEntity.lossDescription", "photos": "caseEntity.photos" }, "output": { "caseEntity.extractedDetails": "taskOutput.structuredData" } } ] } ``` -------------------------------- ### Fast-Track Shortcut Exit Rule Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/maestro-case-understanding-exit-rules Accelerates processing for straightforward cases by skipping unnecessary tasks. ```text WHEN ValidationComplete event arrives IF totalAmount < 500 AND validationResult.status == "pass" ACTION advance ``` -------------------------------- ### Configure Task Output Mapping Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/how-to-design-a-persistent-case-entity-schema Maps task results back to specific Case Entity fields, establishing the write-back mechanism. ```json "output": { "caseEntity.policyValid": "taskOutput.policyValid" } ``` -------------------------------- ### Define Conditional Sequence Flow Expression Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/sequence-flows An example of a conditional expression used after an exclusive gateway to route process execution based on variable values. ```text amount > 10000 ``` -------------------------------- ### Configure Invoice Response Object Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/how-to-complex-process Use this JSON object to update the response global variable for the Invoice received Message start event during debugging. ```json { "Currency": "USD", "DueDate": "2025-02-14", "InvoiceDate": "2025-02-14", "InvoiceEmail": "petrodev71@gmail.com", "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": "anthony.petro@uipath.com" }, "CreatedBy": { "Email": "anthony.petro@uipath.com" } } ``` -------------------------------- ### Configure Gateway Routing Expressions Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/how-to-simple-process Use these expressions in the gateway condition editor to route the process based on the 'path' variable value. ```text vars.path == "A" ``` ```text vars.path == "B" ``` -------------------------------- ### Access GET request response in Script node Source: https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/node-http-request Access the response body and status code from a previous HTTP Request node using the $vars object. ```javascript const body = $vars.httpRequest1.output.body; const status = $vars.httpRequest1.output.statusCode; return { title: body.title, userId: body.userId, status: status }; ```