{ "edges": [ { "id": "start-1751870920411-form-1752471000000-1752213918971", "data": {}, "type": "custom", "label": "", "source": "start-1751870920411", "target": "form-1752471000000", "animated": true, "sourceHandle": "start-1751870920411-right", "targetHandle": "form-1752471000000-left" }, { "id": "form-1752471000000-api-1752471000010-1752213921952", "data": {}, "type": "custom", "label": "", "source": "form-1752471000000", "target": "api-1752471000010", "animated": true, "sourceHandle": "form-1752471000000-bottom", "targetHandle": "api-1752471000010-top" }, { "id": "api-1752471000010-script-1752471000020-1752213928277", "data": {}, "type": "custom", "label": "", "source": "api-1752471000010", "target": "script-1752471000020", "animated": true, "sourceHandle": "api-1752471000010-right", "targetHandle": "script-1752471000020-left" }, { "id": "script-1752471000020-form-1751870928350-1752213932854", "data": {}, "type": "custom", "label": "", "source": "script-1752471000020", "target": "form-1751870928350", "animated": true, "sourceHandle": "script-1752471000020-right", "targetHandle": "form-1751870928350-left" }, { "id": "form-1751870928350-api-1751871528249-1752213937166", "data": {}, "type": "custom", "label": "", "source": "form-1751870928350", "target": "api-1751871528249", "animated": true, "sourceHandle": "form-1751870928350-bottom", "targetHandle": "api-1751871528249-top" }, { "id": "api-1751871528249-script-1751871635000-1752213939472", "data": {}, "type": "custom", "label": "", "source": "api-1751871528249", "target": "script-1751871635000", "animated": true, "sourceHandle": "api-1751871528249-right", "targetHandle": "script-1751871635000-left" }, { "id": "gateway-family-tree-choice-form-kategori-asnaf-1752213977562", "data": {}, "type": "custom", "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-pengesahan-api-pengesahan-submit-1752214069039", "data": {}, "type": "custom", "label": "", "source": "form-pengesahan", "target": "api-pengesahan-submit", "animated": true, "sourceHandle": "form-pengesahan-bottom", "targetHandle": "api-pengesahan-submit-left" }, { "id": "api-pengesahan-submit-script-process-pengesahan-1752214088487", "data": {}, "type": "custom", "label": "", "source": "api-pengesahan-submit", "target": "script-process-pengesahan", "animated": true, "sourceHandle": "api-pengesahan-submit-right", "targetHandle": "script-process-pengesahan-left" }, { "id": "script-process-pengesahan-gateway-status-check-1752214096335", "data": {}, "type": "custom", "label": "", "source": "script-process-pengesahan", "target": "gateway-status-check", "animated": true, "sourceHandle": "script-process-pengesahan-bottom", "targetHandle": "gateway-status-check-left" }, { "id": "start-1751870920411-form-1753000000000-1752214106743", "data": {}, "type": "custom", "label": "", "source": "start-1751870920411", "target": "form-1753000000000", "animated": true, "sourceHandle": "start-1751870920411-right", "targetHandle": "form-1753000000000-left" }, { "id": "form-1753000000000-api-1753000000001-1752214111161", "data": {}, "type": "custom", "label": "", "source": "form-1753000000000", "target": "api-1753000000001", "animated": true, "sourceHandle": "form-1753000000000-bottom", "targetHandle": "api-1753000000001-top" }, { "id": "api-1753000000001-script-1753000000002-1752214115516", "data": {}, "type": "custom", "label": "", "source": "api-1753000000001", "target": "script-1753000000002", "animated": true, "sourceHandle": "api-1753000000001-right", "targetHandle": "script-1753000000002-left" }, { "id": "script-1753000000002-gateway-1753100000000-1752214119151", "data": {}, "type": "custom", "label": "", "source": "script-1753000000002", "target": "gateway-1753100000000", "animated": true, "sourceHandle": "script-1753000000002-right", "targetHandle": "gateway-1753100000000-left" }, { "id": "gateway-1753100000000-form-1753100000001-1752214129187", "data": {}, "type": "custom", "label": "Ya", "source": "gateway-1753100000000", "target": "form-1753100000001", "animated": true, "sourceHandle": "gateway-1753100000000-right", "targetHandle": "form-1753100000001-top" }, { "id": "gateway-1753100000000-form-1751870928350-1752214132173", "data": {}, "type": "custom", "label": "Tidak", "source": "gateway-1753100000000", "target": "form-1751870928350", "animated": true, "sourceHandle": "gateway-1753100000000-right", "targetHandle": "form-1751870928350-left" }, { "id": "form-1753100000001-gateway-1753100000002-1752214140594", "data": {}, "type": "custom", "label": "", "source": "form-1753100000001", "target": "gateway-1753100000002", "animated": true, "sourceHandle": "form-1753100000001-right", "targetHandle": "gateway-1753100000002-left" }, { "id": "gateway-1753100000002-subprocess-1753100000003-1752214144896", "data": {}, "type": "custom", "label": "Ya", "source": "gateway-1753100000002", "target": "subprocess-1753100000003", "animated": true, "sourceHandle": "gateway-1753100000002-right", "targetHandle": "subprocess-1753100000003-left" }, { "id": "gateway-1753100000002-subprocess-1752202751327-1752214146974", "data": {}, "type": "custom", "label": "Tidak", "source": "gateway-1753100000002", "target": "subprocess-1752202751327", "animated": true, "sourceHandle": "gateway-1753100000002-right", "targetHandle": "subprocess-1752202751327-left" }, { "id": "gateway-status-check-subprocess-1752202751327-1752214182325", "data": {}, "type": "custom", "label": "Berjaya FM", "source": "gateway-status-check", "target": "subprocess-1752202751327", "animated": true, "sourceHandle": "gateway-status-check-right", "targetHandle": "subprocess-1752202751327-left" }, { "id": "gateway-status-check-subprocess-1752208906615-1752214184716", "data": {}, "type": "custom", "label": "Berjaya Non-FM", "source": "gateway-status-check", "target": "subprocess-1752208906615", "animated": true, "sourceHandle": "gateway-status-check-right", "targetHandle": "subprocess-1752208906615-left" }, { "id": "gateway-status-check-notification-1753200000001-1752214194993", "data": {}, "type": "custom", "label": "Berjaya Fakir Miskin & Non-FM", "source": "gateway-status-check", "target": "notification-1753200000001", "animated": true, "sourceHandle": "gateway-status-check-right", "targetHandle": "notification-1753200000001-left" }, { "id": "gateway-status-check-notification-1753200000001-1752214200770", "data": {}, "type": "custom", "label": "Gagal", "source": "gateway-status-check", "target": "notification-1753200000001", "animated": true, "sourceHandle": "gateway-status-check-right", "targetHandle": "notification-1753200000001-left" }, { "id": "script-1751871635000-api-1752114771983-1752224956615", "data": {}, "type": "custom", "label": "", "source": "script-1751871635000", "target": "api-1752114771983", "animated": true, "sourceHandle": "script-1751871635000-right", "targetHandle": "api-1752114771983-left" }, { "id": "api-1752114771983-gateway-family-tree-choice-1752224958790", "data": {}, "type": "custom", "label": "", "source": "api-1752114771983", "target": "gateway-family-tree-choice", "animated": true, "sourceHandle": "api-1752114771983-bottom", "targetHandle": "gateway-family-tree-choice-left" }, { "id": "gateway-family-tree-choice-html-1752109761532-1752224992397", "data": {}, "type": "custom", "label": "Ya", "source": "gateway-family-tree-choice", "target": "html-1752109761532", "animated": true, "sourceHandle": "gateway-family-tree-choice-right", "targetHandle": "html-1752109761532-left" }, { "id": "form-kategori-asnaf-business-rule-1751871900000-1752225961535", "data": {}, "type": "custom", "label": "", "source": "form-kategori-asnaf", "target": "business-rule-1751871900000", "animated": true, "sourceHandle": "form-kategori-asnaf-right", "targetHandle": "business-rule-1751871900000-left" }, { "id": "business-rule-1751871900000-business-rule-1751871901000-1752225963292", "data": {}, "type": "custom", "label": "", "source": "business-rule-1751871900000", "target": "business-rule-1751871901000", "animated": true, "sourceHandle": "business-rule-1751871900000-right", "targetHandle": "business-rule-1751871901000-left" }, { "id": "business-rule-1751871901000-form-pengesahan-1752226611009", "data": {}, "type": "custom", "label": "", "source": "business-rule-1751871901000", "target": "form-pengesahan", "animated": true, "sourceHandle": "business-rule-1751871901000-right", "targetHandle": "form-pengesahan-top" }, { "id": "business-rule-1751871901000-notification-1753200000002-1752226620873", "data": {}, "type": "custom", "label": "", "source": "business-rule-1751871901000", "target": "notification-1753200000002", "animated": true, "sourceHandle": "business-rule-1751871901000-right", "targetHandle": "notification-1753200000002-top" } ], "nodes": [ { "id": "gateway-family-tree-choice", "data": { "label": "Lihat Tanggungan", "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": "Check if have dependency", "gatewayType": "exclusive", "backgroundColor": "#f9fafb" }, "type": "gateway", "label": "Lihat Tanggungan", "position": { "x": 2070, "y": -345 } }, { "id": "form-kategori-asnaf", "data": { "label": "Pilihan Kategori Asnaf", "shape": "rectangle", "formId": 7, "formName": "Pilihan Kategori Asnaf", "formUuid": "7e07fc8f-a160-478a-85fd-fa3364401548", "textColor": "#6b21a8", "borderColor": "#9333ea", "description": "Form untuk papar syor bantuan", "assignedRoles": [], "assignedUsers": [], "inputMappings": [ { "formField": "nama_pemohon", "processVariable": "applicantName" } ], "assignmentType": "public", "outputMappings": [ { "formField": "kategori_asnaf", "processVariable": "kategoriAsnaf" } ], "backgroundColor": "#faf5ff", "fieldConditions": [] }, "type": "form", "label": "Papar Syor Bantuan", "position": { "x": 1995, "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", "shape": "rectangle", "apiUrl": "https://jsonplaceholder.typicode.com/posts", "headers": "{ \"Content-Type\": \"application/json\" }", "apiMethod": "POST", "textColor": "#c2410c", "borderColor": "#f97316", "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", "backgroundColor": "#fff7ed", "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", "shape": "rectangle", "apiUrl": "https://jsonplaceholder.typicode.com/posts", "headers": "{ \"Content-Type\": \"application/json\" }", "apiMethod": "POST", "textColor": "#c2410c", "borderColor": "#f97316", "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", "backgroundColor": "#fff7ed", "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": "business-rule-1751871900000", "data": { "label": "BF-NAS-PRF-AS-QS-03", "shape": "rectangle", "priority": "medium", "textColor": "#1e40af", "ruleGroups": [ { "id": "group-1", "name": "Ketua Keluarga Base Amount", "actions": [ { "id": "action-1-1", "type": "set_variable", "value": 1215, "variable": "baseKifayahKetuaKeluarga" }, { "id": "action-1-2", "type": "set_variable", "value": "ketua_keluarga", "variable": "categoryKetuaKeluarga" } ], "operator": "AND", "conditions": [ { "id": "condition-1-1", "value": "", "operator": "neq", "variable": "noKadPengenalan", "valueType": "string" } ] }, { "id": "group-2", "name": "Dewasa Bekerja (18 Tahun Ke Atas)", "actions": [ { "id": "action-2-1", "type": "set_variable", "value": 412, "variable": "hadKifayahDewasaBekerja" }, { "id": "action-2-2", "type": "increment", "formula": "hadKifayahDewasaBekerja * bilanganDewasaBekerja", "variable": "totalHadKifayahDewasaBekerja" } ], "operator": "AND", "conditions": [ { "id": "condition-2-1", "value": 0, "operator": "gt", "variable": "bilanganDewasaBekerja" } ] }, { "id": "group-3", "name": "Dewasa Tidak Bekerja (18 Tahun Ke Atas)", "actions": [ { "id": "action-3-1", "type": "set_variable", "value": 167, "variable": "hadKifayahDewasaTidakBekerja" }, { "id": "action-3-2", "type": "increment", "formula": "hadKifayahDewasaTidakBekerja * bilanganDewasaTidakBekerja", "variable": "totalHadKifayahDewasaTidakBekerja" } ], "operator": "AND", "conditions": [ { "id": "condition-3-1", "value": 0, "operator": "gt", "variable": "bilanganDewasaTidakBekerja" } ] }, { "id": "group-4", "name": "Tanggungan Belajar IPT", "actions": [ { "id": "action-4-1", "type": "set_variable", "value": 613, "variable": "hadKifayahTanggunganIPT" }, { "id": "action-4-2", "type": "increment", "formula": "hadKifayahTanggunganIPT * bilanganTanggunganIPT", "variable": "totalHadKifayahTanggunganIPT" } ], "operator": "AND", "conditions": [ { "id": "condition-4-1", "value": 0, "operator": "gt", "variable": "bilanganTanggunganIPT" } ] }, { "id": "group-5", "name": "Tanggungan Berumur 7-17 tahun", "actions": [ { "id": "action-5-1", "type": "set_variable", "value": 408, "variable": "hadKifayahTanggungan7to17" }, { "id": "action-5-2", "type": "increment", "formula": "hadKifayahTanggungan7to17 * bilanganTanggungan7to17", "variable": "totalHadKifayahTanggungan7to17" } ], "operator": "AND", "conditions": [ { "id": "condition-5-1", "value": 0, "operator": "gt", "variable": "bilanganTanggungan7to17" } ] }, { "id": "group-6", "name": "Tanggungan 6 Tahun Ke Bawah", "actions": [ { "id": "action-6-1", "type": "set_variable", "value": 175, "variable": "hadKifayahTanggungan6KeBawah" }, { "id": "action-6-2", "type": "increment", "formula": "hadKifayahTanggungan6KeBawah * bilanganTanggungan6KeBawah", "variable": "totalHadKifayahTanggungan6KeBawah" } ], "operator": "AND", "conditions": [ { "id": "condition-6-1", "value": 0, "operator": "gt", "variable": "bilanganTanggungan6KeBawah" } ] }, { "id": "group-7", "name": "Calculate Total Had Kifayah", "actions": [ { "id": "action-7-1", "type": "calculation", "formula": "baseKifayahKetuaKeluarga + (totalHadKifayahDewasaBekerja || 0) + (totalHadKifayahDewasaTidakBekerja || 0) + (totalHadKifayahTanggunganIPT || 0) + (totalHadKifayahTanggungan7to17 || 0) + (totalHadKifayahTanggungan6KeBawah || 0)", "variable": "totalJumlahHadKifayah" }, { "id": "action-7-2", "type": "calculation", "formula": "((pendapatanBersih || 0) / totalJumlahHadKifayah) * 100", "variable": "peratusHadKifayah" }, { "id": "action-7-3", "type": "set_variable", "value": "completed", "variable": "kifayahCalculationStatus" } ], "operator": "AND", "conditions": [ { "id": "condition-7-1", "value": "", "operator": "neq", "variable": "noKadPengenalan" } ] } ], "borderColor": "#3b82f6", "description": " Analisa Data (Had Kifayah)", "errorVariable": "kifayahCalculationError", "outputVariable": "kifayahCalculationResult", "backgroundColor": "#eff6ff" }, "type": "business-rule", "label": "BF-NAS-PRF-AS-QS-03", "position": { "x": 2250, "y": -30 } }, { "id": "business-rule-1751871901000", "data": { "label": "BF-NAS-PRF-AS-QS-04", "shape": "rectangle", "priority": "medium", "textColor": "#1e40af", "ruleGroups": [ { "name": "Rule 1", "actions": [ { "type": "set_variable", "value": "Fakir", "variable": "kategoriKeluargaAsnaf" }, { "type": "set_variable", "value": "Fakir", "variable": "kategoriAsnafSyor" }, { "type": "set_variable", "value": "Fakir", "variable": "statusKeluarga" } ], "conditions": [ { "value": "0", "operator": "gte", "variable": "peratusHadKifayah" }, { "value": "49.9", "operator": "lte", "variable": "peratusHadKifayah" } ], "conditionType": "all" }, { "name": "Rule 2", "actions": [ { "type": "set_variable", "value": "Miskin", "variable": "kategoriKeluargaAsnaf" }, { "type": "set_variable", "value": "Miskin", "variable": "kategoriAsnafSyor" }, { "type": "set_variable", "value": "Miskin", "variable": "statusKeluarga" } ], "conditions": [ { "value": "50", "operator": "gte", "variable": "peratusHadKifayah" }, { "value": "100", "operator": "lte", "variable": "peratusHadKifayah" } ], "conditionType": "all" }, { "name": "Rule 3", "actions": [ { "type": "set_variable", "value": "Non-FM", "variable": "kategoriKeluargaAsnaf" }, { "type": "set_variable", "value": "Non-FM", "variable": "kategoriAsnafSyor" }, { "type": "set_variable", "value": "Non-FM", "variable": "statusKeluarga" } ], "conditions": [ { "value": "100", "operator": "gt", "variable": "peratusHadKifayah" } ], "conditionType": "all" }, { "name": "Rule 4", "actions": [ { "type": "set_variable", "value": "Muallaf", "variable": "kategoriAsnafSyor" }, { "type": "set_variable", "value": "Muallaf", "variable": "statusIndividu" } ], "conditions": [ { "value": "5", "operator": "lt", "variable": "tempohMasukIslam" } ], "conditionType": "all" }, { "name": "Rule 5", "actions": [ { "type": "set_variable", "value": "Generated", "variable": "syorPengesahanStatus" }, { "type": "set_variable", "value": "${new Date().toISOString()}", "variable": "tarikhPengesyoran" }, { "type": "set_variable", "value": "Berdasarkan analisis had kifayah, pemohon dikategorikan sebagai ${kategoriAsnafSyor} dengan peratus had kifayah ${peratusHadKifayah.toFixed(2)}%. Jumlah had kifayah keluarga: RM ${totalJumlahHadKifayah.toFixed(2)}.", "variable": "syorPengesahan" } ], "conditions": [ { "value": "completed", "operator": "eq", "variable": "kifayahCalculationStatus" } ], "conditionType": "all" } ], "borderColor": "#3b82f6", "description": " Syor Status Keluarga Asnaf", "errorVariable": "statusRecommendationError", "outputVariable": "statusRecommendationResult", "backgroundColor": "#eff6ff" }, "type": "business-rule", "label": "BF-NAS-PRF-AS-QS-04", "position": { "x": 2550, "y": -30 } }, { "id": "html-1752109761532", "data": { "label": "Family Tree", "shape": "rectangle", "jsCode": "", "cssCode": "", "htmlCode": "\n
This is a custom HTML node that can display rich content.
\n