graph BT
%% EndPoints - the process terminates with one of these
EndWithIssue((This client
will not be accepted
into the Client Service))
style EndWithIssue fill:red,stroke:#333,stroke-width:4px
EndWithIssueNotInLME((This client
will not be accepted
into the Client Service))
style EndWithIssueNotInLME fill:red,stroke:#333,stroke-width:4px
style EndWithIssue fill:red,stroke:#333,stroke-width:4px
EndWithSuccess((This client
will be loaded
into the Client Service))
style EndWithSuccess fill:green,stroke:#333,stroke-width:4px
%% Messages - outcome from a decision
ClientNotInLegalEntity(The client could
not be found in
Legal Entity)
ClientHasNoSdsId(The client is in
Legal Entity, but
the SDS is blank)
%% Steps - These are the logical steps
CheckMappedLegalEntity[Check mappings]
CheckLegalEntity[Check Legal Entity]
CheckCounterparty[Check SDS]
CheckSdsMq[Confirm that record was sent]
%% Tests - these are the tests we apply
TestExistMappedLegalEntity{Is the client in mapped legal entity?}
TestExistLegalEntity{Is the client in legal entity?}
TestSDSLegalEntity{Does the client have an SDS Id in Legal Entity?}
TestExistCounterparty{Is the client in SDS Counterparty?}
TestExistSdsMq{Have we received this client from SDS?}
%%Put it all together
CheckMappedLegalEntity --> TestExistMappedLegalEntity
TestExistMappedLegalEntity -.No.-> EndWithIssueNotInLME
TestExistMappedLegalEntity -.Yes.-> CheckLegalEntity
CheckLegalEntity --> TestExistLegalEntity
TestExistLegalEntity -.Yes.-> TestSDSLegalEntity
TestExistLegalEntity -.No.-> ClientNotInLegalEntity
TestSDSLegalEntity -.Yes.-> CheckCounterparty
TestSDSLegalEntity -.No.-> ClientHasNoSdsId
ClientHasNoSdsId ==> EndWithIssue
ClientNotInLegalEntity --> EndWithIssue
CheckCounterparty --> TestExistCounterparty
TestExistCounterparty -.Yes.-> EndWithSuccess
TestExistCounterparty -.No.-> CheckSdsMq
CheckSdsMq --> TestExistSdsMq
TestExistSdsMq -.Yes.-> EndWithIssue
TestExistSdsMq -.No.-> EndWithIssue