From 406bcaea08eda7d5bb757e35121f58312a3babd5 Mon Sep 17 00:00:00 2001 From: Md Afiq Iskandar Date: Wed, 16 Jul 2025 08:39:36 +0800 Subject: [PATCH] Enhance Workflow Execution with Notification and Decision Node Features - Added support for notification nodes in the workflow execution process, allowing users to send notifications with customizable messages and recipients. - Implemented decision and gateway nodes to facilitate user interaction and automatic condition evaluation, enhancing workflow flexibility. - Updated the execution logic to handle multiple paths based on user decisions or automatic evaluations, improving user experience during workflow execution. - Enhanced the HTML content handling to support dynamic variable interpolation, allowing for more personalized content display in HTML nodes. - Introduced debugging features for variable mapping and field conditions, aiding developers in understanding and troubleshooting workflow behavior. --- .../process-builder/processDefinition.json | 57 ++- pages/workflow/[id].vue | 448 +++++++++++++++++- 2 files changed, 477 insertions(+), 28 deletions(-) diff --git a/docs/json/process-builder/processDefinition.json b/docs/json/process-builder/processDefinition.json index 0530013..ce2cff4 100644 --- a/docs/json/process-builder/processDefinition.json +++ b/docs/json/process-builder/processDefinition.json @@ -54,6 +54,28 @@ "animated": true, "sourceHandle": "html-1752550500000-right", "targetHandle": "end-1752546716111-left" + }, + { + "id": "html-1752550500000-notification-1752621850786-1752621852927", + "data": {}, + "type": "custom", + "label": "", + "source": "html-1752550500000", + "target": "notification-1752621850786", + "animated": true, + "sourceHandle": "html-1752550500000-bottom", + "targetHandle": "notification-1752621850786-left" + }, + { + "id": "notification-1752621850786-end-1752546716111-1752621856004", + "data": {}, + "type": "custom", + "label": "", + "source": "notification-1752621850786", + "target": "end-1752546716111", + "animated": true, + "sourceHandle": "notification-1752621850786-right", + "targetHandle": "end-1752546716111-left" } ], "nodes": [ @@ -131,7 +153,7 @@ }, "type": "script", "label": "Script Task", - "position": { "x": 1200, "y": 330 } + "position": { "x": 1185, "y": 330 } }, { "id": "html-1752550500000", @@ -148,12 +170,37 @@ }, "type": "html", "label": "Show Result", - "position": { "x": 1560, "y": 105 } + "position": { "x": 1425, "y": 75 } + }, + { + "id": "notification-1752621850786", + "data": { + "label": "Notification", + "message": "This is the notification", + "subject": "This is the notification", + "priority": "medium", + "expiration": { "unit": "hours", "value": 24, "enabled": false }, + "description": "Send notification to users", + "htmlMessage": "", + "messageFormat": "text", + "recipientRole": "", + "recipientType": "email", + "recipientUser": "", + "recipientEmail": "mdafiqiskandar@gmail.com", + "recipientGroup": "", + "deliveryOptions": { "sms": false, "email": false, "inApp": true }, + "richTextMessage": "", + "notificationType": "info", + "recipientVariable": "" + }, + "type": "notification", + "label": "Notification", + "position": { "x": 1590, "y": 360 } } ], "viewport": { - "x": -660.4278622401489, - "y": 202.3364877443377, - "zoom": 0.8153893887682282 + "x": -572.7398904538663, + "y": 253.200827139402, + "zoom": 0.8444612090080732 } } diff --git a/pages/workflow/[id].vue b/pages/workflow/[id].vue index ca1534a..7040ef8 100644 --- a/pages/workflow/[id].vue +++ b/pages/workflow/[id].vue @@ -1,5 +1,5 @@