# Simulate Your Flow

After completing and successfully validating a Microflow, it is recommended to **test the flow logic before deploying it** to a real environment.\
ONEWEB provides a built‑in **Simulator Utility** that allows users to execute Microflows with sample input data and inspect the output.

Simulation helps verify that:

* The flow executes correctly
* Parameter mapping works as expected
* Business Objects are handled properly
* Integration logic returns the correct results

***

### Access the Simulator Utility

To simulate a Microflow:

1. Open the Microflow in **Microflow Designer**
2. Navigate to the **Simulation Test** tab

The Simulation Test screen displays:

* The **Flow Diagram** (read‑only view)
* An **Input panel** containing the **Input Business Object (BO)** in JSON format
* An **Output panel** to show the result returned by the Microflow

***

### Run a Simulation

#### Step 1: Update Input Parameters

In the **Input BO JSON editor**:

* Modify the input parameter values
* Enter realistic or test values that match your use case

These values are passed as input to the Microflow when the simulation starts.

#### Step 2: Start the Simulation

1. Click the **Start** button
2. ONEWEB executes the Microflow using the provided input values

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F1CMBDx9Uf8EYbfjgmskB%2Fimage.png?alt=media&#x26;token=58cb4c5a-58fc-4e2d-80c7-6b376e67d1f8" alt=""><figcaption></figcaption></figure>

***

### View Simulation Results

Once the execution completes:

* The output returned from the Microflow is displayed in the **Output panel**
* Output values are shown in JSON format, based on the defined **Output Business Object**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FxjuPTXCRbEl7q3zPQoMi%2Fimage.png?alt=media&#x26;token=5949a7a6-1bdd-4433-8188-b7804ed9444d" alt=""><figcaption></figcaption></figure>

This allows users to confirm:

* Correct data retrieval or transformation
* Correct integration behavior
* Proper output structure and values

***

### Retest and Refresh Cache

#### When to Refresh Cache

If you:

* Modify the flow logic
* Change Business Objects
* Update parameters or mappings

You must click **Refresh Cache** to reload the updated Microflow definition into the simulator.

#### Retest the Flow

* Click **Retest** to execute the Microflow again
* Use new input values without leaving the simulation screen

This enables rapid iteration and validation during development.

***

### Best Practices for Simulation

* Always simulate a Microflow before deployment
* Test multiple input scenarios, including edge cases
* Verify both success and error paths
* Refresh cache after any structural changes
* Use simulation to validate integration logic early

Simulation reduces runtime errors and increases confidence before deploying to production environments.

***

### Summary

The **Simulator Utility** in ONEWEB allows developers to test Microflows interactively before deployment.

Using the Simulation Test feature, users can:

* Execute Microflows with sample input data
* Verify parameter mapping and business logic
* Inspect output data in real time
* Retest and refine the flow iteratively

Simulation is a critical step in building **reliable, predictable, and production‑ready integration services** using ONEWEB Microflow.


---

# 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/microflow-designer/start-with-microflow-in-oneweb/simulate-your-flow.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.
