@startuml
skinparam SequenceMessageAlign center
Actor "DSGMPCS" as Source
participant "HAProxy" as Gateway
participant "TIBCOCE" as TIBCOCE
participant "REEF" as REEF
participant "PublishEvent" as PublishEvent

Source -> Gateway : Client triggers event by invoking PublishEventService.postEvent SOAP call [[https://bitbucket.service.edp.t-mobile.com/projects/EITCODEDOC/repos/flow-documentation/browse/swagger/ce.dsg.dice.metro/PublishEventService.wsdl WSDL]]
	Gateway -> TIBCOCE : Receives request and routes it to TIBCOCE handler <Color:green><B>"PublishEvent"</B></Color>
		alt if EventName=tib:tokenize($GetVariable/root/input,',') in request
			TIBCOCE -> PublishEvent : Invoke [[../PublishEvent/ce.dsg.dice.mpcs.publishEvent.postEvent.svg PublishEvent.postEvent]] operation by SOAP Call
			PublishEvent -> TIBCOCE : Return Response to TIBCOCE
		else else
			alt if TMO/Env/EventManagement/useTIBCOBEEventFramework="true"
				TIBCOCE -> REEF : Initiate [[../REEF/ce.dsg.dice.mpcs.reef.svg REEF]] flow by Publishing a message to JMS Queue 'TMOBILE.',$_globalVariables/pfx3:GlobalVariables/TMO/Env/Env_Name_BE,'.EVENTFRAMEWORK.REQUEST' (REEF)
				REEF -> TIBCOCE :
			else else
				TIBCOCE -> PublishEvent : Invoke [[../PublishEvent/ce.dsg.dice.mpcs.publishEvent.postEvent.svg PublishEvent.postEvent]] operation by SOAP Call
				PublishEvent -> TIBCOCE : Return Response to TIBCOCE
			end
		end
	TIBCOCE->Gateway : Return Response to Gateway
Gateway->Source : Return Response to Client
@enduml