# Microflow Designer

**Microflow Designer** is a design tool in the ONEWEB platform used to create and manage **system‑driven logic flows** ⚙️ that execute automatically without direct human interaction.\
It enables developers to define reusable backend logic for validation, data processing, integration 🔌, and automation, while keeping such logic clearly separated from UI design and human‑centric workflows.

Microflows act as the **logic execution layer** of the platform and are commonly used together with **App Designer**, **Page Designer**, and **Process Designer** to complete end‑to‑end business solutions.

***

### Purpose of Microflow Designer

Microflow Designer is designed to support scenarios where:

* Business logic must run **automatically**
* Data needs to be **validated, transformed, or enriched**
* External systems must be **integrated**
* Backend processing is required **before or after user actions**
* Logic must be **reusable across entities, pages, or processes**

Unlike **Process Designer**, which manages **human workflows**, Microflow Designer focuses purely on **automated system execution**.

***

### Role in ONEWEB Architecture

Within the ONEWEB architecture:

* **App Designer** defines data models and Smart Forms
* **Page Designer** defines UI behavior and user interaction
* **Process Designer** manages human tasks and approval flows
* **Microflow Designer** implements backend logic and automation

Microflows serve as a **shared logic layer** that can be invoked by entities, pages, processes, or other microflows, ensuring clean separation of concerns and better maintainability.

***

### Execution & Deployment Model

Microflows designed in Microflow Designer support **two execution and deployment approaches**, providing flexibility based on architectural and operational needs.

#### Embedded Execution Model

In this model, a Microflow is packaged as a **Java JAR** and embedded directly into an existing Java application.\
The microflow executes **in‑process** inside the host application’s JVM and is invoked using Java APIs.

This approach is suitable when:

* Logic must be tightly coupled with the hosting application
* Low‑latency execution is required
* Service exposure over the network is not needed

***

#### Runtime Server Execution Model

In this model, Microflows are deployed to a **Microflow Runtime Server** 🖧 and exposed as service endpoints.\
They are invoked via **REST APIs**, allowing multiple systems to consume the same logic.

This approach is ideal for:

* Shared integration logic across applications
* Service‑oriented or microservices architectures
* Independent scalability and loose coupling

By supporting both execution models, Microflow Designer enables logic to be deployed **either as embedded functionality or as a reusable service**.

***

### Typical Use of Microflows

Microflow Designer is commonly used to implement:

* Data validation rules
* Business rule evaluation
* Calculations and data transformations
* System‑to‑system integration
* External API invocation
* Automated pre‑ and post‑processing logic

Microflows may be triggered from **entity actions**, **page events**, **process steps**, or **other microflows**.

***

### Key Characteristics

* **System‑driven execution** (no human task handling)
* **Reusable and modular logic design**
* **Decoupled from UI layout and navigation**
* **Supports embedded and service‑based execution**
* **Designed for scalability and long‑term maintainability**

***

### Summary

**Microflow Designer** is the ONEWEB design tool for building **automated backend logic**.\
It enables clean separation between business logic, UI, and workflow concerns while supporting flexible deployment models suited for both embedded systems and service‑based architectures.

Used effectively, Microflow Designer helps teams build applications that are **modular, scalable, and easier to maintain**—especially in enterprise‑grade implementations.


---

# 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.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.
