Table of Contents |
---|
English |
---|
In this tutorial, we will follow the guideline for developing a plugin to develop our Slack Webhook Tool plugin. Please also refer to the very first tutorial How to develop a Bean Shell Hash Variable for more details steps. |
Thai |
---|
ในบทช่วยสอนนี้เราจะทำตาม guideline for developing a plugin เพื่อพัฒนาปลั๊กอิน Slack Webhook Tool ของเรา โปรดอ้างอิงถึง How to develop a Bean Shell Hash Variable สำหรับขั้นตอนรายละเอียดเพิ่มเติม |
...
We need to always have our Joget Workflow Source Code ready and builded built by following following this guideline.
The following tutorial is prepared with a Macbook Pro and the Joget Source Code is version 58.0.1-Snapshot. Please refer to the the Guideline for developing Developing a pluginPlugin article for other platform commands.
...
Thai |
---|
เราจำเป็นต้องให้ซอร์สโค้ด Joget Workflow ของเราพร้อมและสร้างโดยปฏิบัติตาม this guideline บทช่วยสอนต่อไปนี้จัดทำขึ้นด้วย Macbook Pro และรหัสแหล่งที่มาของ Joget เป็นรุ่น 58.0.1 โปรดอ้างอิง -Snapshot โปรดอ้างอิง Guideline for developing Developing a pluginPlugin สำหรับคำสั่งแพลตฟอร์มอื่น ๆ สมมติว่าไดเรกทอรีโฟลเดอร์ของเรามีดังนี้ |
Code Block |
---|
- Home
- joget
- plugins
- jw-community
-5.0.1 |
The "plugins" directory is the folder we will create and store all our plugins and the "jw-community" directory is where the Joget Workflow Source code is stored.
...
Code Block | ||
---|---|---|
| ||
cd joget/plugins/ ~/joget/jw-community/5.0.1/wflow-plugin-archetype/create-plugin.sh org.joget slack_webhook 58.0.1-Snapshot |
Then, the shell script will ask us to key in a version number for the plugin and ask us for a confirmation before it generates the maven project.
...
Code Block | ||
---|---|---|
| ||
Define value for property 'version': 1.0-SNAPSHOT: : 58.0.0-Snapshot [INFO] Using property: package = org.joget Confirm properties configuration: groupId: org.joget artifactId: slack_webhook version: 5.0.0 package: org.joget Y: : y |
...
After completing the properties option to collect input, we can work on the main methods method of the plugin which is execute methodexecuted method.
Thai |
---|
หลังจากเสร็จสิ้นตัวเลือกคุณสมบัติเพื่อรวบรวมอินพุตเราสามารถทำงานกับวิธีการหลักของปลั๊กอินซึ่งเป็นวิธีการดำเนินการ |
...
In our plugin properties, we have a button to send a test message. Let's implement the webService method to provide an API to send a test message.
Thai |
---|
ในคุณสมบัติปลั๊กอินของเราเรามีปุ่มสำหรับส่งข้อความทดสอบ ให้ใช้วิธีการ webService เพื่อจัดทำ API เพื่อส่งข้อความทดสอบ |
...
Then, let's upload the plugin jar to Manage Plugins. After After uploading the jar file, double-check that the plugin is uploaded and activated correctly.
Thai |
---|
มาสร้างปลั๊กอินของเรากัน เมื่อกระบวนการสร้างเสร็จสิ้นเราจะพบไฟล์ "slack_webhook-5.0.0.jar" ที่สร้างขึ้นภายใต้ไดเรกทอรี "slack_webhook / target" จากนั้นลองอัปโหลดปลั๊กอินไปที่ Manage Plugins หลังจากอัปโหลดไฟล์ jar ให้ตรวจสอบอีกครั้งว่ามีการอัปโหลดและเปิดใช้งานปลั๊กอินอย่างถูกต้อง |
Check the Slack Webhook Tool is available in process tool mapping.
Thai |
---|
ตรวจสอบว่า Slack Webhook Tool พร้อมใช้งานในการแมปเครื่องมือกระบวนการ |
Now, let us configure the Incoming Webhooks in Slack platform.
...
Go to your_team.slack.com/services/new.
Thai ไปที่ your_team.slack.com/services/new Search for Incoming WebHook and click in
Add
Thai ค้นหา WebHook ที่เข้ามาและคลิกที่ Add
Choose Channel to Post and press
Add Incoming WebHooks Integration
Thai เลือกช่องทางที่จะโพสต์และกดเพิ่มการผนวก WebHooks
Into Setup Instructions, you 've have a WebHook URL. This is the argument will use for the "Webhook URL" later. Then, copy it.
Thai ในคำแนะนำในการตั้งค่าคุณคือ URL ของ WebHook นี่คืออาร์กิวเมนต์ที่จะใช้สำหรับ "Webhook URL" ในภายหลัง จากนั้นคัดลอก
...
Thai |
---|
กำหนดค่า Slack Webhook Tool |
The message is received in Slack.
...
To download the ready-to-use plugin jar, please find it in Slack Webhook at http://marketplace.joget.org/. (Coming Soon)
Thai |
---|
คุณสามารถดาวน์โหลดซอร์สโค้ดจาก slack_webhook_src.zip หากต้องการดาวน์โหลด jar ปลั๊กอินที่พร้อมใช้งานโปรดค้นหาได้ที่ http://marketplace.joget.org/ (เร็ว ๆ นี้) |
...