@startuml
title ** __DSPA Provisioning PCF - SwitchControl Postpaid changeBan flow 2__ **\n

queue CHANGEBAN_QUEUE #Magenta

participant "SwitchEventsEMSConsumer" as switchEventsEMSConsumer.changeBanProcess
participant "ProvisioningProcessorUtil" as provisioningHandlerUtil.constructDSPMessage
participant "SwitchEventsProcessorService" as switchEventsProcessorService
participant "DBProcessorManager" as dbProcessorManager
participant "MessageHelper" as  messageHelper.publishToTopic
database "DSPA_DB" #palegreen
queue "PUBLISH_TOPIC" #Magenta

switchEventsProcessor.changeBanProcess -> switchEventsProcessor.changeBanProcess: changeBanProcess 
note left
queue: tmobile.dspa.queue.event.changeban
endnote 
 switchEventsEMSConsumer.activationProcess -> provisioningHandlerUtil.constructDSPMessage: constructDSPMessage(message)
 switchEventsEMSConsumer.activationProcess -> switchEventsProcessorService: changeBan(dspMessage)
 switchEventsProcessorService -> switchEventsProcessorService: generateCustomerId(dspMessage)
 switchEventsProcessorService -> dbProcessorManager: getAccountInfo(newBan)
 dbProcessorManager-> DSPA_DB: getAccountInfo(newBan)
 switchEventsProcessorService -> dbProcessorManager: updateBan(custId, newBAN, oldBAN)
 dbProcessorManager-> DSPA_DB: updateBan(custId, newBAN, oldBAN)
 switchEventsProcessorService -> messageHelper.publishToTopic: send to publish topic
 group#DarkSeaGreen <b>Topic: TMOBILE.<env>.DSPA.TOPIC.PUBLISH, event:'updateBan' and MsgType: "Publish"
 messageHelper.publishToTopic --[#blue]> PUBLISH_TOPIC: publish the message \n [[../provisioningems/ce.dsg.dice.prov.ems.pcf.publishtopic.updateban.svg Provisioning_AsyncFlow_updateban_event]] 
 end
@enduml