...
- Gui calls POST "/commission" endpoint with a Control Loop Type Definition (Tosca Service Template) as body
- it saves to DB the Tosca Service Template using PolicyModelsProvider
- if there are participants registered, it triggers the execution to send a broadcast PARTICIPANT_UPDATE message
- the message is built by ParticipantUpdatePublisher using Tosca Service Template data (to fill the list of ParticipantDefinition).
...
- GUI calls DELETE "/commission" endpoint
- if there are participants registered, it triggers the execution to send a broadcast PARTICIPANT_UPDATE message
- the message is built by ParticipantUpdatePublisher with a empty list of ParticipantDefinition
- delete deletes the Control Loop Type from DB
...
- GUI calls POST "/instantiation" endpoint with a Control Loop as body
- it validates the Control Loop
- it saves the Control Loop to DB
...
- GUI calls PUT "/instantiation" endpoint with a Control Loop as body
- it validates the Control Loop
- it save saves the Control Loop to DB
Design of a deletion of a Control Loop
- GUI calls DELETE "/instantiation" endpoint
- it checks that Control Loop is in UNINITIALISED status
- it deletes the Control Loop from DB
...
- GUI calls "/instantiation/command" endpoint with PASSIVE as orderedState
- it checks if participants registered are matching with the list of control Loop Element
- it updates control loop and control loop elements to DB (orderedState = PASSIVE)
- it validates the status order issued
- it triggers the execution to send a broadcast CONTROL_LOOP_UPDATE message
- the message is built by ControlLoopUpdatePublisher using Tosca Service Template data and ControlLoop data. (with startPhase = 0)
- it updates control loop and control loop elements to DB (state = UNINITIALISED2PASSIVE)
...
- GUI calls "/instantiation/command" endpoint with UNINITIALISED as orderedState
- it checks if participants registered are matching with the list of control Loop Element
- it updates control loop and control loop elements to DB (orderedState = UNINITIALISED)
- it validates the status order issued
- it triggers the execution to send a broadcast CONTROL_LOOP_STATE_CHANGE message
- the message is built by ControlLoopStateChangePublisher with controlLoopId
- it updates control loop and control loop elements to DB (state = PASSIVE2UNINITIALISED)
...
- GUI calls "/instantiation/command" endpoint with RUNNING as orderedState
- check checks if participants registered are matching with the list of control Loop Element.
- update updates control loop and control loop elements to DB (orderedState = RUNNING)
- validate validates the status order issued
- trigger to ControlLoopStateChangePublisher triggers the execution to send a broadcast CONTROL_LOOP_STATE_CHANGE message
- the message is built by ControlLoopStateChangePublisher with controlLoopId
- update updates control loop and control loop elements to DB (state = PASSIVE2RUNNING)
Design of a issues control loop commands to control loops - case RUNNING to PASSIVE
- CALL GUI calls "/instantiation/command" endpoint with UNINITIALISED as orderedState
- check checks if participants registered are matching with the list of control Loop Element.
- update updates control loop and control loop elements to db (orderedState = RUNNING)
- validate validates the status order issued
- trigger triggers the execution to ControlLoopStateChangePublisher to send a broadcast CONTROL_LOOP_STATE_CHANGE message
- the message is built by ControlLoopStateChangePublisher with controlLoopId
- update updates control loop and control loop elements to db (state = RUNNING2PASSIVE)
...
Design of a PARTICIPANT_REGISTER message
- ParticipantRegisterListener collects the message is collected by ParticipantRegisterListenerfrom DMaap
- the participant is save to db if not present, saves participant reference with status UNKNOWN to DB
- if is present a Control Loop Type, it triggers the execution to ParticipantUpdatePublisher to send a PARTICIPANT_UPDATE message to the participant registered (message of Priming).
- the message is built by ParticipantUpdatePublisher using Tosca Service Template data (to fill the list of ParticipantDefinition).
- trigger to ParticipantRegisterAckPublisher triggers the execution to send a PARTICIPANT_REGISTER_ACK message to the participant registered
- from MessageIntercept the event is intercepted and intercepts that event, if PARTICIPANT_UPDATE message has been sent, it will be add a task to handle PARTICIPANT_REGISTER in SupervisionScanner
- in SupervisionScanner start starts the monitoring for participantUpdate participantUpdate
Design of a PARTICIPANT_UPDATE_ACK message
...