# Common implementation scenarios

> This section outlines practical implementation scenarios that help you apply Maestro effectively to real-world business needs. These patterns are informed by common BPMN practices.

This section outlines practical implementation scenarios that help you apply Maestro effectively to real-world business needs. These patterns are informed by common BPMN practices.

Each pattern reflects a repeatable modeling approach that can be reused across departments, domains, and process types.

## Human-in-the-loop approval flow

**Use case:** A request (e.g., invoice, access, quote) needs to be reviewed and approved by a person.

**Pattern:** Start event → Service Task (data prep) → **User Task** → Gateway (approved?) → End.

**Highlights:**

* User Task can be assigned dynamically.
* Optional use of Action Apps for task forms.
* Escalation paths supported via boundary events.

## Integration with external systems

**Use case:** Your process needs to call an API or receive data from an external system.

**Pattern:**

* Service Task → **Send Task** (outbound).
* Or: **Receive Task** (event-driven trigger).

**Highlights:**

* Connectors (via Integration Service) handle REST, SOAP, etc.
* Use data mapping and variables to configure payloads.
* Works well with queues or transactional data pipelines.

## Business Rule evaluation (DMN)

**Use case:** You want to separate decision logic from flow logic (e.g., risk evaluation, eligibility).

**Pattern:** Task → **Business Rule Task** → Gateway based on result.

**Highlights:**

* Use Rule projects in the same solution.
* Input/output mapped via properties panel.
* Supports DMN 1.3 and UiPath Decision support.

## Parallel processing

**Use case:** You need to process a list of items in parallel (e.g., validate multiple invoices, review multiple contracts).

**Pattern:** Task with **Parallel Multi-instance Marker**.

(loop over list variable)

**Highlights:**

* One task instance per item.
* Use Parallel or Sequential markers.
* Outputs can be aggregated or joined later.

## Conditional routing

**Use case:** The next step in the process depends on input data or rule output.

**Pattern:** Gateway with conditional sequence flows.

**Highlights:**

* Define condition expressions using the Expression Editor.
* Always define a default path to avoid runtime faults.
* Conditions can reference variables or business rule results.

## Reusable sub-process

**Use case:** You need to reuse a segment of logic across multiple processes.

**Pattern:** **Call Activity** → Reuse process defined in another Maestro project.

**Highlights:**

* Sub-processes share variables and context
* Call Activities trigger new process instances

## Agent-orchestrated flows

**Use case:** Delegate a complex or intelligent task to an AI agent or planning system (e.g., summarization, classification).

**Pattern:** Service Task → **Start and wait for agent**.

**Highlights:**

* Supports external agents like CrewAI, LangChain, or custom APIs.
* Runtime status monitored in Maestro.
* Works in conjunction with parallel flows or escalation paths.
