# Export Your Microflow

Once you complete designing and validating a **Microflow**, you can export it for use in a **runtime environment**.\
Exporting a Microflow allows it to be executed outside the design environment, either as part of another application or as an independent service.

ONEWEB supports **two export modes** for Microflows, each designed for a different deployment and integration scenario.

***

### Microflow Export Modes

A Microflow can be exported in one of the following modes:

* **Embedded Mode**
* **Standalone Server Mode**

The **exported artifacts and usage patterns differ** between these two modes.\
Selecting the appropriate mode depends on how and where the Microflow will be consumed.

***

#### Embedded Mode

In **Embedded Mode**, a Microflow is exported as a **library component** that can be embedded into another application.

Key characteristics:

* The Microflow is packaged as a **JAR file**
* The JAR can be imported into an existing **Java application**
* The Microflow is executed using **Java APIs**
* The Microflow runs **inside the host application’s JVM**

This mode is suitable when:

* Integration logic must be tightly coupled with an existing Java system
* A standalone service is not required
* Low‑latency, in‑process execution is preferred

***

#### Standalone Server Mode

In **Standalone Server Mode**, a Microflow is deployed and executed as an **independent service**.

Key characteristics:

* The Microflow is deployed to the **Microflow Runtime Server**
* It runs as a **standalone service**
* External systems can invoke it through **REST APIs**
* The Microflow can scale independently from consuming applications

This mode is suitable when:

* The Microflow must be shared across multiple applications
* Service‑oriented or microservices architecture is required
* External systems need to consume the Microflow via HTTP APIs

***

### Differences Between Export Modes

| Aspect           | Embedded Mode                | Standalone Server Mode       |
| ---------------- | ---------------------------- | ---------------------------- |
| Deployment       | Embedded in Java application | Deployed to Runtime Server   |
| Access Method    | Java API                     | REST API                     |
| Execution        | In‑process                   | Remote service               |
| Scalability      | Coupled with host app        | Independently scalable       |
| Typical Use Case | Internal Java integration    | System‑to‑system integration |

***

### Choosing the Right Export Mode

Use **Embedded Mode** when:

* You control the host Java application
* Tight integration and performance are priorities
* No service exposure is required

Use **Standalone Server Mode** when:

* The Microflow must act as a reusable service
* Multiple systems need to consume the integration
* Loose coupling and scalability are important

Choosing the right export mode ensures that the Microflow fits properly into the overall application architecture.

***

### Summary

Exporting a Microflow is the final step required to move from **design and simulation** to **runtime execution**.

ONEWEB provides two flexible export options:

* **Embedded Mode** for in‑process Java integration
* **Standalone Server Mode** for service‑based integration

In the next sections, we will explore **how to export and deploy Microflows** in each mode and how to use them in real environments.


---

# 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/oneweb-platform-th/designer-reference/microflow-designer/start-with-microflow-in-oneweb/export-your-microflow.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.
