# Process Runtime REST API

The **Process Runtime REST API** provides a set of RESTful services that allow external systems to **control, navigate, and interact with Process Flows** in ONEWEB.

These APIs enable client applications to:

* Start process instances
* Claim and complete user tasks
* Assign tasks to users or groups
* Retrieve tasks and process variables
* Manage runtime cache

All communication between external systems and the Process Runtime occurs over **HTTP/HTTPS**, making it suitable for system‑to‑system integration.

***

### Purpose of Process Runtime REST API

The Process Runtime REST APIs are designed to:

* Enable **external orchestration of business processes**
* Allow non‑ONEWEB applications to participate in workflows
* Support task‑based interactions (human tasks)
* Integrate BPM processes with external frontends or systems
* Provide runtime visibility into process execution

Typical use cases include:

* Custom task inbox applications
* Mobile or web clients interacting with workflow tasks
* External systems starting or completing business processes
* Automated orchestration across multiple systems

***

### Process Runtime REST API Endpoints

The table below lists the main REST API endpoints available for controlling and managing Process Flows at runtime.

| #  | Request Endpoint                                                                | Description                                     | HTTP Method |
| -- | ------------------------------------------------------------------------------- | ----------------------------------------------- | ----------- |
| 1  | `/BPMREST/service/runtime/process/start`                                        | Start a new process instance                    | **POST**    |
| 2  | `/BPMREST/service/runtime/process/[Process Name]/start`                         | Legacy API to start a process (not recommended) | **POST**    |
| 3  | `/BPMREST/service/runtime/tasks/[Task ID]/claim?user=[User Name]`               | Claim a task for a specific user                | **POST**    |
| 4  | `/BPMREST/service/runtime/tasks/[Task ID]/complete?user=[User Name]`            | Complete a task on behalf of a user             | **POST**    |
| 5  | `/BPMREST/service/runtime/instance/[Instance ID]/tasks`                         | Retrieve tasks for a given process instance     | **GET**     |
| 6  | `/BPMREST/service/runtime/tasks?[group/role/user]=[Name]`                       | Retrieve tasks by user, role, or group          | **GET**     |
| 7  | `/BPMREST/service/runtime/tasks/[Task ID]/variables`                            | Retrieve variables associated with a task       | **POST**    |
| 8  | `/BPMREST/service/runtime/tasks/[Task ID]/assign?user=[User1]&user=[User2]...`  | Assign a task to one or more users              | **POST**    |
| 9  | `/BPMREST/service/runtime/instance/[Instance ID]/tasks/assign?user=[User Name]` | Assign all tasks of an instance to a user       | **POST**    |
| 10 | `/BPMREST/service/runtime/refreshCache`                                         | Refresh cache for all process definitions       | **POST**    |
| 11 | `/BPMREST/service/runtime/classAction`                                          | Refresh cache for a specific process            | **POST**    |

***

### Common Integration Scenarios

Using Process Runtime REST APIs, external systems can:

* Trigger process execution from backend systems
* Build custom workflow UIs without using ONEWEB UI
* Synchronize human task execution with external applications
* Manage task ownership dynamically
* Monitor and coordinate long‑running business processes

***

### Notes on API Usage

* Endpoint parameters such as **Process Name**, **Task ID**, and **Instance ID** must match runtime values
* Authentication and authorization depend on Process Runtime security setup
* The **legacy start process API** is still available but should not be used in new implementations
* Cache refresh APIs should be used carefully in production environments

***

### Additional Documentation

For full API details, request/response formats, parameters, and examples, please refer to the official API guide:

> **Process Runtime API – Full Reference**\
> <https://docs.oneweb.tech/oneweb/api-guide/process-runtime-api/list-all-methods-of-rest-api-and-explain-the-api-functionality>

***

### Summary

The **Process Runtime REST API** enables external systems to directly interact with and control **business processes** running in ONEWEB.

With these APIs, developers can:

* Start and manage process instances
* Claim, assign, and complete human tasks
* Retrieve runtime tasks and variables
* Integrate BPM workflows with external systems

Process Runtime REST APIs are essential for building **workflow‑driven, system‑to‑system, and enterprise‑scale integrations** using ONEWEB.


---

# 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/building-apps/integrations/process-runtime-rest-api.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.
