- 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.
207 lines
6.5 KiB
JSON
207 lines
6.5 KiB
JSON
{
|
|
"edges": [
|
|
{
|
|
"id": "start-1752546699787-form-1752546702226-1752546704356",
|
|
"data": {},
|
|
"type": "custom",
|
|
"label": "",
|
|
"source": "start-1752546699787",
|
|
"target": "form-1752546702226",
|
|
"animated": true,
|
|
"sourceHandle": "start-1752546699787-right",
|
|
"targetHandle": "form-1752546702226-left"
|
|
},
|
|
{
|
|
"id": "form-1752546702226-api-1752550319410-1752550321449",
|
|
"data": {},
|
|
"type": "custom",
|
|
"label": "",
|
|
"source": "form-1752546702226",
|
|
"target": "api-1752550319410",
|
|
"animated": true,
|
|
"sourceHandle": "form-1752546702226-right",
|
|
"targetHandle": "api-1752550319410-left"
|
|
},
|
|
{
|
|
"id": "api-1752550319410-script-1752550430989-1752550433556",
|
|
"data": {},
|
|
"type": "custom",
|
|
"label": "",
|
|
"source": "api-1752550319410",
|
|
"target": "script-1752550430989",
|
|
"animated": true,
|
|
"sourceHandle": "api-1752550319410-right",
|
|
"targetHandle": "script-1752550430989-left"
|
|
},
|
|
{
|
|
"id": "script-1752550430989-html-1752550500000",
|
|
"data": {},
|
|
"type": "custom",
|
|
"label": "",
|
|
"source": "script-1752550430989",
|
|
"target": "html-1752550500000",
|
|
"animated": true,
|
|
"sourceHandle": "script-1752550430989-right",
|
|
"targetHandle": "html-1752550500000-left"
|
|
},
|
|
{
|
|
"id": "html-1752550500000-end-1752546716111-1752550899936",
|
|
"data": {},
|
|
"type": "custom",
|
|
"label": "",
|
|
"source": "html-1752550500000",
|
|
"target": "end-1752546716111",
|
|
"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": [
|
|
{
|
|
"id": "start-1752546699787",
|
|
"data": { "label": "Start", "description": "Process start point" },
|
|
"type": "start",
|
|
"label": "Start",
|
|
"position": { "x": 270, "y": 345 }
|
|
},
|
|
{
|
|
"id": "form-1752546702226",
|
|
"data": {
|
|
"label": "Pilihan Kategori Asnaf",
|
|
"formId": 7,
|
|
"formName": "Pilihan Kategori Asnaf",
|
|
"formUuid": "d3612e05-b31a-46dc-b5e5-67e6c5bd3e78",
|
|
"description": "Form: Pilihan Kategori Asnaf",
|
|
"assignedRoles": [
|
|
{ "label": "Pemohon", "value": "2", "description": "" }
|
|
],
|
|
"assignedUsers": [],
|
|
"inputMappings": [],
|
|
"assignmentType": "roles",
|
|
"outputMappings": [
|
|
{ "formField": "kategori_asnaf", "processVariable": "kategoriAsnaf" }
|
|
],
|
|
"fieldConditions": [],
|
|
"assignmentVariable": "",
|
|
"assignmentVariableType": "user_id"
|
|
},
|
|
"type": "form",
|
|
"label": "Pilihan Kategori Asnaf",
|
|
"position": { "x": 540, "y": 330 }
|
|
},
|
|
{
|
|
"id": "end-1752546716111",
|
|
"data": { "label": "End", "description": "Process end point" },
|
|
"type": "end",
|
|
"label": "End",
|
|
"position": { "x": 1890, "y": 135 }
|
|
},
|
|
{
|
|
"id": "api-1752550319410",
|
|
"data": {
|
|
"label": "API Call",
|
|
"apiUrl": "https://jsonplaceholder.typicode.com/todos/1",
|
|
"headers": "{ \"Content-Type\": \"application/json\" }",
|
|
"apiMethod": "GET",
|
|
"description": "External API call",
|
|
"requestBody": "",
|
|
"errorVariable": "apiError",
|
|
"outputVariable": "apiResponse",
|
|
"continueOnError": false
|
|
},
|
|
"type": "api",
|
|
"label": "API Call",
|
|
"position": { "x": 855, "y": 345 }
|
|
},
|
|
{
|
|
"id": "script-1752550430989",
|
|
"data": {
|
|
"label": "Script Task",
|
|
"scriptCode": "// Assign API response title to process variable\nprocessVariables.todoTitle = processVariables.apiResponse?.title || '';\n// You can add more logic here\n",
|
|
"description": "Execute JavaScript code",
|
|
"inputVariables": ["apiResponse"],
|
|
"scriptLanguage": "javascript",
|
|
"outputVariables": [
|
|
{
|
|
"name": "todoTitle",
|
|
"type": "string",
|
|
"description": "Title from API response"
|
|
}
|
|
]
|
|
},
|
|
"type": "script",
|
|
"label": "Script Task",
|
|
"position": { "x": 1185, "y": 330 }
|
|
},
|
|
{
|
|
"id": "html-1752550500000",
|
|
"data": {
|
|
"label": "Show Result",
|
|
"jsCode": "",
|
|
"cssCode": ".result-card { background: #f9fafb; border: 1px solid #ddd; border-radius: 8px; padding: 16px; max-width: 400px; margin: 24px auto; }",
|
|
"htmlCode": "<div class='result-card'>\n <h2>API Result</h2>\n <p>Todo Title: <strong>{{ processVariables.todoTitle }}</strong></p>\n</div>",
|
|
"autoRefresh": true,
|
|
"description": "Display the todo title from API",
|
|
"inputVariables": ["todoTitle"],
|
|
"outputVariables": [],
|
|
"allowVariableAccess": true
|
|
},
|
|
"type": "html",
|
|
"label": "Show Result",
|
|
"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": -572.7398904538663,
|
|
"y": 253.200827139402,
|
|
"zoom": 0.8444612090080732
|
|
}
|
|
}
|