# Validation Node

The **Validation Node** is a built‑in **Custom Extension** provided by ONEWEB that enables developers to **validate data within Business Objects (BO)** during the execution of **Microflows** or **Process Flows**.\
This node helps ensure **data quality, completeness, and correctness** before data is processed further, persisted, or sent to external systems.

By centralizing validation logic in a dedicated node, ONEWEB helps reduce duplicated checks and improves the consistency of integration and workflow behavior.

***

### Purpose of Validation Node

The Validation Node is designed to:

* Validate one or more Business Objects against defined rules
* Enforce data quality consistently across integration flows
* Prevent invalid or incomplete data from propagating through the system
* Produce structured and reusable validation error messages
* Reduce duplication of validation logic across Microflows and Processes

#### Typical Use Cases

* Validating user input before database insert or update operations
* Ensuring mandatory fields exist before invoking external services
* Validating batch or imported data (for example, data read from Excel files)

***

### Installing the Validation Node Extension

Before the Validation Node can be used, the extension must be **installed and enabled** in the application.

To install the extension:

* Follow the steps described in **Section 6.4.16 – Custom Extensions**
* Install and enable the **Validation Node** extension for the target application

Once installed:

* The Validation Node appears in the **diagram palette**
* It can be used like any other standard activity node in Microflow or Process Designer

<figure><img src="/files/KgSXouaxeCkzI4MtlNAP" alt=""><figcaption></figcaption></figure>

***

### Configuring Validation Rules

Validation behavior is defined through the **Extension Properties** of the Validation Node.\
Multiple validation conditions can be configured and evaluated together.

#### Logical Operators

The Validation Node supports two logical operators for evaluating multiple rules:

* **AND**\
  All validation conditions must be satisfied for the validation to pass
* **OR**\
  Validation passes if at least one condition is satisfied

The selected operator determines how validation rules are combined and evaluated during execution.

Validation results—including error messages—are produced as **structured output**, which can be consumed by downstream logic.

<figure><img src="/files/HunYl4q1TSWcJ2ewBu1K" alt=""><figcaption></figcaption></figure>

***

### Input Mapping (Business Objects)

All Business Objects that require validation must be mapped as **input** to the Validation Node.

Input configuration allows developers to:

* Select one or more Business Objects for validation
* Map existing Business Objects using lookup functionality
* Validate multiple Business Objects within a single node execution

This enables centralized validation across complex data models.

<figure><img src="/files/GeKgB2QP11egkQrrKK4K" alt=""><figcaption></figcaption></figure>

***

### Output Mapping (Validation Messages)

The Validation Node produces **structured validation output**, which can be mapped and consumed in different ways.

Validation results can be:

* Mapped to output Business Objects
* Evaluated using a **Gateway Node**
* Returned to UI components (Smart Form or Page Designer)
* Logged or persisted for audit and tracking purposes

This makes validation feedback easy to integrate into both backend logic and user‑facing flows.

<figure><img src="/files/RkrWjX91UEh25TgX28XP" alt=""><figcaption></figcaption></figure>

***

### Using Validation Results in Flow Logic

Validation output can be integrated into flow logic using common patterns, such as:

* Branching execution paths using a Gateway Node
* Stopping further processing when validation fails
* Returning validation messages directly to the UI
* Combining validation with Error or Timer handling

The Validation Node integrates seamlessly with both **Microflow** and **Process Flow** execution models.

***

### Best Practices

To ensure clear and reliable validation behavior:

* Perform validation early in the flow execution
* Keep validation rules focused and easy to understand
* Use the Validation Node instead of duplicating validation logic across multiple nodes
* Always map and handle validation output messages
* Separate validation concerns from core business processing logic

Following these practices improves maintainability and reduces unexpected runtime failures.

***

### Summary

The **Validation Node** is a built‑in Custom Extension that enables **structured, reusable, and centralized data validation** in ONEWEB.

With the Validation Node, developers can:

* Validate one or more Business Objects in a single node
* Apply **AND / OR** logical evaluation of rules
* Produce consistent and structured validation feedback
* Control flow execution based on validation results

The Validation Node is an essential component for building **robust, reliable, and enterprise‑grade integration workflows** using **ONEWEB Microflow Designer** and **Process Designer**.


---

# 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/validation-node.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.
