- Introduced new components: ArrowEdge, CustomEdge, InteractiveArrowEdge, and EdgeConfiguration for enhanced edge management in the process flow. - Implemented dynamic edge paths with customizable styles, labels, and animations, improving visual representation and user interaction. - Enhanced ProcessFlowCanvas to support new edge types and configurations, allowing for more flexible process designs. - Updated ProcessFlowNodes to include new edge components, ensuring seamless integration with existing node functionalities. - Improved user experience by providing configuration options for edges, including animation and style settings, directly within the process builder.
1618 lines
62 KiB
JSON
1618 lines
62 KiB
JSON
{
|
|
"edges": [
|
|
{
|
|
"id": "start-1751870920411-form-1752471000000-1752110219601",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "start-1751870920411",
|
|
"target": "form-1752471000000",
|
|
"animated": true,
|
|
"sourceHandle": "start-1751870920411-right",
|
|
"targetHandle": "form-1752471000000-left"
|
|
},
|
|
{
|
|
"id": "form-1752471000000-api-1752471000010-1752110221444",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "form-1752471000000",
|
|
"target": "api-1752471000010",
|
|
"animated": true,
|
|
"sourceHandle": "form-1752471000000-bottom",
|
|
"targetHandle": "api-1752471000010-top"
|
|
},
|
|
{
|
|
"id": "api-1752471000010-script-1752471000020-1752110222889",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "api-1752471000010",
|
|
"target": "script-1752471000020",
|
|
"animated": true,
|
|
"sourceHandle": "api-1752471000010-right",
|
|
"targetHandle": "script-1752471000020-left"
|
|
},
|
|
{
|
|
"id": "script-1752471000020-form-1751870928350-1752110513125",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "script-1752471000020",
|
|
"target": "form-1751870928350",
|
|
"animated": true,
|
|
"sourceHandle": "script-1752471000020-right",
|
|
"targetHandle": "form-1751870928350-left"
|
|
},
|
|
{
|
|
"id": "form-1751870928350-api-1751871528249-1752110547688",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "form-1751870928350",
|
|
"target": "api-1751871528249",
|
|
"animated": true,
|
|
"sourceHandle": "form-1751870928350-bottom",
|
|
"targetHandle": "api-1751871528249-top"
|
|
},
|
|
{
|
|
"id": "api-1751871528249-script-1751871635000-1752110661170",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "api-1751871528249",
|
|
"target": "script-1751871635000",
|
|
"animated": true,
|
|
"sourceHandle": "api-1751871528249-right",
|
|
"targetHandle": "script-1751871635000-left"
|
|
},
|
|
{
|
|
"id": "start-1751870920411-form-1753000000000-1752115210580",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "start-1751870920411",
|
|
"target": "form-1753000000000",
|
|
"animated": true,
|
|
"sourceHandle": "start-1751870920411-right",
|
|
"targetHandle": "form-1753000000000-left"
|
|
},
|
|
{
|
|
"id": "form-1753000000000-api-1753000000001-1752115217959",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "form-1753000000000",
|
|
"target": "api-1753000000001",
|
|
"animated": true,
|
|
"sourceHandle": "form-1753000000000-bottom",
|
|
"targetHandle": "api-1753000000001-top"
|
|
},
|
|
{
|
|
"id": "api-1753000000001-script-1753000000002-1752115222952",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "api-1753000000001",
|
|
"target": "script-1753000000002",
|
|
"animated": true,
|
|
"sourceHandle": "api-1753000000001-right",
|
|
"targetHandle": "script-1753000000002-left"
|
|
},
|
|
{
|
|
"id": "script-1753000000002-gateway-1753100000000-1752202680793",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "script-1753000000002",
|
|
"target": "gateway-1753100000000",
|
|
"animated": true,
|
|
"sourceHandle": "script-1753000000002-right",
|
|
"targetHandle": "gateway-1753100000000-left"
|
|
},
|
|
{
|
|
"id": "gateway-1753100000000-form-1751870928350-1752202820616",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Tidak",
|
|
"source": "gateway-1753100000000",
|
|
"target": "form-1751870928350",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-1753100000000-right",
|
|
"targetHandle": "form-1751870928350-left"
|
|
},
|
|
{
|
|
"id": "form-1753100000001-gateway-1753100000002-1752202841767",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "form-1753100000001",
|
|
"target": "gateway-1753100000002",
|
|
"animated": true,
|
|
"sourceHandle": "form-1753100000001-right",
|
|
"targetHandle": "gateway-1753100000002-left"
|
|
},
|
|
{
|
|
"id": "gateway-1753100000002-subprocess-1753100000003-1752202973206",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Ya",
|
|
"source": "gateway-1753100000002",
|
|
"target": "subprocess-1753100000003",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-1753100000002-right",
|
|
"targetHandle": "subprocess-1753100000003-left"
|
|
},
|
|
{
|
|
"id": "gateway-1753100000000-form-1753100000001-1752203198190",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Ya",
|
|
"source": "gateway-1753100000000",
|
|
"target": "form-1753100000001",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-1753100000000-right",
|
|
"targetHandle": "form-1753100000001-top"
|
|
},
|
|
{
|
|
"id": "script-1751871635000-form-family-tree-choice-1752204006162",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "script-1751871635000",
|
|
"target": "form-family-tree-choice",
|
|
"animated": true,
|
|
"sourceHandle": "script-1751871635000-right",
|
|
"targetHandle": "form-family-tree-choice-left"
|
|
},
|
|
{
|
|
"id": "form-family-tree-choice-gateway-family-tree-choice-1752204014461",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "form-family-tree-choice",
|
|
"target": "gateway-family-tree-choice",
|
|
"animated": true,
|
|
"sourceHandle": "form-family-tree-choice-bottom",
|
|
"targetHandle": "gateway-family-tree-choice-left"
|
|
},
|
|
{
|
|
"id": "gateway-family-tree-choice-api-1752114771983-1752204050925",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Ya",
|
|
"source": "gateway-family-tree-choice",
|
|
"target": "api-1752114771983",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-family-tree-choice-right",
|
|
"targetHandle": "api-1752114771983-left"
|
|
},
|
|
{
|
|
"id": "api-1752114771983-html-1752109761532-1752204167660",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "api-1752114771983",
|
|
"target": "html-1752109761532",
|
|
"animated": true,
|
|
"sourceHandle": "api-1752114771983-bottom",
|
|
"targetHandle": "html-1752109761532-left"
|
|
},
|
|
{
|
|
"id": "gateway-family-tree-choice-form-kategori-asnaf-1752204312974",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Tidak",
|
|
"source": "gateway-family-tree-choice",
|
|
"target": "form-kategori-asnaf",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-family-tree-choice-right",
|
|
"targetHandle": "form-kategori-asnaf-top"
|
|
},
|
|
{
|
|
"id": "form-kategori-asnaf-gateway-fakir-miskin-choice-1752204332412",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "",
|
|
"source": "form-kategori-asnaf",
|
|
"target": "gateway-fakir-miskin-choice",
|
|
"animated": true,
|
|
"sourceHandle": "form-kategori-asnaf-bottom",
|
|
"targetHandle": "gateway-fakir-miskin-choice-left"
|
|
},
|
|
{
|
|
"id": "gateway-1753100000002-subprocess-1752202751327-1752204374213",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Tidak",
|
|
"source": "gateway-1753100000002",
|
|
"target": "subprocess-1752202751327",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-1753100000002-right",
|
|
"targetHandle": "subprocess-1752202751327-left"
|
|
},
|
|
{
|
|
"id": "gateway-fakir-miskin-choice-business-rule-1751871900000-1752204422657",
|
|
"data": {},
|
|
"type": "smoothstep",
|
|
"label": "Ya",
|
|
"source": "gateway-fakir-miskin-choice",
|
|
"target": "business-rule-1751871900000",
|
|
"animated": true,
|
|
"sourceHandle": "gateway-fakir-miskin-choice-right",
|
|
"targetHandle": "business-rule-1751871900000-left"
|
|
}
|
|
],
|
|
"nodes": [
|
|
{
|
|
"id": "gateway-family-tree-choice",
|
|
"data": {
|
|
"label": "Lihat Family Tree?",
|
|
"shape": "diamond",
|
|
"textColor": "#374151",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-group-ya-path",
|
|
"output": "Ya",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-1",
|
|
"value": "ya",
|
|
"operator": "eq",
|
|
"variable": "lihatFamilyTree",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "condition-group-tidak-path",
|
|
"output": "Tidak",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-2",
|
|
"value": "tidak",
|
|
"operator": "eq",
|
|
"variable": "lihatFamilyTree",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"borderColor": "#6b7280",
|
|
"defaultPath": "gateway-fakir-miskin-choice",
|
|
"description": "Choose whether to view family tree",
|
|
"gatewayType": "exclusive",
|
|
"backgroundColor": "#f9fafb"
|
|
},
|
|
"type": "gateway",
|
|
"label": "Lihat Family Tree?",
|
|
"position": { "x": 2070, "y": -345 }
|
|
},
|
|
{
|
|
"id": "form-family-tree-choice",
|
|
"data": {
|
|
"label": "Pilihan Family Tree",
|
|
"formId": 6,
|
|
"formName": "Pilihan Family Tree",
|
|
"formUuid": "6e07fc8f-a160-478a-85fd-fa3364401547",
|
|
"description": "Form untuk memilih sama ada mahu lihat family tree atau tidak",
|
|
"assignedRoles": [],
|
|
"assignedUsers": [],
|
|
"inputMappings": [
|
|
{ "formField": "nama_pemohon", "processVariable": "applicantName" }
|
|
],
|
|
"assignmentType": "public",
|
|
"outputMappings": [
|
|
{
|
|
"formField": "lihat_family_tree",
|
|
"processVariable": "lihatFamilyTree"
|
|
}
|
|
],
|
|
"fieldConditions": []
|
|
},
|
|
"type": "form",
|
|
"label": "Pilihan Family Tree",
|
|
"position": { "x": 2040, "y": -540 }
|
|
},
|
|
{
|
|
"id": "gateway-fakir-miskin-choice",
|
|
"data": {
|
|
"label": "Fakir Miskin?",
|
|
"shape": "diamond",
|
|
"textColor": "#333333",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-group-ya-path",
|
|
"output": "Ya",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-1",
|
|
"value": "fakir_miskin",
|
|
"operator": "eq",
|
|
"variable": "kategoriAsnaf",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "condition-group-tidak-path",
|
|
"output": "Tidak",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-2",
|
|
"value": "bukan_fakir_miskin",
|
|
"operator": "eq",
|
|
"variable": "kategoriAsnaf",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"borderColor": "#6b7280",
|
|
"defaultPath": "business-rule-1751871900000",
|
|
"description": "Determine if applicant is Fakir Miskin",
|
|
"gatewayType": "exclusive",
|
|
"backgroundColor": "#f9fafb"
|
|
},
|
|
"type": "gateway",
|
|
"label": "Fakir Miskin?",
|
|
"position": { "x": 2085, "y": 210 }
|
|
},
|
|
{
|
|
"id": "form-kategori-asnaf",
|
|
"data": {
|
|
"label": "Pilihan Kategori Asnaf",
|
|
"formId": 7,
|
|
"formName": "Pilihan Kategori Asnaf",
|
|
"formUuid": "7e07fc8f-a160-478a-85fd-fa3364401548",
|
|
"description": "Form untuk memilih kategori asnaf",
|
|
"assignedRoles": [],
|
|
"assignedUsers": [],
|
|
"inputMappings": [
|
|
{ "formField": "nama_pemohon", "processVariable": "applicantName" }
|
|
],
|
|
"assignmentType": "public",
|
|
"outputMappings": [
|
|
{ "formField": "kategori_asnaf", "processVariable": "kategoriAsnaf" }
|
|
],
|
|
"fieldConditions": []
|
|
},
|
|
"type": "form",
|
|
"label": "Pilihan Kategori Asnaf",
|
|
"position": { "x": 2055, "y": -30 }
|
|
},
|
|
{
|
|
"id": "start-1751870920411",
|
|
"data": { "label": "Start", "description": "Process start point" },
|
|
"type": "start",
|
|
"label": "Start",
|
|
"position": { "x": -75, "y": -510 }
|
|
},
|
|
{
|
|
"id": "form-1752471000000",
|
|
"data": {
|
|
"label": "Penilaian Awal",
|
|
"formId": 3,
|
|
"formName": "Penilaian Awal",
|
|
"formUuid": "8e07fc8f-a160-478a-85fd-fa3364401544",
|
|
"description": "Form: Penilaian Awal untuk permohonan bantuan",
|
|
"assignedRoles": [],
|
|
"assignedUsers": [],
|
|
"inputMappings": [],
|
|
"assignmentType": "public",
|
|
"outputMappings": [
|
|
{
|
|
"formField": "komitmen_pembiayaan",
|
|
"processVariable": "komitmenKosTinggi"
|
|
},
|
|
{
|
|
"formField": "keperluan_mendesak",
|
|
"processVariable": "keperluanMendesak"
|
|
},
|
|
{
|
|
"formField": "keperluan_lain_nyatakan",
|
|
"processVariable": "keperluanLainNyatakan"
|
|
},
|
|
{
|
|
"formField": "dokumen_berkaitan",
|
|
"processVariable": "dokumenBerkaitan"
|
|
},
|
|
{
|
|
"formField": "catatan_tambahan",
|
|
"processVariable": "catatanTambahan"
|
|
}
|
|
],
|
|
"fieldConditions": [],
|
|
"assignmentVariable": "",
|
|
"assignmentVariableType": "user_id"
|
|
},
|
|
"type": "form",
|
|
"label": "Penilaian Awal",
|
|
"position": { "x": 435, "y": -540 }
|
|
},
|
|
{
|
|
"id": "api-1752471000010",
|
|
"data": {
|
|
"label": "Submit Penilaian Awal API",
|
|
"apiUrl": "https://jsonplaceholder.typicode.com/posts",
|
|
"headers": "{ \"Content-Type\": \"application/json\" }",
|
|
"apiMethod": "POST",
|
|
"description": "Submit penilaian awal data to external system",
|
|
"requestBody": "{\n \"komitmenKosTinggi\": \"{komitmenKosTinggi}\",\n \"keperluanMendesak\": \"{keperluanMendesak}\",\n \"keperluanLainNyatakan\": \"{keperluanLainNyatakan}\",\n \"dokumenBerkaitan\": \"{dokumenBerkaitan}\",\n \"catatanTambahan\": \"{catatanTambahan}\"\n}",
|
|
"errorVariable": "penilaianAwalApiError",
|
|
"outputVariable": "penilaianAwalApiResponse",
|
|
"continueOnError": false
|
|
},
|
|
"type": "api",
|
|
"label": "Submit Penilaian Awal API",
|
|
"position": { "x": 435, "y": -345 }
|
|
},
|
|
{
|
|
"id": "script-1752471000020",
|
|
"data": {
|
|
"label": "Process Penilaian Awal Response",
|
|
"scriptCode": "// Extract important data from Penilaian Awal API response\nconst apiData = processVariables.penilaianAwalApiResponse;\n\nif (apiData && apiData.data) {\n // Generate a reference number for the assessment\n processVariables.penilaianAwalId = apiData.data.id || 'PA-' + Date.now();\n \n // Process the high cost commitment answer\n processVariables.hasHighCostCommitment = processVariables.komitmenKosTinggi === 'ya';\n \n // Process urgent needs\n if (Array.isArray(processVariables.keperluanMendesak)) {\n // Set flags for specific urgent needs\n processVariables.hasUrgentMedicalNeed = processVariables.keperluanMendesak.includes('perubatan_kritikal');\n processVariables.hasDisasterNeed = processVariables.keperluanMendesak.includes('bencana');\n processVariables.hasDeathRelatedNeed = processVariables.keperluanMendesak.includes('kematian');\n processVariables.hasFamilyConflict = processVariables.keperluanMendesak.includes('konflik_keluarga');\n processVariables.hasHomelessness = processVariables.keperluanMendesak.includes('tiada_tempat_tinggal');\n processVariables.hasUtilityArrears = processVariables.keperluanMendesak.includes('tunggakan_utiliti');\n processVariables.hasOtherNeeds = processVariables.keperluanMendesak.includes('lain_lain');\n processVariables.hasNoUrgentNeeds = processVariables.keperluanMendesak.includes('tidak_mendesak');\n \n // Calculate urgency score based on selected needs\n let urgencyScore = 0;\n if (processVariables.hasUrgentMedicalNeed) urgencyScore += 5;\n if (processVariables.hasDisasterNeed) urgencyScore += 5;\n if (processVariables.hasDeathRelatedNeed) urgencyScore += 4;\n if (processVariables.hasFamilyConflict) urgencyScore += 3;\n if (processVariables.hasHomelessness) urgencyScore += 5;\n if (processVariables.hasUtilityArrears) urgencyScore += 2;\n if (processVariables.hasOtherNeeds) urgencyScore += 1;\n if (processVariables.hasNoUrgentNeeds) urgencyScore = 0;\n \n processVariables.urgencyScore = urgencyScore;\n processVariables.urgencyLevel = urgencyScore >= 5 ? 'high' : (urgencyScore >= 3 ? 'medium' : 'low');\n }\n \n // Check if documents were uploaded\n processVariables.hasUploadedDocuments = processVariables.dokumenBerkaitan && \n Array.isArray(processVariables.dokumenBerkaitan) && \n processVariables.dokumenBerkaitan.length > 0;\n \n // Set status for next step\n processVariables.penilaianAwalStatus = 'completed';\n processVariables.readyForPersonalInfo = true;\n \n console.log('Penilaian Awal processed successfully:', {\n penilaianAwalId: processVariables.penilaianAwalId,\n urgencyLevel: processVariables.urgencyLevel,\n urgencyScore: processVariables.urgencyScore,\n hasHighCostCommitment: processVariables.hasHighCostCommitment,\n hasUploadedDocuments: processVariables.hasUploadedDocuments\n });\n} else {\n // Handle API error case\n processVariables.penilaianAwalStatus = 'failed';\n processVariables.readyForPersonalInfo = false;\n processVariables.penilaianAwalError = 'Failed to submit penilaian awal';\n}",
|
|
"description": "Process the penilaian awal form data and API response",
|
|
"errorVariable": "penilaianAwalScriptError",
|
|
"inputVariables": [
|
|
"penilaianAwalApiResponse",
|
|
"komitmenKosTinggi",
|
|
"keperluanMendesak",
|
|
"keperluanLainNyatakan",
|
|
"dokumenBerkaitan",
|
|
"catatanTambahan"
|
|
],
|
|
"scriptLanguage": "javascript",
|
|
"continueOnError": false,
|
|
"outputVariables": [
|
|
{
|
|
"name": "penilaianAwalId",
|
|
"type": "string",
|
|
"description": "Generated ID for the initial assessment"
|
|
},
|
|
{
|
|
"name": "hasHighCostCommitment",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has high cost commitments"
|
|
},
|
|
{
|
|
"name": "urgencyScore",
|
|
"type": "number",
|
|
"description": "Calculated urgency score based on needs"
|
|
},
|
|
{
|
|
"name": "urgencyLevel",
|
|
"type": "string",
|
|
"description": "Urgency level (high/medium/low)"
|
|
},
|
|
{
|
|
"name": "hasUrgentMedicalNeed",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has urgent medical needs"
|
|
},
|
|
{
|
|
"name": "hasDisasterNeed",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has disaster-related needs"
|
|
},
|
|
{
|
|
"name": "hasDeathRelatedNeed",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has death-related needs"
|
|
},
|
|
{
|
|
"name": "hasFamilyConflict",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has family conflict"
|
|
},
|
|
{
|
|
"name": "hasHomelessness",
|
|
"type": "boolean",
|
|
"description": "Whether applicant is homeless"
|
|
},
|
|
{
|
|
"name": "hasUtilityArrears",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has utility arrears"
|
|
},
|
|
{
|
|
"name": "hasOtherNeeds",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has other needs"
|
|
},
|
|
{
|
|
"name": "hasNoUrgentNeeds",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has no urgent needs"
|
|
},
|
|
{
|
|
"name": "hasUploadedDocuments",
|
|
"type": "boolean",
|
|
"description": "Whether documents were uploaded"
|
|
},
|
|
{
|
|
"name": "penilaianAwalStatus",
|
|
"type": "string",
|
|
"description": "Status of initial assessment submission"
|
|
},
|
|
{
|
|
"name": "readyForPersonalInfo",
|
|
"type": "boolean",
|
|
"description": "Whether ready for personal info form"
|
|
}
|
|
]
|
|
},
|
|
"type": "script",
|
|
"label": "Process Penilaian Awal Response",
|
|
"position": { "x": 780, "y": -345 }
|
|
},
|
|
{
|
|
"id": "form-1751870928350",
|
|
"data": {
|
|
"label": "Borang Maklumat Peribadi",
|
|
"formId": 1,
|
|
"formName": "Borang Maklumat Peribadi",
|
|
"formUuid": "9f08fc8f-b170-478a-85fd-fa3364401533",
|
|
"description": "Form: Borang Maklumat Peribadi",
|
|
"assignedRoles": [],
|
|
"assignedUsers": [],
|
|
"inputMappings": [],
|
|
"assignmentType": "public",
|
|
"outputMappings": [
|
|
{ "formField": "text_3", "processVariable": "text3" },
|
|
{ "formField": "select_1", "processVariable": "select1" },
|
|
{ "formField": "form_jeniskp_1", "processVariable": "formJeniskp1" },
|
|
{ "formField": "form_jeniskp_2", "processVariable": "formJeniskp2" },
|
|
{ "formField": "form_jeniskp_3", "processVariable": "formJeniskp3" },
|
|
{
|
|
"formField": "text_warganegara",
|
|
"processVariable": "textWarganegara"
|
|
},
|
|
{ "formField": "radio_jantina", "processVariable": "radioJantina" },
|
|
{ "formField": "radio_bangsa", "processVariable": "radioBangsa" },
|
|
{ "formField": "nyatakan_lain2", "processVariable": "nyatakanLain2" },
|
|
{ "formField": "radio_9_copy", "processVariable": "radio9Copy" },
|
|
{
|
|
"formField": "radio_pendidikan",
|
|
"processVariable": "radioPendidikan"
|
|
},
|
|
{ "formField": "text_14", "processVariable": "text14" },
|
|
{
|
|
"formField": "date_masukislam",
|
|
"processVariable": "dateMasukislam"
|
|
},
|
|
{
|
|
"formField": "date_masukislam_copy",
|
|
"processVariable": "dateMasukislamCopy"
|
|
},
|
|
{
|
|
"formField": "select_statusperkahwinan",
|
|
"processVariable": "selectStatusperkahwinan"
|
|
},
|
|
{
|
|
"formField": "hubungan_keluarga",
|
|
"processVariable": "hubunganKeluarga"
|
|
},
|
|
{
|
|
"formField": "hubungan_lain_nyatakan",
|
|
"processVariable": "hubunganLainNyatakan"
|
|
},
|
|
{
|
|
"formField": "nama_tanggungan",
|
|
"processVariable": "namaTanggungan"
|
|
},
|
|
{
|
|
"formField": "jenis_kad_tanggungan",
|
|
"processVariable": "jenisKadTanggungan"
|
|
},
|
|
{
|
|
"formField": "no_pengenalan_tanggungan",
|
|
"processVariable": "noPengenalanTanggungan"
|
|
},
|
|
{
|
|
"formField": "jantina_tanggungan",
|
|
"processVariable": "jantinaTanggungan"
|
|
},
|
|
{
|
|
"formField": "tarikh_lahir_tanggungan",
|
|
"processVariable": "tarikhLahirTanggungan"
|
|
},
|
|
{
|
|
"formField": "tempat_lahir_tanggungan",
|
|
"processVariable": "tempatLahirTanggungan"
|
|
},
|
|
{
|
|
"formField": "bangsa_tanggungan",
|
|
"processVariable": "bangsaTanggungan"
|
|
},
|
|
{
|
|
"formField": "bangsa_lain_tanggungan",
|
|
"processVariable": "bangsaLainTanggungan"
|
|
},
|
|
{
|
|
"formField": "status_kahwin_tanggungan",
|
|
"processVariable": "statusKahwinTanggungan"
|
|
},
|
|
{
|
|
"formField": "tarikh_masuk_islam_tanggungan",
|
|
"processVariable": "tarikhMasukIslamTanggungan"
|
|
},
|
|
{
|
|
"formField": "tarikh_mula_kfam_tanggungan",
|
|
"processVariable": "tarikhMulaKfamTanggungan"
|
|
},
|
|
{
|
|
"formField": "warganegara_tanggungan",
|
|
"processVariable": "warganegaraTanggungan"
|
|
},
|
|
{
|
|
"formField": "tempat_menetap_tanggungan",
|
|
"processVariable": "tempatMenetapTanggungan"
|
|
},
|
|
{
|
|
"formField": "no_telefon_tanggungan",
|
|
"processVariable": "noTelefonTanggungan"
|
|
},
|
|
{
|
|
"formField": "nama_pemegang_akaun",
|
|
"processVariable": "namaPemegangAkaun"
|
|
},
|
|
{ "formField": "nama_bank", "processVariable": "namaBank" },
|
|
{ "formField": "no_akaun_bank", "processVariable": "noAkaunBank" },
|
|
{
|
|
"formField": "cara_pembayaran",
|
|
"processVariable": "caraPembayaran"
|
|
},
|
|
{ "formField": "sebab_tunai", "processVariable": "sebabTunai" },
|
|
{
|
|
"formField": "bersekolah_tanggungan",
|
|
"processVariable": "bersekolahTanggungan"
|
|
},
|
|
{
|
|
"formField": "pendidikan_tertinggi_tanggungan",
|
|
"processVariable": "pendidikanTertinggiTanggungan"
|
|
},
|
|
{
|
|
"formField": "pendidikan_lain_tanggungan",
|
|
"processVariable": "pendidikanLainTanggungan"
|
|
},
|
|
{ "formField": "nama_sekolah", "processVariable": "namaSekolah" },
|
|
{ "formField": "alamat_sekolah", "processVariable": "alamatSekolah" },
|
|
{ "formField": "daerah_sekolah", "processVariable": "daerahSekolah" },
|
|
{ "formField": "negeri_sekolah", "processVariable": "negeriSekolah" },
|
|
{ "formField": "poskod_sekolah", "processVariable": "poskodSekolah" },
|
|
{
|
|
"formField": "tinggal_bersama_keluarga",
|
|
"processVariable": "tinggalBersamaKeluarga"
|
|
}
|
|
],
|
|
"fieldConditions": [],
|
|
"assignmentVariable": "",
|
|
"assignmentVariableType": "user_id"
|
|
},
|
|
"type": "form",
|
|
"label": "Borang Maklumat Peribadi",
|
|
"position": { "x": 1260, "y": -540 }
|
|
},
|
|
{
|
|
"id": "api-1751871528249",
|
|
"data": {
|
|
"label": "Submit Profile API",
|
|
"apiUrl": "https://jsonplaceholder.typicode.com/posts",
|
|
"headers": "{ \"Content-Type\": \"application/json\" }",
|
|
"apiMethod": "POST",
|
|
"description": "Submit user profile to external system",
|
|
"requestBody": "{\n \"applicantName\": \"{text3}\",\n \"idType\": \"{select1}\",\n \"mykadNumber\": \"{formJeniskp1}\",\n \"passportNumber\": \"{formJeniskp2}\",\n \"birthCertNumber\": \"{formJeniskp3}\",\n \"nationality\": \"{textWarganegara}\",\n \"gender\": \"{radioJantina}\",\n \"race\": \"{radioBangsa}\",\n \"otherRace\": \"{nyatakanLain2}\",\n \"isStudying\": \"{radio9Copy}\",\n \"education\": \"{radioPendidikan}\",\n \"otherEducation\": \"{text14}\",\n \"islamConversionDate\": \"{dateMasukislam}\",\n \"kfamStartDate\": \"{dateMasukislamCopy}\",\n \"maritalStatus\": \"{selectStatusperkahwinan}\",\n \"dependentInfo\": {\n \"relationship\": \"{hubunganKeluarga}\",\n \"otherRelationship\": \"{hubunganLainNyatakan}\",\n \"name\": \"{namaTanggungan}\",\n \"idType\": \"{jenisKadTanggungan}\",\n \"idNumber\": \"{noPengenalanTanggungan}\",\n \"gender\": \"{jantinaTanggungan}\",\n \"birthDate\": \"{tarikhLahirTanggungan}\",\n \"birthPlace\": \"{tempatLahirTanggungan}\",\n \"race\": \"{bangsaTanggungan}\",\n \"otherRace\": \"{bangsaLainTanggungan}\",\n \"maritalStatus\": \"{statusKahwinTanggungan}\",\n \"islamConversionDate\": \"{tarikhMasukIslamTanggungan}\",\n \"kfamStartDate\": \"{tarikhMulaKfamTanggungan}\",\n \"nationality\": \"{warganegaraTanggungan}\",\n \"residenceDuration\": \"{tempatMenetapTanggungan}\",\n \"phoneNumber\": \"{noTelefonTanggungan}\",\n \"isStudying\": \"{bersekolahTanggungan}\",\n \"education\": \"{pendidikanTertinggiTanggungan}\",\n \"otherEducation\": \"{pendidikanLainTanggungan}\",\n \"schoolName\": \"{namaSekolah}\",\n \"schoolAddress\": \"{alamatSekolah}\",\n \"schoolDistrict\": \"{daerahSekolah}\",\n \"schoolState\": \"{negeriSekolah}\",\n \"schoolPostcode\": \"{poskodSekolah}\",\n \"liveWithFamily\": \"{tinggalBersamaKeluarga}\"\n },\n \"bankingInfo\": {\n \"accountHolderName\": \"{namaPemegangAkaun}\",\n \"bankName\": \"{namaBank}\",\n \"accountNumber\": \"{noAkaunBank}\",\n \"paymentMethod\": \"{caraPembayaran}\",\n \"cashReason\": \"{sebabTunai}\"\n }\n}",
|
|
"errorVariable": "apiError",
|
|
"outputVariable": "apiResponse",
|
|
"continueOnError": false
|
|
},
|
|
"type": "api",
|
|
"label": "Submit Profile API",
|
|
"position": { "x": 1260, "y": -345 }
|
|
},
|
|
{
|
|
"id": "script-1751871635000",
|
|
"data": {
|
|
"label": "Process API Response",
|
|
"scriptCode": "// Extract important data from API response\nconst apiData = processVariables.apiResponse;\n\nif (apiData && apiData.data) {\n // Extract application ID\n processVariables.applicationId = apiData.data.id || 'APP-' + Date.now();\n \n // Determine if documents are required based on profile\n processVariables.documentsRequired = true;\n \n // Set verification level based on education and other factors\n if (processVariables.radioPendidikan === 'ijazah' || processVariables.radioPendidikan === 'diploma') {\n processVariables.verificationLevel = 'enhanced';\n processVariables.documentsRequired = true;\n } else {\n processVariables.verificationLevel = 'standard';\n }\n \n // Extract applicant name for verification form\n processVariables.applicantName = processVariables.text3;\n \n // Process dependent information if available\n if (processVariables.namaTanggungan) {\n processVariables.hasDependents = true;\n processVariables.dependentCount = 1;\n processVariables.dependentName = processVariables.namaTanggungan;\n } else {\n processVariables.hasDependents = false;\n processVariables.dependentCount = 0;\n }\n \n // Process banking information\n if (processVariables.namaBank && processVariables.noAkaunBank) {\n processVariables.hasBankingInfo = true;\n processVariables.paymentReady = true;\n } else {\n processVariables.hasBankingInfo = false;\n processVariables.paymentReady = false;\n }\n \n // Set status for next step\n processVariables.profileSubmissionStatus = 'success';\n processVariables.nextStepReady = true;\n \n console.log('Profile processed successfully:', {\n applicationId: processVariables.applicationId,\n verificationLevel: processVariables.verificationLevel,\n documentsRequired: processVariables.documentsRequired,\n hasDependents: processVariables.hasDependents,\n hasBankingInfo: processVariables.hasBankingInfo\n });\n} else {\n // Handle API error case\n processVariables.profileSubmissionStatus = 'failed';\n processVariables.nextStepReady = false;\n processVariables.errorMessage = 'Failed to submit profile';\n}",
|
|
"description": "Transform API response for document verification step",
|
|
"errorVariable": "scriptError",
|
|
"inputVariables": [
|
|
"apiResponse",
|
|
"text3",
|
|
"radioPendidikan",
|
|
"namaTanggungan",
|
|
"namaBank",
|
|
"noAkaunBank"
|
|
],
|
|
"scriptLanguage": "javascript",
|
|
"continueOnError": false,
|
|
"outputVariables": [
|
|
{
|
|
"name": "applicationId",
|
|
"type": "string",
|
|
"description": "Generated application ID"
|
|
},
|
|
{
|
|
"name": "documentsRequired",
|
|
"type": "boolean",
|
|
"description": "Whether documents verification is required"
|
|
},
|
|
{
|
|
"name": "verificationLevel",
|
|
"type": "string",
|
|
"description": "Level of verification required"
|
|
},
|
|
{
|
|
"name": "applicantName",
|
|
"type": "string",
|
|
"description": "Applicant name for verification"
|
|
},
|
|
{
|
|
"name": "hasDependents",
|
|
"type": "boolean",
|
|
"description": "Whether applicant has dependents"
|
|
},
|
|
{
|
|
"name": "dependentCount",
|
|
"type": "number",
|
|
"description": "Number of dependents"
|
|
},
|
|
{
|
|
"name": "dependentName",
|
|
"type": "string",
|
|
"description": "Name of dependent"
|
|
},
|
|
{
|
|
"name": "hasBankingInfo",
|
|
"type": "boolean",
|
|
"description": "Whether banking information is provided"
|
|
},
|
|
{
|
|
"name": "paymentReady",
|
|
"type": "boolean",
|
|
"description": "Whether payment processing is ready"
|
|
},
|
|
{
|
|
"name": "profileSubmissionStatus",
|
|
"type": "string",
|
|
"description": "Status of profile submission"
|
|
},
|
|
{
|
|
"name": "nextStepReady",
|
|
"type": "boolean",
|
|
"description": "Whether ready for next step"
|
|
}
|
|
]
|
|
},
|
|
"type": "script",
|
|
"label": "Process API Response",
|
|
"position": { "x": 1590, "y": -345 }
|
|
},
|
|
{
|
|
"id": "form-1751871700000",
|
|
"data": {
|
|
"label": "Borang Semak Dokumen",
|
|
"formId": 2,
|
|
"formName": "Borang Semak Dokumen",
|
|
"formUuid": "2a15fc8f-c270-478a-95fd-fa4364401644",
|
|
"description": "Document verification form",
|
|
"assignedRoles": ["verifier"],
|
|
"assignedUsers": [],
|
|
"inputMappings": [
|
|
{
|
|
"formField": "reference_number",
|
|
"processVariable": "applicationId"
|
|
},
|
|
{ "formField": "applicant_name", "processVariable": "applicantName" },
|
|
{ "formField": "dependent_name", "processVariable": "dependentName" },
|
|
{ "formField": "has_dependents", "processVariable": "hasDependents" },
|
|
{
|
|
"formField": "verification_level",
|
|
"processVariable": "verificationLevel"
|
|
}
|
|
],
|
|
"assignmentType": "role",
|
|
"outputMappings": [
|
|
{
|
|
"formField": "verification_result",
|
|
"processVariable": "documentVerificationResult"
|
|
},
|
|
{
|
|
"formField": "verification_notes",
|
|
"processVariable": "verificationNotes"
|
|
}
|
|
],
|
|
"fieldConditions": [],
|
|
"assignmentVariable": "",
|
|
"assignmentVariableType": "user_id"
|
|
},
|
|
"type": "form",
|
|
"label": "Borang Semak Dokumen",
|
|
"position": { "x": 825, "y": 945 }
|
|
},
|
|
{
|
|
"id": "api-1751871750000",
|
|
"data": {
|
|
"label": "Submit Document Verification API",
|
|
"apiUrl": "https://api.example.com/documents/verify",
|
|
"headers": "{ \"Content-Type\": \"application/json\", \"Authorization\": \"Bearer {apiToken}\" }",
|
|
"apiMethod": "POST",
|
|
"description": "Submit document verification results to external system",
|
|
"requestBody": "{\n \"applicationId\": \"{applicationId}\",\n \"applicantName\": \"{applicantName}\",\n \"verificationResult\": \"{documentVerificationResult}\",\n \"verificationNotes\": \"{verificationNotes}\",\n \"verificationLevel\": \"{verificationLevel}\",\n \"verifiedBy\": \"{verifiedBy}\",\n \"verificationDate\": \"{verificationDate}\",\n \"documentStatus\": {\n \"applicantId\": \"{formJeniskp1}\",\n \"dependentInfo\": {\n \"hasDependents\": {hasDependents},\n \"dependentName\": \"{dependentName}\",\n \"dependentId\": \"{noPengenalanTanggungan}\"\n },\n \"bankingVerified\": {hasBankingInfo},\n \"profileScore\": {profileScore}\n }\n}",
|
|
"errorVariable": "verificationApiError",
|
|
"outputVariable": "verificationApiResponse",
|
|
"continueOnError": false
|
|
},
|
|
"type": "api",
|
|
"label": "Submit Document Verification API",
|
|
"position": { "x": 1170, "y": 810 }
|
|
},
|
|
{
|
|
"id": "script-1751871770000",
|
|
"data": {
|
|
"label": "Process Verification Response",
|
|
"scriptCode": "// Process document verification API response\nconst verificationData = processVariables.verificationApiResponse;\n\nif (verificationData && verificationData.data) {\n // Extract verification status\n processVariables.verificationStatus = verificationData.data.status || 'pending';\n \n // Set document completeness based on verification result\n if (processVariables.documentVerificationResult === 'lengkap') {\n processVariables.documentsComplete = true;\n processVariables.canProceedToKifayah = true;\n \n // Extract additional data from verification response\n if (verificationData.data.eligibilityScore) {\n processVariables.eligibilityScore = verificationData.data.eligibilityScore;\n }\n \n if (verificationData.data.riskAssessment) {\n processVariables.riskAssessment = verificationData.data.riskAssessment;\n }\n \n // Set verification completion timestamp\n processVariables.verificationCompletedAt = new Date().toISOString();\n \n } else {\n processVariables.documentsComplete = false;\n processVariables.canProceedToKifayah = false;\n processVariables.rejectionReason = processVariables.verificationNotes || 'Dokumen tidak lengkap';\n }\n \n // Process dependent verification if applicable\n if (processVariables.hasDependents && verificationData.data.dependentVerification) {\n processVariables.dependentVerificationStatus = verificationData.data.dependentVerification.status;\n processVariables.dependentDocumentsComplete = verificationData.data.dependentVerification.documentsComplete;\n }\n \n // Set next step readiness\n processVariables.verificationProcessed = true;\n processVariables.readyForDecision = true;\n \n console.log('Verification processed successfully:', {\n verificationStatus: processVariables.verificationStatus,\n documentsComplete: processVariables.documentsComplete,\n canProceedToKifayah: processVariables.canProceedToKifayah,\n eligibilityScore: processVariables.eligibilityScore\n });\n \n} else {\n // Handle verification API error\n processVariables.verificationStatus = 'failed';\n processVariables.documentsComplete = false;\n processVariables.canProceedToKifayah = false;\n processVariables.verificationError = 'Failed to process verification';\n processVariables.readyForDecision = false;\n}",
|
|
"description": "Process document verification API response and set decision variables",
|
|
"errorVariable": "verificationScriptError",
|
|
"inputVariables": [
|
|
"verificationApiResponse",
|
|
"documentVerificationResult",
|
|
"verificationNotes",
|
|
"hasDependents",
|
|
"dependentName"
|
|
],
|
|
"scriptLanguage": "javascript",
|
|
"continueOnError": false,
|
|
"outputVariables": [
|
|
{
|
|
"name": "verificationStatus",
|
|
"type": "string",
|
|
"description": "Status of document verification process"
|
|
},
|
|
{
|
|
"name": "documentsComplete",
|
|
"type": "boolean",
|
|
"description": "Whether all documents are complete"
|
|
},
|
|
{
|
|
"name": "canProceedToKifayah",
|
|
"type": "boolean",
|
|
"description": "Whether process can proceed to kifayah analysis"
|
|
},
|
|
{
|
|
"name": "eligibilityScore",
|
|
"type": "number",
|
|
"description": "Eligibility score from verification"
|
|
},
|
|
{
|
|
"name": "riskAssessment",
|
|
"type": "string",
|
|
"description": "Risk assessment result"
|
|
},
|
|
{
|
|
"name": "verificationCompletedAt",
|
|
"type": "string",
|
|
"description": "Timestamp when verification was completed"
|
|
},
|
|
{
|
|
"name": "rejectionReason",
|
|
"type": "string",
|
|
"description": "Reason for rejection if documents incomplete"
|
|
},
|
|
{
|
|
"name": "dependentVerificationStatus",
|
|
"type": "string",
|
|
"description": "Dependent verification status"
|
|
},
|
|
{
|
|
"name": "dependentDocumentsComplete",
|
|
"type": "boolean",
|
|
"description": "Whether dependent documents are complete"
|
|
},
|
|
{
|
|
"name": "verificationProcessed",
|
|
"type": "boolean",
|
|
"description": "Whether verification processing is complete"
|
|
},
|
|
{
|
|
"name": "readyForDecision",
|
|
"type": "boolean",
|
|
"description": "Whether ready for decision gateway"
|
|
}
|
|
]
|
|
},
|
|
"type": "script",
|
|
"label": "Process Verification Response",
|
|
"position": { "x": 540, "y": 780 }
|
|
},
|
|
{
|
|
"id": "gateway-1751871800000",
|
|
"data": {
|
|
"label": "Lengkap?",
|
|
"shape": "diamond",
|
|
"textColor": "#333333",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-group-ya-path",
|
|
"output": "Ya",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-1",
|
|
"value": "lengkap",
|
|
"operator": "eq",
|
|
"variable": "documentVerificationResult",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "condition-group-tidak-path",
|
|
"output": "Tidak",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-2",
|
|
"value": "tidak_lengkap",
|
|
"operator": "eq",
|
|
"variable": "documentVerificationResult",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"borderColor": "#6b7280",
|
|
"defaultPath": "notification-1751872000000",
|
|
"description": "Check if documents are complete",
|
|
"gatewayType": "exclusive",
|
|
"backgroundColor": "#f9fafb"
|
|
},
|
|
"type": "gateway",
|
|
"label": "Lengkap?",
|
|
"position": { "x": 1935, "y": 510 }
|
|
},
|
|
{
|
|
"id": "business-rule-1751871900000",
|
|
"data": {
|
|
"label": "Analisis Had Kifayah",
|
|
"shape": "rectangle",
|
|
"textColor": "#1e40af",
|
|
"ruleGroups": [
|
|
{
|
|
"id": "group-1",
|
|
"name": "Married with Dependents",
|
|
"actions": [
|
|
{
|
|
"id": "action-1-1",
|
|
"type": "set_variable",
|
|
"value": "married_with_dependents",
|
|
"variable": "householdType"
|
|
},
|
|
{
|
|
"id": "action-1-2",
|
|
"type": "set_variable",
|
|
"value": 1215,
|
|
"variable": "baseKifayahAmount"
|
|
},
|
|
{
|
|
"id": "action-1-3",
|
|
"type": "set_variable",
|
|
"value": 780,
|
|
"variable": "spouseKifayahAmount"
|
|
}
|
|
],
|
|
"operator": "AND",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-1-1",
|
|
"value": "berkahwin",
|
|
"operator": "eq",
|
|
"variable": "selectStatusperkahwinan"
|
|
},
|
|
{
|
|
"id": "condition-1-2",
|
|
"value": true,
|
|
"operator": "eq",
|
|
"variable": "hasDependents"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "group-2",
|
|
"name": "Single with Dependents",
|
|
"actions": [
|
|
{
|
|
"id": "action-2-1",
|
|
"type": "set_variable",
|
|
"value": "single_with_dependents",
|
|
"variable": "householdType"
|
|
},
|
|
{
|
|
"id": "action-2-2",
|
|
"type": "set_variable",
|
|
"value": 1215,
|
|
"variable": "baseKifayahAmount"
|
|
},
|
|
{
|
|
"id": "action-2-3",
|
|
"type": "set_variable",
|
|
"value": 0,
|
|
"variable": "spouseKifayahAmount"
|
|
}
|
|
],
|
|
"operator": "AND",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-2-1",
|
|
"value": "berkahwin",
|
|
"operator": "neq",
|
|
"variable": "selectStatusperkahwinan"
|
|
},
|
|
{
|
|
"id": "condition-2-2",
|
|
"value": true,
|
|
"operator": "eq",
|
|
"variable": "hasDependents"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "group-3",
|
|
"name": "Calculate Dependent Allowance",
|
|
"actions": [
|
|
{
|
|
"id": "action-3-1",
|
|
"type": "set_variable",
|
|
"value": 408,
|
|
"variable": "dependentAllowance"
|
|
},
|
|
{
|
|
"id": "action-3-2",
|
|
"type": "set_variable",
|
|
"value": "school_age_7_17",
|
|
"variable": "dependentType"
|
|
}
|
|
],
|
|
"operator": "AND",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-3-1",
|
|
"value": true,
|
|
"operator": "eq",
|
|
"variable": "hasDependents"
|
|
},
|
|
{
|
|
"id": "condition-3-2",
|
|
"value": "ya",
|
|
"operator": "eq",
|
|
"variable": "bersekolahTanggungan"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"borderColor": "#3b82f6",
|
|
"description": "Calculate Had Kifayah based on household composition and income",
|
|
"errorVariable": "kifayahCalculationError",
|
|
"outputVariable": "kifayahCalculationResult",
|
|
"backgroundColor": "#eff6ff"
|
|
},
|
|
"type": "business-rule",
|
|
"label": "Analisis Had Kifayah",
|
|
"position": { "x": 2445, "y": -45 }
|
|
},
|
|
{
|
|
"id": "notification-1751871950000",
|
|
"data": {
|
|
"label": "Hantar Keputusan Had Kifayah",
|
|
"message": "Assalamualaikum {applicantName},\n\nAnalisis Had Kifayah untuk permohonan anda dengan rujukan {applicationId} telah selesai.\n\n=== BUTIRAN ANALISIS HAD KIFAYAH ===\n\nJenis Isi Rumah: {householdType}\nJumlah Had Kifayah: RM {totalHadKifayah}\n\nPecahan:\n- Ketua Keluarga: RM {baseKifayahAmount}\n- Pasangan: RM {spouseKifayahAmount}\n- Tanggungan ({dependentCount} orang): RM {dependentAllowance}\n\nTarikh Analisis: {kifayahCalculationDate}\nStatus: {kifayahStatus}\n\nSila tunggu maklumat lanjut mengenai keputusan permohonan anda.\n\nTerima kasih.",
|
|
"subject": "Keputusan Analisis Had Kifayah - Permohonan {applicationId}",
|
|
"template": "kifayah-calculation-template",
|
|
"description": "Send Had Kifayah calculation results to applicant",
|
|
"errorVariable": "kifayahNotificationError",
|
|
"recipientType": "variable",
|
|
"recipientValue": "applicantEmail",
|
|
"notificationType": "email"
|
|
},
|
|
"type": "notification",
|
|
"label": "Hantar Keputusan Had Kifayah",
|
|
"position": { "x": 2730, "y": 690 }
|
|
},
|
|
{
|
|
"id": "notification-1751872000000",
|
|
"data": {
|
|
"label": "Terima Notifikasi",
|
|
"message": "Assalamualaikum {applicantName},\n\nPermohonan anda dengan rujukan {applicationId} tidak dapat diproses kerana dokumen yang dikemukakan tidak lengkap.\n\nSila lengkapkan dokumen yang diperlukan dan kemukakan semula permohonan anda.\n\nCatatan daripada pegawai pengesah:\n{verificationNotes}\n\nTerima kasih.",
|
|
"subject": "Dokumen Tidak Lengkap - Permohonan {applicationId}",
|
|
"template": "incomplete-documents-template",
|
|
"description": "Send notification for incomplete documents",
|
|
"errorVariable": "notificationError",
|
|
"recipientType": "variable",
|
|
"recipientValue": "applicantEmail",
|
|
"notificationType": "email"
|
|
},
|
|
"type": "notification",
|
|
"label": "Terima Notifikasi",
|
|
"position": { "x": 1455, "y": 915 }
|
|
},
|
|
{
|
|
"id": "end-1751872100000",
|
|
"data": {
|
|
"label": "End",
|
|
"description": "Process completion - documents incomplete"
|
|
},
|
|
"type": "end",
|
|
"label": "End",
|
|
"position": { "x": 1710, "y": 930 }
|
|
},
|
|
{
|
|
"id": "html-1752109761532",
|
|
"data": {
|
|
"label": "Family Tree",
|
|
"shape": "rectangle",
|
|
"jsCode": "",
|
|
"cssCode": "",
|
|
"htmlCode": "<!-- Enter your HTML code here -->\n<div class=\"custom-html-content\">\n <h2>Custom HTML Content</h2>\n <p>This is a custom HTML node that can display rich content.</p>\n</div>",
|
|
"textColor": "#333333",
|
|
"autoRefresh": false,
|
|
"borderColor": "#dddddd",
|
|
"description": "Family Tree for Borang",
|
|
"inputVariables": [],
|
|
"backgroundColor": "#ffffff",
|
|
"outputVariables": [],
|
|
"allowVariableAccess": true
|
|
},
|
|
"type": "html",
|
|
"label": "Family Tree",
|
|
"position": { "x": 2535, "y": -435 }
|
|
},
|
|
{
|
|
"id": "rectangle-shape-1752110224921",
|
|
"data": {
|
|
"label": "",
|
|
"shape": "rectangle",
|
|
"width": 650,
|
|
"height": 400,
|
|
"isShape": true,
|
|
"shapeType": "rectangle",
|
|
"textColor": "#374151",
|
|
"borderColor": "#16a34a",
|
|
"description": "",
|
|
"backgroundColor": "#e8f5e9"
|
|
},
|
|
"type": "rectangle-shape",
|
|
"label": "",
|
|
"position": { "x": 375, "y": -570 }
|
|
},
|
|
{
|
|
"id": "text-annotation-1752110279700",
|
|
"data": {
|
|
"label": "NF-NAS-PRF-AS-PA",
|
|
"shape": "rectangle",
|
|
"width": 200,
|
|
"height": 80,
|
|
"isShape": true,
|
|
"shapeType": "text-annotation",
|
|
"textColor": "#92400e",
|
|
"borderColor": "#fbbf24",
|
|
"description": "Pernilaian Awal",
|
|
"backgroundColor": "#fffbeb"
|
|
},
|
|
"type": "text-annotation",
|
|
"label": "BF-NAS-PRF-AS-PA",
|
|
"position": { "x": 810, "y": -555 }
|
|
},
|
|
{
|
|
"id": "rectangle-shape-1752110492897",
|
|
"data": {
|
|
"label": "",
|
|
"shape": "rectangle",
|
|
"width": 650,
|
|
"height": 400,
|
|
"isShape": true,
|
|
"shapeType": "rectangle",
|
|
"textColor": "#374151",
|
|
"borderColor": "#16a34a",
|
|
"description": "",
|
|
"backgroundColor": "#e8f5e9"
|
|
},
|
|
"type": "rectangle-shape",
|
|
"label": "",
|
|
"position": { "x": 1185, "y": -570 }
|
|
},
|
|
{
|
|
"id": "text-annotation-1752110562983",
|
|
"data": {
|
|
"label": "BF-NAS-PRF-AS-QS-02",
|
|
"shape": "rectangle",
|
|
"width": 200,
|
|
"height": 80,
|
|
"isShape": true,
|
|
"shapeType": "text-annotation",
|
|
"textColor": "#92400e",
|
|
"borderColor": "#fbbf24",
|
|
"description": "Isi Borang Permohonan Online",
|
|
"backgroundColor": "#fffbeb"
|
|
},
|
|
"type": "text-annotation",
|
|
"label": "BF-NAS-PRF-AS-QS-02",
|
|
"position": { "x": 1620, "y": -555 }
|
|
},
|
|
{
|
|
"id": "rectangle-shape-1752114739551",
|
|
"data": {
|
|
"label": "",
|
|
"shape": "rectangle",
|
|
"width": 750,
|
|
"height": 400,
|
|
"isShape": true,
|
|
"shapeType": "rectangle",
|
|
"textColor": "#374151",
|
|
"borderColor": "#16a34a",
|
|
"description": "",
|
|
"backgroundColor": "#e8f5e9"
|
|
},
|
|
"type": "rectangle-shape",
|
|
"label": "",
|
|
"position": { "x": 1995, "y": -570 }
|
|
},
|
|
{
|
|
"id": "api-1752114771983",
|
|
"data": {
|
|
"label": "API Call",
|
|
"shape": "rectangle",
|
|
"apiUrl": "",
|
|
"headers": "{ \"Content-Type\": \"application/json\" }",
|
|
"apiMethod": "GET",
|
|
"textColor": "#1e40af",
|
|
"borderColor": "#3b82f6",
|
|
"description": "External API call",
|
|
"requestBody": "",
|
|
"errorVariable": "apiError",
|
|
"outputVariable": "apiResponse",
|
|
"backgroundColor": "#eff6ff",
|
|
"continueOnError": false
|
|
},
|
|
"type": "api",
|
|
"label": "Called Family Tree",
|
|
"position": { "x": 2295, "y": -525 }
|
|
},
|
|
{
|
|
"id": "text-annotation-1752114833800",
|
|
"data": {
|
|
"label": "",
|
|
"shape": "rectangle",
|
|
"width": 200,
|
|
"height": 80,
|
|
"isShape": true,
|
|
"shapeType": "text-annotation",
|
|
"textColor": "#92400e",
|
|
"borderColor": "#fbbf24",
|
|
"description": "Family Tree",
|
|
"backgroundColor": "#fffbeb"
|
|
},
|
|
"type": "text-annotation",
|
|
"label": "BF-NAS-PRF-AS-FM",
|
|
"position": { "x": 2520, "y": -555 }
|
|
},
|
|
{
|
|
"id": "form-1753000000000",
|
|
"data": {
|
|
"label": "Carian Profil",
|
|
"formId": 4,
|
|
"formName": "Carian Profil",
|
|
"formUuid": "4e07fc8f-a160-478a-85fd-fa3364401545",
|
|
"description": "Skrin carian asnaf atau login",
|
|
"assignedRoles": [],
|
|
"assignedUsers": [],
|
|
"inputMappings": [],
|
|
"assignmentType": "public",
|
|
"outputMappings": [
|
|
{ "formField": "search_type", "processVariable": "carianSearchType" },
|
|
{ "formField": "search_id", "processVariable": "carianSearchId" },
|
|
{ "formField": "login_id", "processVariable": "carianLoginId" },
|
|
{
|
|
"formField": "login_password",
|
|
"processVariable": "carianLoginPassword"
|
|
}
|
|
],
|
|
"fieldConditions": [],
|
|
"assignmentVariable": "",
|
|
"assignmentVariableType": "user_id"
|
|
},
|
|
"type": "form",
|
|
"label": "Carian Profil",
|
|
"position": { "x": 450, "y": -15 }
|
|
},
|
|
{
|
|
"id": "api-1753000000001",
|
|
"data": {
|
|
"label": "Submit Carian Profil API",
|
|
"apiUrl": "https://api.example.com/profiles/search",
|
|
"headers": "{ \"Content-Type\": \"application/json\" }",
|
|
"apiMethod": "POST",
|
|
"description": "Submit profile search or login credentials",
|
|
"requestBody": "{\n \"searchType\": \"{carianSearchType}\",\n \"searchId\": \"{carianSearchId}\",\n \"loginId\": \"{carianLoginId}\",\n \"password\": \"{carianLoginPassword}\"\n}",
|
|
"errorVariable": "carianProfilApiError",
|
|
"outputVariable": "carianProfilApiResponse",
|
|
"continueOnError": false
|
|
},
|
|
"type": "api",
|
|
"label": "Submit Carian Profil API",
|
|
"position": { "x": 450, "y": 180 }
|
|
},
|
|
{
|
|
"id": "script-1753000000002",
|
|
"data": {
|
|
"label": "Process Carian Profil Response",
|
|
"scriptCode": "// Process API response from profile search/login\nconst response = processVariables.carianProfilApiResponse;\n\nif (response && response.data) {\n if (response.data.loginSuccess) {\n processVariables.loginSuccess = true;\n processVariables.profileData = response.data.profile;\n processVariables.carianProfilStatus = 'login_successful';\n } else if (response.data.profileFound) {\n processVariables.profileFound = true;\n processVariables.profileData = response.data.profile;\n processVariables.carianProfilStatus = 'profile_found';\n } else {\n processVariables.profileFound = false;\n processVariables.loginSuccess = false;\n processVariables.carianProfilStatus = 'not_found';\n }\n} else {\n processVariables.carianProfilStatus = 'error';\n processVariables.carianProfilScriptError = 'Invalid or empty API response';\n}",
|
|
"description": "Process the response from the Carian Profil API",
|
|
"errorVariable": "carianProfilScriptError",
|
|
"inputVariables": ["carianProfilApiResponse"],
|
|
"scriptLanguage": "javascript",
|
|
"continueOnError": false,
|
|
"outputVariables": [
|
|
{
|
|
"name": "profileFound",
|
|
"type": "boolean",
|
|
"description": "Indicates if a profile was found via search"
|
|
},
|
|
{
|
|
"name": "loginSuccess",
|
|
"type": "boolean",
|
|
"description": "Indicates if the asnaf login was successful"
|
|
},
|
|
{
|
|
"name": "profileData",
|
|
"type": "object",
|
|
"description": "The retrieved profile data"
|
|
},
|
|
{
|
|
"name": "carianProfilStatus",
|
|
"type": "string",
|
|
"description": "The status of the profile search/login action"
|
|
}
|
|
]
|
|
},
|
|
"type": "script",
|
|
"label": "Process Carian Profil Response",
|
|
"position": { "x": 780, "y": 180 }
|
|
},
|
|
{
|
|
"id": "rectangle-shape-1752115136908",
|
|
"data": {
|
|
"label": "",
|
|
"shape": "rectangle",
|
|
"width": 650,
|
|
"height": 400,
|
|
"isShape": true,
|
|
"shapeType": "rectangle",
|
|
"textColor": "#374151",
|
|
"borderColor": "#16a34a",
|
|
"description": "",
|
|
"backgroundColor": "#e8f5e9"
|
|
},
|
|
"type": "rectangle-shape",
|
|
"label": "",
|
|
"position": { "x": 375, "y": -45 }
|
|
},
|
|
{
|
|
"id": "text-annotation-1752115184991",
|
|
"data": {
|
|
"label": "",
|
|
"shape": "rectangle",
|
|
"width": 200,
|
|
"height": 80,
|
|
"isShape": true,
|
|
"shapeType": "text-annotation",
|
|
"textColor": "#92400e",
|
|
"borderColor": "#fbbf24",
|
|
"description": "Carian Profil",
|
|
"backgroundColor": "#fffbeb"
|
|
},
|
|
"type": "text-annotation",
|
|
"label": "BF-NAS-PRF-AS-QS-01",
|
|
"position": { "x": 810, "y": -30 }
|
|
},
|
|
{
|
|
"id": "gateway-1753100000000",
|
|
"data": {
|
|
"label": "Profil Wujud?",
|
|
"shape": "diamond",
|
|
"textColor": "#374151",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-group-ya-path",
|
|
"output": "Ya",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-1",
|
|
"value": true,
|
|
"operator": "eq",
|
|
"variable": "profileFound",
|
|
"valueType": "boolean",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "condition-group-tidak-path",
|
|
"output": "Tidak",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-2",
|
|
"value": false,
|
|
"operator": "eq",
|
|
"variable": "profileFound",
|
|
"valueType": "boolean",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"borderColor": "#6b7280",
|
|
"defaultPath": "form-1752471000000",
|
|
"description": "Check if profile exists in system",
|
|
"gatewayType": "exclusive",
|
|
"backgroundColor": "#f9fafb"
|
|
},
|
|
"type": "gateway",
|
|
"label": "Profil Wujud?",
|
|
"position": { "x": 1230, "y": 0 }
|
|
},
|
|
{
|
|
"id": "form-1753100000001",
|
|
"data": {
|
|
"label": "Pengesahan Kemaskini Profil",
|
|
"formId": 5,
|
|
"formName": "Pengesahan Kemaskini Profil",
|
|
"formUuid": "5e07fc8f-a160-478a-85fd-fa3364401546",
|
|
"description": "Borang pengesahan untuk kemaskini profil sedia ada",
|
|
"assignedRoles": [],
|
|
"assignedUsers": [],
|
|
"inputMappings": [
|
|
{
|
|
"formField": "nama_pemohon",
|
|
"processVariable": "profileData.nama"
|
|
},
|
|
{
|
|
"formField": "no_kad_pengenalan",
|
|
"processVariable": "profileData.noKadPengenalan"
|
|
},
|
|
{
|
|
"formField": "tarikh_lahir",
|
|
"processVariable": "profileData.tarikhLahir"
|
|
},
|
|
{ "formField": "alamat", "processVariable": "profileData.alamat" }
|
|
],
|
|
"assignmentType": "public",
|
|
"outputMappings": [
|
|
{
|
|
"formField": "kemaskini_profil",
|
|
"processVariable": "kemaskiniProfil"
|
|
},
|
|
{
|
|
"formField": "sebab_kemaskini",
|
|
"processVariable": "sebabKemaskini"
|
|
}
|
|
],
|
|
"fieldConditions": [],
|
|
"assignmentVariable": "",
|
|
"assignmentVariableType": "user_id"
|
|
},
|
|
"type": "form",
|
|
"label": "Pengesahan Kemaskini Profil",
|
|
"position": { "x": 1200, "y": 195 }
|
|
},
|
|
{
|
|
"id": "gateway-1753100000002",
|
|
"data": {
|
|
"label": "Perubahan Profil?",
|
|
"shape": "diamond",
|
|
"textColor": "#374151",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-group-ya-path",
|
|
"output": "Ya",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-1",
|
|
"value": "ya",
|
|
"operator": "eq",
|
|
"variable": "kemaskiniProfil",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "condition-group-tidak-path",
|
|
"output": "Tidak",
|
|
"conditions": [
|
|
{
|
|
"id": "condition-2",
|
|
"value": "tidak",
|
|
"operator": "eq",
|
|
"variable": "kemaskiniProfil",
|
|
"valueType": "string",
|
|
"logicalOperator": "and"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"borderColor": "#6b7280",
|
|
"defaultPath": "form-1752471000000",
|
|
"description": "Check if user wants to update profile",
|
|
"gatewayType": "exclusive",
|
|
"backgroundColor": "#f9fafb"
|
|
},
|
|
"type": "gateway",
|
|
"label": "Perubahan Profil?",
|
|
"position": { "x": 1440, "y": 60 }
|
|
},
|
|
{
|
|
"id": "subprocess-1753100000003",
|
|
"data": {
|
|
"label": "BF-NAS-PRF-AS-UP-02",
|
|
"shape": "rectangle",
|
|
"processId": "kemaskini-profil-process",
|
|
"textColor": "#134e4a",
|
|
"borderColor": "#14b8a6",
|
|
"description": "Sub Process: Kemaskini Profil",
|
|
"subprocessId": 3,
|
|
"inputMappings": [
|
|
{
|
|
"processVariable": "profileData",
|
|
"subprocessVariable": "profileData"
|
|
},
|
|
{
|
|
"processVariable": "sebabKemaskini",
|
|
"subprocessVariable": "sebabKemaskini"
|
|
}
|
|
],
|
|
"outputMappings": [
|
|
{
|
|
"processVariable": "updatedProfileData",
|
|
"subprocessVariable": "profileData"
|
|
},
|
|
{
|
|
"processVariable": "profileUpdateStatus",
|
|
"subprocessVariable": "updateStatus"
|
|
}
|
|
],
|
|
"subprocessName": "BF-NAS-PRF-AS-UP-02",
|
|
"backgroundColor": "#f0fdfa"
|
|
},
|
|
"type": "subprocess",
|
|
"label": "BF-NAS-PRF-AS-UP-02",
|
|
"position": { "x": 1635, "y": -30 }
|
|
},
|
|
{
|
|
"id": "subprocess-1752202751327",
|
|
"data": {
|
|
"label": "BF-NAS-BTN-PB",
|
|
"shape": "rectangle",
|
|
"textColor": "#134e4a",
|
|
"borderColor": "#14b8a6",
|
|
"description": "Sub Process: Bantuan",
|
|
"subprocessId": 4,
|
|
"subprocessName": "BF-NAS-BTN-PB",
|
|
"backgroundColor": "#f0fdfa"
|
|
},
|
|
"type": "subprocess",
|
|
"label": "BF-NAS-BTN-PB",
|
|
"position": { "x": 1635, "y": 180 }
|
|
}
|
|
],
|
|
"viewport": {
|
|
"x": -818.4067095426772,
|
|
"y": 210.4283305655609,
|
|
"zoom": 0.5930425475009586
|
|
}
|
|
}
|