@startuml

!define MS_SERVICE Digitization-Managemenet-V2
!define MS_OPERATION generate-rptc-form
!define LAST_UPDATE %date[yyyy.MM.dd 'at' HH:mm]%
!define module(x) component x <<module>> 
!define send(a,b,c) a->b : c
!define response(a,b) a-->b : Response

left header
<font color=blue>MS: MS_SERVICE/MS_OPERATION</font>
endheader

title
MS: MS_SERVICE/MS_OPERATION
Last update: LAST_UPDATE
end title

/' 
 ' This is our suppression for the footbox (aka. our diagrams box a the bottom of each flow
' tower - comment out the next line and regenerate the diagram, to see what I mean)
'/
hide footbox


/'
' The spacing in the following text is important. 
 ' 
 ' Trust me.
'/ 

center footer

Copyright (c) 2019 Amdocs.
 
Information Security Level 1 - Confidential
 
CONTAINS RESTRICTED - PROPRIETARY INFORMATION
 
This document is strictly confidential and proprietary; to be used only by authorized persons
on a need to know basis, and must not be distributed without specific permission.
 
In the event of unauthorized use of this document or the confidential information it contains,
violators will be subject to sever disciplinary action, based on Amdocs regulations, as well as
any other sanctions applicable by law.
 
endfooter

participant Channel
participant "Digitization-\nManagement-V2\n-MS" as DM
participant "DB" as DB
participant "Tuxedo" as CSM
participant "File Server" as FS


skinparam sequenceArrowThickness 2
skinparam ArrowColor  #blue 


Channel -> DM:  generate-rptc-form
activate DM#lightgreen

send(DM,DB,retrieveParamValueQuery)
activate DB#lightgreen

ref over DB
retrieveParamValueQuery
end

response(DB,DM)
deactivate DB

send(DM,FS,readFile)
activate FS#lightgreen

ref over FS
readFile
end

response(FS,DM)
deactivate FS
== File Exist ==

alt isPrintselected

send(DM,DB,retrieveMemoSystemTextQuery)
activate DB#lightgreen

ref over DB
retrieveMemoSystemTextQuery
end

response(DB,DM)
deactivate DB

send(DM,CSM,mmInMemo)
activate CSM#lightgreen

ref over CSM
mmInMemo
end

response(CSM,DM)
deactivate CSM

alt isSwapDeviceFlow

send(DM,DB,retrieveMemoSystemTextQuery)
activate DB#lightgreen

ref over DB
retrieveMemoSystemTextQuery
end

response(DB,DM)
deactivate DB

send(DM,CSM,mmInMemo)
activate CSM#lightgreen

ref over CSM
mmInMemo
end

response(CSM,DM)
deactivate CSM

send(DM,FS,readFile)
activate FS#lightgreen

ref over FS
readFile
end

response(FS,DM)
deactivate FS

== File does not exist==
send(DM,DB,retrieveSosStaticInfoQuery)
activate DB#lightgreen

ref over DB
retrieveSosStaticInfoQuery
end

response(DB,DM)
deactivate DB

send(DM,FS,writeFile)
activate FS#lightgreen

ref over FS
writeFile
end

response(FS,DM)
deactivate FS

alt isPrintselected

send(DM,DB,retrieveMemoSystemTextQuery)
activate DB#lightgreen

ref over DB
retrieveMemoSystemTextQuery
end

response(DB,DM)
deactivate DB

send(DM,CSM,mmInMemo)
activate CSM#lightgreen

ref over CSM
mmInMemo
end

response(CSM,DM)
deactivate CSM

alt isSwapDeviceFlow

send(DM,DB,retrieveMemoSystemTextQuery)
activate DB#lightgreen

ref over DB
retrieveMemoSystemTextQuery
end

response(DB,DM)
deactivate DB

send(DM,CSM,mmInMemo)
activate CSM#lightgreen

ref over CSM
mmInMemo
end

response(CSM,DM)
deactivate CSM

send(DM,FS,readFile)
activate FS#lightgreen

ref over FS
readFile
end

response(FS,DM)
deactivate FS
====
send(DM,CSM,csSendSms)
activate CSM#lightgreen

ref over CSM
csSendSms
end

response(CSM,DM)
deactivate CSM

alt isSwapDecicesFlow
send(DM,CSM,csSendSms)
activate CSM#lightgreen

ref over CSM
csSendSms
end
response(CSM,DM)
deactivate CSM

send(DM,DB,retrieveMemoSystemTextQuery)
activate DB#lightgreen

ref over DB
retrieveMemoSystemTextQuery
end

response(DB,DM)
deactivate DB

send(DM,CSM,mmInMemo)
activate CSM#lightgreen

ref over CSM
mmInMemo
end

response(CSM,DM)
deactivate CSM

alt isSwapDecicesFlow
send(DM,CSM,csSendSms)
activate CSM#lightgreen

ref over CSM
csSendSms
end
response(CSM,DM)
deactivate CSM

response(DM,Channel)
deactivate DM

@enduml