> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Start embedded subprocess

> The Start Embedded Subprocess node initiates subprocesses within a parent process, allowing for encapsulated functionality and enhanced process management.

## Overview

The Start Embedded Subprocess node enables the initiation of subprocesses within a parent process, offering a range of features and options for enhanced functionality.

![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/start_embedded_subprocess.png)

> [!NOTE]
>
> **Call activity or embedded subprocess?** On the process canvas, both nodes are rounded rectangles with a box-and-plus icon. A call activity node has a thicker border and a bolder icon. A start embedded subprocess node has the same thin border as other task nodes. In the node palette, they are named **Call Activity** and **Start Embedded Subprocess**.

## Usage Considerations

### Data Management

Embedded subprocesses offer advantages such as:

* Segregated sections from a subprocess can be utilized without rendering them over the parent process.
* Data is stored within the parent process instance, eliminating the need for data transfer.
* Embedded subprocesses are visible in the navigation view.

### Runtime Considerations

**Important** runtime considerations for embedded subprocesses include:

* The **child process** must have only **one swimlane**.
* Runtime swimlane permissions are inherited from the parent.
* Certain boundary events are supported on Start Embedded Subprocess node, except for Timer events (currently not implemented).

> [!WARNING]
>
> Embedded subprocesses cannot support multiple swimlanes in the actual implementation.

## Example

Let's explore this scenario: Imagine you're creating a process that involves a series of steps, each akin to a sequential movement of a stepper. Now, among these steps, rather than configuring one step from scratch, you can integrate a pre-existing process, treating it as a self-contained unit within the overarching process.

### Step 1: Design the Embedded Subprocess

**1. Access FlowX.AI Designer**

Log in to the FlowX.AI Designer where you create and manage process flows.

**2. Create a New Process**

Start by creating a new process or selecting an existing process where you want to embed the subprocess.

**3. Navigation Areas**

Design your navigation areas to match your needs.

![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/embedded_example_copy.png)

> [!TIP]
>
> Make sure you allocated all your user tasks into the navigation area accordingly.

**4. Design Subprocess**

Within the selected process, design the subprocess by adding necessary tasks, events and so on. Ensure that the subprocess is contained within **a single swimlane**.

![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/subprocess_to_embed.png)

> [!WARNING]
>
> To initiate a process with an embedded subprocess, designate the root Navigation Area of the subprocess as an inheritance placeholder **Parent Process Area** label in the **Navigation Areas**.
> Ensure that the navigation hierarchy within the Parent Process Area can be displayed beneath the parent navigation area within the main process interface.
>
> ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/embed_sbprc.gif)
>
> > [!TIP]
> >
> > Make sure you allocated all your user tasks into the navigation area accordingly.

### Step 2: Configure Start Embedded Subprocess Node

**1. Add Start Embedded Subprocess Node**

Within the parent process, add a **Start Embedded Subprocess Node** from the node palette to initiate the embedded subprocess.

![Subprocess Nodes](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/subprocess_nodes.png)

**2. Specify Subprocess**

Configure the node to specify the embedded subprocess that it will initiate. This typically involves selecting the subprocess from the available subprocesses in your process repository.

![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/config_embed_node.png)

### Step 3: Customize Subprocess Behavior

> [!NOTE]
>
> [**Alternative flows**](https://docs.flowx.ai/6.x/docs/building-blocks/process/navigation-areas.md#alternative-flows) configured in the **main process** will also be applied to **embedded subprocesses** if they share the same name.

**1. Customize Data Handling**

Within the subprocess, handle data as needed. Remember that data is stored within the parent process instance when using embedded subprocesses.

**2. Implement Boundary Events**

Implement boundary events within the subprocess if specific actions need to be triggered based on certain conditions.

![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/subprocess_instance.gif)

### Step 4: Test Integration

**1. Test Functionality**

Test the integration of the embedded subprocess within the parent process. Ensure that the subprocess initiates correctly and interacts with the parent process as expected.

**2. Verify Data Flow**

Verify that data flows correctly between the parent process and the embedded subprocess. Check if any results produced by the subprocess are correctly captured by the parent process.

![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release40/final_embed_result.gif)

For further details on other ways of configuring and utilizing subprocesses, refer to the following resources:

> [card] [Subprocess Configuration](https://docs.flowx.ai/6.x/docs/building-blocks/process/subprocess.md)

> [card] [Start Subprocess action](https://docs.flowx.ai/6.x/docs/building-blocks/actions/start-subprocess-action.md)

> [card] [Process design principles](https://docs.flowx.ai/6.x/docs/building-blocks/process/design-principles.md)
>
> Subprocess lifecycle, Call Activity vs. User Task action, async constraints.


## Related topics

- [Subprocess management](https://docs.flowx.ai/6.x/docs/building-blocks/process/subprocess.md)
- [Adding a new node](https://docs.flowx.ai/6.x/docs/flowx-designer/managing-a-project-flow/adding-a-new-node.md)
- [Navigation areas](https://docs.flowx.ai/6.x/docs/building-blocks/process/navigation-areas.md)
- [Call activity node](https://docs.flowx.ai/6.x/docs/building-blocks/node/call-subprocess-tasks/call-activity-node.md)
- [Process nodes (BPMN)](https://docs.flowx.ai/6.x/docs/building-blocks/node/node.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.