# Process Designer

In an enterprise application, handling **business workflows** is just as important as managing data and screens.\
The **Process Designer** in ONEWEB is used to define and control the **order process lifecycle**, ensuring that order requests move through the correct stages, roles, and approval rules.

In the **Order Management App (Web)**, Process Designer is responsible for orchestrating the complete workflow—from request submission, through review and approval, to final purchase processing.

***

### Purpose of Process Designer

Process Designer allows developers to:

* Define structured **business workflows**
* Coordinate activities between different user roles
* Control decision paths based on business rules
* Integrate human interactions with automated actions
* Ensure consistency and traceability throughout the process lifecycle

Instead of relying on manual decision handling, the workflow logic is centralized and visually modeled using Process Designer.

***

### Process Designer in the Context of Order Management App

In the Order Management App, Process Designer is used to manage:

* **Order submission** by Requester
* **Validation and preparation** by Back Office
* **Approval decision routing** (Admin, Authorize, and other approvers)
* **Conditional flow** based on total amount thresholds (e.g. max cap)
* **Final processing** by Admin PO

Each step in the process corresponds to a specific role and screen created earlier using **App Designer**.

***

### Key Workflow Capabilities Demonstrated

The Order Management process uses several core Process Designer components:

* **Start Events**\
  Used to initiate the workflow when a Requester submits an order request.
* **Human Activities**\
  Represent user tasks such as review, approval, and decision‑making.
* **Database Activities**\
  Used to retrieve or update order data at different stages.
* **Exclusive Gateways**\
  Control conditional routing (e.g. approval vs rejection, escalation when amount exceeds cap).
* **End Events**\
  Used to complete the workflow once processing or purchasing is finished.

These elements work together to create a controlled and auditable business process.

***

### Relationship Between Process Designer and App Designer

In the Order Management App:

* **App Designer** focuses on:
  * Screen creation
  * Data entry and display
  * User interaction
  * Validation and calculation at UI level
* **Process Designer** focuses on:
  * Workflow orchestration
  * Task assignment by role
  * Process progression and routing logic
  * Integration with Process Buttons (Start / Complete)

The two designers are tightly integrated.\
Actions performed in App Designer (such as clicking **Submit**) directly trigger transitions in Process Designer workflows.

***

### What You Will Learn in This Section

In the following sub‑sections, you will learn how to:

* Create an Order Request process flow
* Define start and end points of the process
* Configure human activities for each role
* Use decision gateways to control flow logic
* Integrate Process Designer with App Designer buttons

Each example will build upon the entities and screens created earlier in the tutorial.

***

### Summary

**Process Designer** is a core component for building **process‑driven enterprise applications** in ONEWEB.

In the Order Management App (Web), it ensures that:

* Every order follows a predefined business flow
* Responsibilities are clearly assigned to each role
* Decisions are handled consistently and transparently
* The entire lifecycle is automated and traceable

In the next sections, you will begin creating the **Order Management workflow step by step** using **Process Designer**, starting from the request submission flow.


---

# 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/tutorials-examples/order-management-app-web/process-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.
