Incident Processor
All about the endpoints
- processRow
- processNotificationToAgent()
- processRejectedNewAttribute()
- updatePrograms() :
- processNewHelplineUserAccount()
- processNewHelplineUserAccountOrg()
- processCloneProgram()
- processOtherProblems()
- processPortalProblems()
- processAddUserToProgram()
- processAddNewAttribute()
- processApproveNewAttributeRequest():
- processNewAgencySignUp()
- processNewAgencyApproved()
- processNewProgramSignUp()
- processNewProgramApproved():
- processCallCenterSearch()
On this page
- processRow
- processNotificationToAgent()
- processRejectedNewAttribute()
- updatePrograms() :
- processNewHelplineUserAccount()
- processNewHelplineUserAccountOrg()
- processCloneProgram()
- processOtherProblems()
- processPortalProblems()
- processAddUserToProgram()
- processAddNewAttribute()
- processApproveNewAttributeRequest():
- processNewAgencySignUp()
- processNewAgencyApproved()
- processNewProgramSignUp()
- processNewProgramApproved():
- processCallCenterSearch()
This file deals with processing the incidents from EventScheduler and checkUnprocessedAudits().
Global Vars:
datacorrection - email address portalrequest - email address
Methods:
- process Row
- processNotificationToAgent
- processRejectedNewAttribute
- updatePrograms
- processNewHelplineUserAccount
- processNewHelplineUserAccountOrg
- processCloneProgram
- processOtherProblems
- processPortalProblems
- processAddUserToProgram
- processAddNewAttribute
- processApproveNewAttribute
- processNewAgencyApproved
- processNewAgencySignup
- processNewProgramApproved
- processNewProgramSignup
- processCallCenterSearch
processRow
Switch case checks for the actions - I (Insert), U (Update), D (Delete).
INSERT Case
Fetches the incident id from IDAO.
- If incident type is newProgramSignUp -> processNewProgramSignup(id)
- If incident type is newAgencySignUp -> processNewAgencySignUp(id)
- If incident type is add/change attribute -> processAddNewAttribute(id)
- If incident type is add current user to program ->processAddUsertoProgram(id)
- If incident type is portalProblem -> processPortalProblems(id)
- If incident type is other ->processOtherProblems(id)
- If incident type is newAccountSignUp
- If organization exists -> processNewHelplineUserAccountOrg(id)
- Else add newHelpline Account->processNewHelplineUserAccount(id)
- If the incident type needs Agent support (HRIA) send notification to agent ->processNotificationtoAgent(id,incident.getIncidentrefno(), incident.getIncidenttype())
UPDATE Case
Fetches the incident id from IDAO.
- If incident type is related to call center search
- Without reference->processCallCenterSearch(id,false, inc.getIncidenttype(),inc.getRef(),inc.getSource())
- With reference->processCallCenterSearch(id,true, inc.getIncidenttype(),inc.getRef(),inc.getSource())
- If incident type is new program signup and status is approved-> updatePrograms(inc),processNewProgramApproved(id)
- If incident type is newAgencySignUp and status is approved ->updatePrograms(inc), processNewAgencyApproved(id).
- If incident type is cloneProgramRequest and status is approved ->processCloneProgram(inc).
- If incident type is add/change Attributes
- Status is approved -> processApproveNewAttribute(id).
- Status is rejected -> processRejectedNewAttribute(id).
DELETE Case
If delete is required, query is run from the utils file
processNotificationToAgent()
If incident type is dataCorrection then -> , else [fetchIncidentDetails()] Fetch all details and add to ObjectNode, and ThreadDetails to ArrayNode.
- If incident type is dataCorrection template used is
data_correction_email_notification_to_agentand email is sent via sendEmail. - else
email_notification_to_agenttemplate is used and email is sent via sendEmail.
processRejectedNewAttribute()
-> IDAO.updateRejectedOpportunity() where opportunity is not active and approval status is 424.
updatePrograms() :
Fetches OrgDetails from IDAO and will get the details of Program and agency If program is not null and has Id ->[updateOrganizations(program.getId())] where org is active and provider status is approved. If agency is not null and has Id->[updateOrganizations(agency.getId())] where org is active and provider status is approved. If attribute map is notnull and has attributes->updateAttributes(attributeids) where opportunity is active and approval status is 422.
processNewHelplineUserAccount()
Create an ObjectNode to store the details of the user like name, tokenId and email.
If user account is:
Citizen use template new_cittizen_account_signup
Helpline use template new_provider_account_signup
Finally send email via sendEmail
processNewHelplineUserAccountOrg()
Create ObjectNode to store the values.
If the user is
Citizen save name, email and tokenId
Helpline User - save all required details refer to code
If user account is:
Citizen use template new_cittizen_account_signup
Helpline use template new_provider_account_signup
Finally send an email.
processCloneProgram()
Clone the program and send email regarding the same.
processOtherProblems()
Get all the threads from the given ID and send email with threadlist as the payload with other_problem as template.
processPortalProblems()
Get all the threads from the given ID and send email with threadlist as the payload with portal_problemas template.
processAddUserToProgram()
Get userProgramDetails from IDAO and use template add_user_to_the_program, create a arraynode to save the user details and add to object node and send it as payload via sendEmail()
processAddNewAttribute()
Sends email to raise a Add New Attribute Request uses add_new_attribute_request
processApproveNewAttributeRequest()
->idao.updateApprovedOpportunity() if approved sends an email regarding the same using the template treatment_is_added_to_the_program.
processApproveNewAttributeRequest():
- idao.updateApprovedOpportunity() if approved sends an email regarding the same using the template
treatment_is_added_to_the_program.
processNewAgencySignUp()
Fetches the [newAgencySignUp] details and and emails regarding the same using the email template new_agency_signup
processNewAgencyApproved()
Fetches the [newAgencySignUp] details of the approved agency and emails regarding the same using the email template new_agency_approved.
processNewAgencyApproved()
Fetches the newAgencySignUp details of the approved agency and emails regarding the same using the email template new_agency_approved.
processNewProgramSignUp()
Fetches the newProgramSignUp details and emails regarding the same using the email template new_program_signup
[processNewProgramApproved()]
Fetches the newProgramSignUp details of the approved program and emails regarding the same using the email template new_program_approved.
processNewProgramApproved():
Fetches the newProgramSignUp details of the approved program and emails regarding the same using the email template “new_program_approved”.
processCallCenterSearch()
Fetches selectedServices from IDAO and
if incident type is call center search
is referred collect the call center referral Program Data
else collect programDetails.
Else If incident Source is PG screener or PG Search:
Use template pg_search_results_template
Else use search_result template
if the incident is referred get referralProgramDetails
Else get allProgramDetails
Send the email based on the above data, refer to code for more clarification.