# Sub Process Task

The **Sub Process Task** is used to **invoke another process** from within a main process.\
It is represented by a **rectangular BPMN task node**, as shown below.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fakl323UffFh9Mtg9xlXX%2F0?alt=media" alt=""><figcaption></figcaption></figure>

***

### Purpose

The **Sub Process Task** enables modular and reusable process design by allowing a main process to call **another process** (the sub process).

This approach is recommended when:

* A portion of the main process can stand alone
* The same logic is reused across multiple processes
* You want to improve readability and maintainability

By extracting repeated or complex logic into a separate process and calling it via a Sub Process Task, you achieve **better clarity, reusability, and easier maintenance**.

***

### Sub Process Node Configuration Overview

The Sub Process Task configuration panel contains **three tabs**, each responsible for a specific aspect of configuration:

1. **General**
2. **Business Object**
3. **Subprocess**

Each tab is described below.

***

### General Tab

The **General** tab contains basic metadata for the Sub Process Task, such as:

* Task name (title)
* Task ID
* Description

These properties help identify and document the purpose of the task within the process flow.

> Remember to click **Save Panel** to persist any changes.

***

### Business Object Tab

The **Business Object** tab is used to configure and map **input and output parameters** between:

* The main process
* The called sub process

This mapping ensures that:

* Required data is passed into the sub process
* Results are returned to the main process after execution

Business Object mapping is essential when the sub process depends on or modifies process data.

***

### Subprocess Tab

The **Subprocess** tab is used to select and configure the process that will be invoked.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FdQC017mbaFHXKYwtQrYW%2F1?alt=media" alt=""><figcaption></figcaption></figure>

#### Subprocess Properties

| Property     | Mandatory | Default | Description                                     |
| ------------ | --------- | ------- | ----------------------------------------------- |
| Process Name | Yes       | —       | Name of the process to be used as a sub process |

#### Available Actions

* **Open Subprocess**\
  Opens the selected sub process for viewing or editing.
* **Open Mapping Parameter**\
  Opens the **Mapping Parameter** screen to configure:

  * Input parameter mapping
  * Output parameter mapping

  From the mapping screen:

  * Click **Mapping Parameter Input** to map data passed *into* the sub process
  * Click **Mapping Parameter Output** to map data returned *from* the sub process

> **Important**\
> Click **Save Panel** after completing configuration in this tab.

***

### Best Practices

* Use Sub Process Tasks to avoid duplicating logic
* Define clear input/output parameters for sub processes
* Keep sub processes focused on a single responsibility
* Reuse sub processes across multiple workflows where applicable

***

### Summary

The **Sub Process Task** enables structured, reusable workflow design in ONEWEB.

Key points:

* Calls another process from within a main process
* Improves modularity and clarity
* Supports full input and output parameter mapping
* Encourages reuse of common business logic
* Essential for scalable and maintainable process architectures

Using Sub Process Tasks effectively helps build **clean, reusable, and production‑ready business processes**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/designer-reference/process-designer/process-designer-component/activity-nodes/sub-process-task.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
