Update documentation for restart ACM 77/135577/1
authorFrancescoFioraEst <francesco.fiora@est.tech>
Wed, 26 Jul 2023 16:19:03 +0000 (17:19 +0100)
committerFrancesco Fiora <francesco.fiora@est.tech>
Thu, 27 Jul 2023 09:29:56 +0000 (09:29 +0000)
Issue-ID: POLICY-4782
Change-Id: If1f15b745fc98e5c7fccfc444dd14a78b4ec42e9
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
docs/clamp/acm/api-protocol/acm-participant-protocol.rst [changed mode: 0644->0755]
docs/clamp/acm/api-protocol/puml/ParticipantDeregister.puml [changed mode: 0644->0755]
docs/clamp/acm/api-protocol/puml/ParticipantRegister.puml [changed mode: 0644->0755]
docs/clamp/acm/api-protocol/system-level-dialogues.rst [changed mode: 0644->0755]
docs/clamp/acm/design-impl/participants/participant-intermediary.rst [changed mode: 0644->0755]
docs/clamp/acm/files/ACM-Message-Table.csv [changed mode: 0644->0755]
docs/clamp/acm/images/system-dialogues/DeregisterParticipant.png [changed mode: 0644->0755]
docs/clamp/acm/images/system-dialogues/RegisterParticipant.png [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index b4755ae..ee9213c
@@ -19,11 +19,13 @@ Participant Registration and De-Registration
 --------------------------------------------
 
 Participant Registration is performed by a Participant when it starts up. It registers its ID and the ACM Element Types it supports with the ACM runtime.
+In a scenario where Participant has been restarted, ACM runtime have to provide all Primed ACM Definition and Deployed ACM instances of the Participant sending a Restart message.
+
 
 .. image:: ../images/system-dialogues/RegisterParticipant.png
 
 
-Participant Deregistration is performed by a Participant when it shuts down. It deregisters its ID and type with the ACM runtime. The participant should already have cleared down all its' ACM Element instances and set their states to “Not In Service”.
+Participant Deregistration is performed by a Participant when it shuts down. It deregisters its ID and type with the ACM runtime.
 
 .. image:: ../images/system-dialogues/DeregisterParticipant.png
 
old mode 100644 (file)
new mode 100755 (executable)
index 8b6a18e..acbec2a
@@ -1,5 +1,6 @@
 @startuml
-Participant -> CLAMP_Runtime: Participant Deregistration
-Participant <- CLAMP_Runtime: Participant Deregistration Ack
+Participant -> "ACM Runtime": [ASYNC] Deregister
+"ACM Runtime" -> "ACM Database": Set Participant State as OFF_LINE
+Participant <- "ACM Runtime": [ASYNC] Deregistration Accepted
 Participant -> Participant: Shutdown Participant
 @enduml
old mode 100644 (file)
new mode 100755 (executable)
index af42d57..f8aeee8
@@ -1,17 +1,20 @@
 @startuml
 activate Participant
-Participant -> Participant: Start Participant
+  Participant -> "CLAMP Runtime": [ASYNC] Register
+activate "CLAMP Runtime"
 deactivate Participant
-Participant -> CLAMP_Runtime: Participant Registration
-Participant <- CLAMP_Runtime: Participant Registration Ack
-activate CLAMP_Runtime
-loop over Automation Composition Type Definitions
-       CLAMP_Runtime -> CLAMP_Runtime: Collect Automation Composition Element Type Definitions and\nCommon Property Values for\nParticipant Type of this Participant
-end
-deactivate CLAMP_Runtime
-Participant <- CLAMP_Runtime: Participant Update\n[Automation Composition Element Type Definitions and\nCommon Property Values for\nParticipant Type of Participant]
+  "CLAMP Runtime" -> "CLAMP Database": Create or Update Perticipant Registration,\n store supported ACM element types \n and set Perticipant State as ON_LINE
+  "CLAMP Runtime" -> Participant: [ASYNC] Registration Accepted
+  loop over ACM Definition
+         "CLAMP Runtime" -> "CLAMP Database": Mark all ACM element instances deployed\n on Participant as Restarting
+    "CLAMP Runtime" -> Participant: [ASYNC] Restart\n send Common Property Values\n and Instance Elements of this Participant]
+deactivate "CLAMP Runtime"
 activate Participant
-Participant -> Participant: Store Automation Composition Element Type Definitions and\nCommon Property Values
-Participant -> CLAMP_Runtime: Participant Update Ack
+Participant -> Participant: Store Common Property Values and Instance Elements
+Participant -> "CLAMP Runtime": [ASYNC] State Change Ack
+activate "CLAMP Runtime"
 deactivate Participant
+  "CLAMP Runtime" -> "CLAMP Database": Remove Restarting from all Compositions \n and Instances of this Participant
+deactivate "CLAMP Runtime"
+  end
 @enduml
old mode 100644 (file)
new mode 100755 (executable)
index 6be26e1..4952188
@@ -22,7 +22,7 @@ Participant Registration is performed by a Participant when it starts up. It reg
 
 1.2 Deregister a Participant
 ----------------------------
-Participant Deregistration is performed by a Participant when it shuts down. It deregisters its ID and type with the ACM runtime. The participant should already have cleared down all its ACM Element instances and set their states to "Not In Service".
+Participant Deregistration is performed by a Participant when it shuts down. It deregisters its ID and type with the ACM runtime.
 
 .. image:: ../images/system-dialogues/DeregisterParticipant.png
 
old mode 100644 (file)
new mode 100755 (executable)
index 42ae2d5..36b1319
@@ -27,6 +27,7 @@ Inbound messages to participants
 - PARTICIPANT_PRIME: a message received from clamp-acm runtime server for a participant update with tosca definitions of clamp-acm
 - PARTICIPANT_STATUS_REQ: A status request received from clamp-acm runtime server to send an immediate ParticipantStatus from all participants
 - PROPERTIES_UPDATE: a message received from clamp-acm runtime server for updating the Ac instance property values
+- PARTICIPANT_RESTART: a message received from clamp-acm runtime server with tosca definitions and the Ac instances to handle restarting
 
 Outbound messages
 -----------------
@@ -43,12 +44,14 @@ Design of a PARTICIPANT_REGISTER message
 - in AC-runtime ParticipantRegisterListener collects the message from Message Broker
 - if participant is not present in DB, it saves participant reference with status ON_LINE to DB
 - It triggers the execution to send a PARTICIPANT_REGISTER_ACK message to the participant registered
+- if participant is present in DB and there are AC Definitions related to the Participant, 
+  it triggers the execution to send a PARTICIPANT_RESTART message to the participant restarted 
 
 Design of a PARTICIPANT_DEREGISTER message
 ------------------------------------------
 - A participant is going to close and undeploys all AC-elements and send a PARTICIPANT_DEREGISTER message
 - in AC-runtime, ParticipantDeregisterListener collects the message from Message Broker
-- if participant has AC-elements instance, it updates with UNDEPLOYED deployStatus
+- It saves participant reference with status OFF_LINE to DB
 - It triggers the execution to send a PARTICIPANT_DEREGISTER_ACK message to the participant deregistered
 - Participant is not monitored.
 
old mode 100644 (file)
new mode 100755 (executable)
index 725ac1e..647c2f0
@@ -1,32 +1,55 @@
 Message,Source,Target,Purpose,Important Fields,Field Descriptions
 ParticipantRegister,Participant,ACM Runtime,Participant registers with the ACM runtime,participantId,The ID of this participant – in UUID format
 ,,,,participantSupportedElementTypes,A list of element types that this participant supports
+,,,,messageType,Enum indicating the type of message PARTICIPANT_REGISTER
 ParticipantRegisterAck,ACM Runtime,Participant,Acknowledgment of Participant Registration,participantId,The ID of this participant – in UUID format
-,,,,Result,Success/Fail
-,,,,Message,A message indicating the reason for failure
+,,,,messageType,Enum indicating the type of message PARTICIPANT_REGISTER_ACK
 ParticipantDeregister,Participant,ACM Runtime,Participant deregisters with the ACM runtime,participantId,The ID of this participant – in UUID format
+,,,,messageType,Enum indicating the type of message PARTICIPANT_DEREGISTER
 ParticipantDeregisterAck,ACM Runtime,Participant,Acknowledgment of Participant Deegistration,participantId,The ID of this participant – in UUID format
-,,,,Result,Success/Fail
-,,,,Message,A message indicating the reason for failure
+,,,,messageType,Enum indicating the type of message PARTICIPANT_DEREGISTER_ACK
 ParticipantPrime,ACM Runtime,Participant,Trigger priming/depriming in the participant,participantId,The ID of this participant – in UUID format
+,,,,compositionId,The id of the AC Definition related to this message
 ,,,,participantDefinitionUpdates,Contains AC element definition values for a particular participant
-,,,,Result,Success/Fail
-,,,,Message,A message indicating the reason for failure
+,,,,messageType,Enum indicating the type of message PARTICIPANT_PRIME
 ParticipantPrimeAck,Participant,ACM Runtime,Message to confirm participant has been primed/deprimed,participantId,The ID of this participant – in UUID format
-,,,,Result,Success/Fail
-,,,,Message,A message indicating the reason for failure
+,,,,compositionId,The id of the AC Definition related to this message
+,,,,stateChangeResult,NO_ERROR/FAILED
+,,,,message,A message indicating the result
+,,,,messageType,Enum indicating the type of message PARTICIPANT_PRIME_ACK
 ParticipantStatusReq,ACM Runtime,Participant,Message sent to reques a status update from the participant,participantId,The ID of the participant to request update from – in UUID format
 ,,,,messageType,Enum indicating the type of message PARTICIPANT_STATUS_REQ
 ParticipantStatus,Participant,ACM Runtime,Status update message,state,Enum indicating the current state of the participant
 ,,,,participantDefinitionUpdates,"A list of ParticipantDefinition updates, returned in response to ParticipantStatusReq only"
 ,,,,automationCompositionInfoList,List of AutomationCompositionInfo types with AutomationCompositionId and its state
 ,,,,participantSupportedElementTypes,Ac element types that this participant is capable for deployinh/supporting
+,,,,messageType,Enum indicating the type of message PARTICIPANT_STATUS
 AutomationCompositionDeploy,ACM Runtime,Participant,Message to request change state of composition to DEPLOY,participantUpdatesList,A list of ParticipantUpdates instances which carries details of an updated participant.
+,,,,compositionId,The id of the AC Definition related to this message
+,,,,automationCompositionId,The id of the automation composition related to this message
 ,,,,startPhase,Integer indicating the start up order of the elements
 ,,,,participantId,UUID indicating the participant the message is intended for
+,,,,messageType,Enum indicating the type of message AUTOMATION_COMPOSITION_DEPLOY
 AutomationCompositionDeployAck,Participant,ACM Runtime,Message to acknowledge that deploy or state change message has been received by participant,automationCompositionResultMap,"A map with AutomationCompositionElementID as its key, and a pair of result and message as value per AutomationCompositionElement"
+,,,,compositionId,The id of the AC Definition related to this message
 ,,,,automationCompositionId,The id of the automation composition related to this message
+,,,,message,A message indicating the result
+,,,,stateChangeResult,NO_ERROR/FAILED
+,,,,messageType,Enum indicating the type of message AUTOMATION_COMPOSITION_DEPLOY_ACK
 AutomationCompositionStateChange,ACM Runtime,Participant,Message to request change state of composition to states other than DEPLOY,deployOrderedState,Enum indicating the deployment state being requested
 ,,,,lockOrderedState,Enum indicating the lock state being requested
+,,,,compositionId,The id of the AC Definition related to this message
+,,,,automationCompositionId,The id of the automation composition related to this message
 ,,,,startPhase,Integer indicating the start up order of the elements
 ,,,,participantId,UUID indicating the participant the message is intended for
+,,,,messageType,Enum indicating the type of message AUTOMATION_COMPOSITION_STATECHANGE_ACK
+PropertiesUpdate,ACM Runtime,Participant,Message to request update,participantUpdatesList,A list of ParticipantUpdates instances which carries details of an updated participant.
+,,,,compositionId,The id of the AC Definition related to this message
+,,,,automationCompositionId,The id of the automation composition related to this message
+,,,,participantId,UUID indicating the participant the message is intended for
+,,,,messageType,Enum indicating the type of message PROPERTIES_UPDATE
+ParticipantRestart,ACM Runtime,Participant,Message to request update,participantId,The ID of this participant – in UUID format
+,,,,automationcompositionList,A list of ParticipantRestartAc instances which carries details of an updated participant.
+,,,,compositionId,The id of the AC Definition related to this message
+,,,,participantDefinitionUpdates,Contains AC element definition values for a particular participant
+,,,,messageType,Enum indicating the type of message PARTICIPANT_RESTART
old mode 100644 (file)
new mode 100755 (executable)
index c37c578..092e80b
Binary files a/docs/clamp/acm/images/system-dialogues/DeregisterParticipant.png and b/docs/clamp/acm/images/system-dialogues/DeregisterParticipant.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 674f56e..0cc8a81
Binary files a/docs/clamp/acm/images/system-dialogues/RegisterParticipant.png and b/docs/clamp/acm/images/system-dialogues/RegisterParticipant.png differ