# Java Task

ใช้ **Java** **Task** เพื่อเรียกใช้  java functions แบบกำหนดเอง

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

### วัตถุประสงค์&#x20;

**Java Task** ใช้เพื่อเรียกและรันโค้ด Java ที่กําหนดโดยผู้ใช้ Java node task เป็นสิ่งจําเป็นเมื่อผู้ใช้ต้องการใช้โค้ด Java ภายใน business process เพื่อให้บรรลุผู้ใช้นี้สามารถสร้างวิธีการ Java ส่งออกคลาส Java ที่สอดคล้องกันไปยังไฟล์ Jar จากนั้นอัปโหลดไฟล์ Jar นี้ไปยัง **Java Node Task** เพื่อดําเนินการเมธอด Java ในระหว่าง business process คุณสามารถอัปโหลดไฟล์ jar ใด ๆ และเรียกฟังก์ชันจากไฟล์ jar นั้นโดยใช้ Java Task

### คุณสมบัติ&#x20;

Java Node Configuration panel มี 3 แท็บเพื่อกําหนดคุณสมบัติ

#### **General**

แท็บ General ประกอบด้วยข้อมูลทั่วไป เช่น title, task id, description etc.

#### **Business Object**

ใช้เพื่อกำหนดค่าและแมป **Business Object** สำหรับอินพุตและเอาต์พุตสำหรับโหนด

**Java Parameter**

<div align="left"><figure><img src="/files/QUqwfpa9THIz5riGN9ZY" alt=""><figcaption></figcaption></figure></div>

| **Property** | **Mandatory** | **Default** | **Description**                                                                                                                                                 |
| ------------ | ------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Jar Name     | Y             |             | ไฟล์ jar สามารถตั้งค่าได้โดยคลิกที่ปุ่มเลือก Jar และเลือกไฟล์ jar โดยใช้เบราว์เซอร์โฟลเดอร์ อีกทางเลือกหนึ่งผู้ใช้สามารถเลือกจากรายการไฟล์ jar ที่มีอยู่เช่นกัน |
| Class Name   | Y             |             | ชื่อคลาสที่มีคุณสมบัติครบถ้วน ระบบจะแสดงคลาสที่มีอยู่ทั้งหมดจาก jar เมื่อคลิกปุ่ม "Get Class Name" จากนั้นผู้ใช้สามารถเลือกค่าจากรายการ                         |
| Method Name  | Y             |             | method เรียกจาก class  ระบบจะแสดง method ที่มีสิทธิ์ทั้งหมดจาก class ที่เลือก ผู้ใช้สามารถเลือก method จากรายการ                                                |

ในแท็บ Java Parameter ปุ่ม "**Choose** **Jar"** ใช้สำหรับอัปโหลดไฟล์ **Jar** และปุ่ม "**Get Class Name"** ใช้สำหรับเรียก class name จาก Jar file


---

# 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/onewb/process/process-1/process-activity/java-task.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.
