# Process Runtime API

Process runtime จะให้ API ที่โต้ตอบกับ process flow สำหรับคำสั่งมาตรฐานที่จะถูกใช้ในการดำเนินการกระบวนการ ในบทนี้จะสอนเกี่ยวกับ API ทั้งหมดด้วยตัวอย่างที่เข้าใจไม่ยาก ซึ่งจะสอนคุณในการเรียก service และตัวแปรเพื่อควบคุม flow เพื่อที่จะโต้ตอบกับ Process runtime ผู้ใช้งานจำเป็นต้องตั้งค่าเครื่องมือ Client และออกแบบ Process flow

<table data-header-hidden><thead><tr><th width="326.3333333333333"></th><th width="266"></th><th></th></tr></thead><tbody><tr><td>Request </td><td>Description </td><td>HTTP Method </td></tr><tr><td>1. /BPMREST/service/runtime/process/start </td><td>To start the flow. </td><td>POST </td></tr><tr><td>2. /BPMREST/service/runtime/process/[Process Name]/start </td><td>Old API to start flow. It is not recommended. </td><td>POST </td></tr><tr><td>3. /BPMREST/service/runtime/tasks/[Task ID]/claim?user=[User Name] </td><td>To claim a task by user. </td><td>POST </td></tr><tr><td>4. /BPMREST/service/runtime/tasks/[Task ID]/complete?user=[User Name] </td><td>To complete a process by user. </td><td>POST </td></tr><tr><td>5. /BPMREST/service/runtime/instance/[Instance ID]/tasks </td><td>To get task by instance ID. </td><td>GET </td></tr><tr><td>6. /BPMREST/service/runtime/tasks?[group/role/user]=[User Name/Role Name/Group Name] </td><td>To get task by user or role or group name </td><td>GET </td></tr><tr><td>7. /BPMREST/service/runtime/tasks/[Task ID]/variables </td><td>To get Task variables </td><td>POST </td></tr><tr><td>8. /BPMREST/service/runtime/tasks/[Task ID]/assign?user=[User Name]&#x26;user=[User Name1]..&#x26;user=[User Name n] </td><td>To assign task to user/ users </td><td>POST </td></tr><tr><td>9. /BPMREST/service/runtime/instance/[Instance ID]/tasks/assign?user=[User Name] </td><td>To assign instance to user </td><td>POST </td></tr><tr><td>10. /BPMREST/service/runtime/refreshCache </td><td>To refresh cache for all process </td><td>POST </td></tr><tr><td>11. /BPMREST/service/runtime/classAction </td><td>To refresh cache for a specific process  </td><td>POST </td></tr></tbody></table>


---

# 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.oneweb.tech/oneweb/th/api/process-runtime-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.
