Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The CLAMP Control Loop Automation Composition Runtime Lifecycle Management uses the following system-level dialogues. These dialogues enable the CLAMP runtime capabilities described in Section 2 of TOSCA Defined Automation Compositions: Architecture and Design. Design Time dialogues will be described in future releases of the system.

Table of Contents

1 Commissioning Dialogues

Commissioning dialogues are used to commission and decommission Control Loop Automation Composition Type definitions and to set the values of Common Parameters.

1.1 Commissioning a Control Loop Type Definition using the CLAMP GUI

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Database

CLAMP_GUI -> CLAMP_Runtime: [REST] Commission Control Loop Type Definition
CLAMP_Runtime -> Database: Store Control Loop Type Definition
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definition Commissioned
@enduml

1.2 Commissioning a Control Loop Type Definition using SDC

PlantUML Macro
@startuml
participant SDC
participant Policy_Distribution
participant CLAMP_Runtime
database Database

SDC -> Policy_Distribution: [DMaaP] CSAR containing Control Loop Type Definition
Policy_Distribution -> CLAMP_Runtime: [REST] Commission Control Loop Type Definition
CLAMP_Runtime -> Database: Store Control Loop Type Definition
CLAMP_Runtime -> Policy_Distribution: [REST] Type Definition Commissioned
Policy_Distribution -> SDC: [DMaaP] Deployment Completed
@enduml

1.3 Setting Common Parameters for a Control Loop Type Definition

Commissioning an Automation Composition Type is a three-step process

  1. The Automation Composition Type must be created, that is the Automation Composition Type definition must be loaded and stored in the database. This step may be carried out over the REST interface or using SDC distribution.
  2. The Common Properties of the Automation Composition type must be assigned values and those values must be stored in the database. This step is optional only if all mandatory common properties have default values. The Common Property values may be set and amended over and over again in multiple sessions until the Automation Composition Type is primed.
  3. The Automation Composition Type Definition and the Common Property values must be primed, which is sent to the concerned participants. Once an Automation Composition Type is primed, its Common Property values can no longer be changed. To change Common Properties on a primed Automation Composition Type, all instances of the Automation Composition Type must be removed and the Automation Composition Type must be de-primed.

1.1 Commissioning an Automation Composition Type Definition using the CLAMP GUI

This dialogue corresponds to a "File→Import" menu on the CLAMP GUI. The documentation of future releases of the system will describe how the Design Time functionality interacts with the Runtime commissioning API.

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Commissioned_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Commission Automation Composition Type Definition
CLAMP_Runtime -> Commissioned_ACM_Inventory: Store Automation Composition Type Definition
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definition Commissioned
@enduml

1.2 Commissioning an Automation Composition Type Definition using SDC

PlantUML Macro
@startuml
participant SDC
participant Policy_Distribution
participant CLAMP_Runtime
database Commissioned_ACM_Inventory

SDC -> Policy_Distribution: [DMaaP] CSAR containing Automation Composition Type Definition
Policy_Distribution -> CLAMP_Runtime: [REST] Commission Automation Composition Type Definition
CLAMP_Runtime -> Commissioned_ACM_Inventory: Store Automation Composition Type Definition
CLAMP_Runtime -> Policy_Distribution: [REST] Type Definition Commissioned
Policy_Distribution -> SDC: [DMaaP] Deployment Completed
@enduml

1.3 Setting Common Properties for an Automation Composition Type Definition

This dialogue sets the values of common properties. The values of the common properties may be set, updated, or deleted at will, as this dialogue saves the properties to the database but does not send the definitions or properties to the participants. However, once an Automation Composition Type Definition and its properties are primed (See Section 1.4), the properties cannot be changed until the Automation Composition type definition is de-primed (See Section 1.5).

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Commissioned_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Automation Composition Type Definitions
CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definitions
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Type Definition for Parameterization
CLAMP_GUI -> CLAMP_Runtime: [REST] Fetch GUI fields for Common Parameter Definitions

alt Automation Composition Type Definition not Commissioned on Participants
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definition
  CLAMP_Runtime -> CLAMP_Runtime: Generate fields for Common Parameters for GUI
  CLAMP_Runtime -> CLAMP_GUI: [REST] Return GUI fields Common Parameter Definitions
  CLAMP_GUI -> CLAMP_GUI: Render UI for Common Parameters
  CLAMP_GUI -> CLAMP_GUI: Get values for Common Parameters from user
  CLAMP_GUI -> CLAMP_Runtime: [REST] Set values for Common Parameters
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Store values for Common Parameters
  CLAMP_Runtime -> CLAMP_GUI: [REST] Common Parameter values stored
else Automation Composition Type Definition already Commissioned on Participants
  CLAMP_Runtime -> CLAMP_GUI: [REST] Cannot set Common Parameters on\nAutomation Composition Type Definition that has\nbeen commissioned on participants
end

@enduml

1.4 Priming an Automation Composition Type Definition on Participants

The Priming operation sends Automation Composition Type definitions and common property values to participants. Once an Automation Composition Type definition is primed, its property values can on longer be changed until it is de-primed.

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Commissioned_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Automation Composition Type Definitions
CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definitions
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Type Definition for Priming on Participants
CLAMP_GUI -> CLAMP_Runtime: [REST] Prime Automation Composition Type Definition on Participants

alt Automation Composition Type Definition not Primed on Participants
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definition
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Common Parameter Values for Automation Composition Type Definition
  alt Common Parameter values set for Automation Composition Type Definition
    CLAMP_Runtime -> Participants: [DMaaP] Update Participants with Automation Composition Type Definition and values for Common Parameters
    CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Type Definition priming ordered on participants
  else Automation Composition Type Definition already primed on Participants
    CLAMP_Runtime -> CLAMP_GUI: [REST] Common Parameters not set\non Automation Composition Type Definition
  end
else Automation Composition Type Definition already primed on Participants
  CLAMP_Runtime -> CLAMP_GUI: [REST] Cannot set Common Parameters on\nAutomation Composition Type Definition that has\nbeen primed on participants
end

== Participant Responses ==
Participants -> CLAMP_Runtime: [DMaaP] Result of Update with Automation Composition Type Definition and values for Common Parameters
CLAMP_Runtime -> Commissioned_ACM_Inventory: Store result of Automation Composition Type Definition Update on Participant

== Supervision ==
loop forever
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definitions
  loop over each Automation Composition Type Definition
    alt Automation Composition Type Definition Participant priming underway
	  CLAMP_Runtime -> Commissioned_ACM_Inventory: read result of Automation Composition Type Definition Updates from participants
      alt Updates completed on all participants
	    CLAMP_Runtime -> Commissioned_ACM_Inventory: set Automation Composition Type Definition as primed on Participants
      else Updates not completed
        alt Priming of Automation Composition Type Definition on participants timed out
	      CLAMP_Runtime -> Commissioned_ACM_Inventory: set Automation Composition Type Definition priming as timed out on Participants
	      CLAMP_Runtime -> CLAMP_Runtime: Log error
        else Wait for updates to complete
        end
      end 
    else Automation Composition Type Definition Participant priming not underway
    end
  end
end
@enduml

1.5 De-Prime an Automation Composition Type Definition on Participants

This dialogue allows an Automation Composition Type Definition to be de-primed so that it can be deleted or its common parameter values can be altered.


PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Commissioned_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Automation Composition Type Definitions
CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definitions
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Type Definition for de-priming on Participants
CLAMP_GUI -> CLAMP_Runtime: [REST] De-prime Automation Composition Type Definition on Participants

alt Automation Composition Type Definition primed on Participants
  alt Automation Composition Instances do not exist for Automation Composition Type Definition
    CLAMP_Runtime -> Participants: [DMaaP] Update Participants, removing Automation Composition Type Definition and values for Common Parameters
    CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Type Definition de-priming ordered on participants
  else Automation Composition Instances exist for Automation Composition Type Definition
    CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Type Definition cannot be\n de-primed on participants\nit is in use on Automation Compositions
  end
else Automation Composition Type Definition not primed on Participants
  CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Type Definition has not\nbeen primed on participants
end

== Participant Responses ==
Participants -> CLAMP_Runtime: [DMaaP] Result of Update to remove Automation Composition Type Definition and values for Common Parameters
CLAMP_Runtime -> Commissioned_ACM_Inventory: Store result of Automation Composition Type Definition Update on Participant

== Supervision ==
loop forever
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definitions
  loop over each Automation Composition Type Definition
    alt Automation Composition Type Definition Participant de-prime underway
	  CLAMP_Runtime -> Commissioned_ACM_Inventory: read result of Automation Composition Type Definition Updates from participants
      alt Updates completed on all participants
	    CLAMP_Runtime -> Commissioned_ACM_Inventory: set Automation Composition Type Definition as de-primeed on Participants
      else Updates not completed
        alt De-priming of Automation Composition Type Definition on participants timed out
	      CLAMP_Runtime -> Commissioned_ACM_Inventory: set Automation Composition Type Definition de-priming as timed out on Participants
	    
PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Database

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Type Definitions
CLAMP_Runtime -> Database: Read Control Loop Type Definitions
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Control Loop Type Definition for Parameterization
CLAMP_GUI -> CLAMP_Runtime: [REST] Fetch GUI fields for Common Parameter Definitions

alt Control Loop Type Definition not Commissioned on Participants
  CLAMP_Runtime -> Database: Read Control Loop Type Definition
  CLAMP_Runtime -> CLAMP_Runtime: GenerateLog fieldserror
 for Common Parameters for GUI
  CLAMP_Runtime -> CLAMP_GUI: [REST] Return GUI fields Common Parameter Definitions
  CLAMP_GUI -> CLAMP_GUI: Render UI for Common Parameters
  CLAMP_GUI -> CLAMP_GUI: Get values for Common Parameters from user
  CLAMP_GUI -> CLAMP_Runtime: [REST] Set values for Common Parameters
  CLAMP_Runtime -> Database: Store values for Common Parameters
  CLAMP_Runtimeelse Wait for updates to complete
        end
      end 
    else Automation Composition Type Definition Participant de-prime not underway
    end
  end
end
@enduml

1.6 Decommissioning an Automation Composition Type Definition in CLAMP

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Commissioned_ACM_Inventory

CLAMP_GUI -> CLAMP_GUIRuntime: [REST] Read CommonAutomation ParameterComposition valuesType storedDefinitions
else Control Loop Type Definition already Commissioned on Participants
  CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definitions
CLAMP_Runtime -> CLAMP_GUI: [REST] Cannot set Common Parameters on\nControl Loop Type Definition that has\nbeen commissioned on participants
end

@enduml

1.4 Commissioning a Control Loop Type Definition on Participants

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Database

Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Type Definition for Decommissioning
CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Type Definitions
Decommission Automation Composition Type Definition

alt Automation Composition Type Definition not primed on Participants
  CLAMP_Runtime -> DatabaseCommissioned_ACM_Inventory: ReadDelete ControlAutomation LoopComposition Type DefinitionsDefinition
  CLAMP_Runtime -> CLAMP_GUI: [REST] Type DefinitionsDefinition returnedDecommissioned
CLAMP_GUI -> CLAMP_GUI: Select Control Loop else Automation Composition Type Definition foris CommissioningCommissioned on Participants
  CLAMP_GUIRuntime -> CLAMP_RuntimeGUI: [REST] CommissionAutomation ControlComposition Loop Type Definition cannot be decommissioned\nit is primed on participants
end

@enduml

1.7 Reading Commissioned Automation Composition Type Definitions

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Commissioned_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Automation Composition Type Definitions
on Participants

alt Control Loop Type Definition not Commissioned on Participants
  CLAMP_Runtime -> Database: Read Control Loop Type Definition
  CLAMP_Runtime -> DatabaseCommissioned_ACM_Inventory: Read Common Parameter Values for Control LoopAutomation Composition Type DefinitionDefinitions
CLAMP_Runtime  alt Common Parameter values set for Control Loop Type Definition
    CLAMP_Runtime -> Participants: [DMaaP] Update Participants with Control Loop Type -> CLAMP_GUI: [REST] Type Definitions returned

@enduml

2. Instantiation Dialogues

Instantiation dialogues are used to create, set parameters on, instantiate, update, and remove Automation Composition instances.

Assume a suitable Automation Composition Definition exists in the Commissioned Automation Composition Inventory. To get an Automation Composition instance running one would, for example, execute dialogues 2.1, 2.3, and 2.4.

2.1 Creating an Automation Composition Instance

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Commissioned_ACM_Inventory
database Instantiated_ACM_Inventory

CLAMP_GUIDefinition and values for Common Parameters
    CLAMP_Runtime -> CLAMP_GUI: [REST] Control Loop Type Definition commissioning ordered on participants
  else Control Loop Type Definition already Commissioned on Participants
    CLAMP_Runtime -> CLAMP_GUIRuntime: [REST] CommonRead ParametersAutomation not set\non Control Loop Type Definition
  end
else Control Loop Type Definition already Commissioned on Participants
  Composition Type Definitions
CLAMP_Runtime -> CLAMPCommissioned_ACM_GUIInventory: [REST] Cannot set Common Parameters on\nControl Loop Type Definition that has\nbeen commissioned on participants
end

== Participant Responses ==
ParticipantsRead Automation Composition Type Definitions
CLAMP_Runtime -> CLAMP_RuntimeGUI: [DMaaPREST] Result of Update with Control Loop Type Definition and values for Common ParametersDefinitions returned
CLAMP_RuntimeGUI -> DatabaseCLAMP_GUI: StoreSelect resultAutomation of ControlComposition Loop Type Definition Updateto use on Participant

== Supervision ==
loop forever
 to create Automation Composition Instance
CLAMP_GUI -> CLAMP_Runtime -> Database: Read Control Loop Type Definitions
  loop over each Control Loop Type Definition
    alt Control Loop Type Definition Participant Commission underway
	  : [REST] Fetch GUI fields for Instance Specific Parameter Definitions
CLAMP_Runtime -> Commissioned_ACM_Inventory: Read Automation Composition Type Definition
CLAMP_Runtime -> CLAMP_Runtime: Generate fields for Instance Specific Parameters for GUI
CLAMP_Runtime -> DatabaseCLAMP_GUI: read[REST] resultReturn ofGUI Controlfields LoopInstance TypeSpecific Definition Updates from participants
      alt Updates completed on all participants
	    CLAMP_Runtime -> Database: set Control Loop Type Definition as Commissioned on Participants
      else Updates not completed
        alt Commissioning of Control Loop Type Definition on participants timed out
	      Parameter Definitions
CLAMP_GUI -> CLAMP_GUI: Render UI for Instance Specific Parameters
CLAMP_GUI -> CLAMP_GUI: Get values for Instance Specific Parameters from user
CLAMP_GUI -> CLAMP_Runtime: [REST] Request Creation of Automation Composition Instance
CLAMP_Runtime -> CLAMP_Runtime: Create Automation Composition Instance
CLAMP_Runtime -> Instantiated_ACM_Inventory: Store First Version of Automation Composition Instance
CLAMP_Runtime -> DatabaseCLAMP_GUI: set[REST] ControlAutomation LoopComposition Type Definition commissioning as timed out on Participants
	      CLAMP_RuntimeInstance Updated

@enduml

Note that this dialogue creates the Automation Composition Instance in the Instantiated Automation Composition Inventory. The instance is sent to the participants using the process described in the dialogue in Section 2.3.

2.2 Updating Instance Specific Parameters on an Automation Composition Instance

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Instantiated_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: Log error
        else Wait for updates to complete
        end
      end 
    else Control Loop Type Definition Participant Commission not underway
    end
  end
end
@enduml

1.5 Decommissioning a Control Loop Type Definition on Participants

This dialogue allows a Control Loop Type Definition to be decomissioned so that it can be deleted or its common parameter values can be altered.

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Database

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Type Definitions[REST] Read Automation Composition Instances
CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Automation Composition Instances
CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Instances returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Instance on which to Update Parameters
CLAMP_GUI -> CLAMP_GUI: Step version of Automation Composition Instance as Major/Minor/Patch
CLAMP_GUI -> CLAMP_Runtime: [REST] Fetch GUI fields for Instance Specific Parameter Definitions
CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Automation Composition Type Definition
CLAMP_Runtime -> DatabaseCLAMP_Runtime: Read Control Loop Type Definitions Generate fields for Instance Specific Parameters for GUI
CLAMP_Runtime -> CLAMP_GUI: [REST] TypeReturn GUI fields Instance Specific Parameter Definitions returned
CLAMP_GUI -> CLAMP_GUI: SelectRender Control Loop Type Definition UI for DecommissioningInstance onSpecific ParticipantsParameters
CLAMP_GUI -> CLAMP_RuntimeGUI: [REST]Get Decommissionvalues Controlfor LoopInstance TypeSpecific DefinitionParameters onfrom Participants

alt Control Loop Type Definition Commissioned on Participants
  alt Control Loop Instances do not exist for Control Loop Type Definition
    user
CLAMP_GUI -> CLAMP_Runtime: [REST] Request Update of Automation Composition Instance
CLAMP_Runtime -> CLAMP_Runtime: Update Automation Composition Instance
CLAMP_Runtime -> Instantiated_ACM_Inventory: Store New Version of Automation Composition Instance
CLAMP_Runtime -> ParticipantsCLAMP_GUI: [DMaaPREST] UpdateAutomation Participants,Composition Instance Updated

@enduml

2.3 Updating an Automation Composition Instance with a Configuration on Participants

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Instantiated_ACM_Inventory

CLAMP_GUIremoving Control Loop Type Definition and values for Common Parameters
    CLAMP_Runtime -> CLAMP_GUIRuntime: [REST] ControlRead Loopall Typeconfiguration Definitionversions decommissioningof orderedAutomation onComposition participantsInstance
CLAMP_Runtime  else Control Loop Instances exist for Control Loop Type Definition
    -> Instantiated_ACM_Inventory: Read all configuration versions of Automation Composition Instance
CLAMP_Runtime -> CLAMP_GUI: [REST] Control Loop Type Definition cannot be\n decommissioned on participants\nit is in use on control loops
  end
else Control Loop Type Definition not Commissioned on Participants
  CLAMP_Runtime[REST] All configuration versions of Automation Composition Instance returned
CLAMP_GUI -> CLAMP_GUI: Select configuration version of Automation Composition Instance for Instantiation Participants
CLAMP_GUI -> CLAMP_GUIRuntime: [REST] Instantiate Controlselected Loopconfiguration Typeversion Definitionof hasAutomation not\nbeenComposition commissionedInstance on participantsParticipants
end

== Participant Responses ==
Participants ->
alt Selected configuration version of Automation Composition Instance not instantiated on Participants
  CLAMP_Runtime: [DMaaP] Result of Update to remove Control Loop Type Definition and values for Common Parameters
-> Instantiated_ACM_Inventory: Read configuration version of Automation Composition Instance
  CLAMP_Runtime -> DatabaseParticipants: Store[DMaaP] resultUpdate ofParticipants Controlwith Loopconfiguration Typeversion Definitionof UpdateAutomation onComposition Participant
Instance
== Supervision ==
loop forever
  CLAMP_Runtime -> DatabaseCLAMP_GUI: Read[REST] ControlInstantiation Loop Type Definitions
  loop over each Control Loop Type Definition
    alt Control Loop Type Definition Participant decommission underway
	of configuration version of Automation Composition Instance ordered on participants
else Selected configuration version of Automation Composition Instance instantiated on Participants
  CLAMP_Runtime -> Database: read resultCLAMP_GUI: [REST] configuration version of ControlAutomation LoopComposition TypeInstance Definitionalready Updatesinstantiated fromon participants 
end

== Participant Responses ==
Participants ->  alt Updates completed on all participants
	    CLAMP_Runtime: [DMaaP] Result of update of configuration version of Automation Composition Instance on participant
CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: setStore Controlresult Loopof Typeupdate Definitionof asconfiguration decommissionedversion onof Participants
Automation Composition Instance on participant

== Supervision else Updates not completed==
loop forever
  CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Automation Composition altInstances
 Commissioning ofloop Controlover Loopeach TypeAutomation Definition on participants timed out
	Composition Instance
      CLAMP_Runtime -> Database: set Control Loop Type Definition decommissioning as timed out on Participantsalt Automation Composition Instance configuration version update underway on participants
	      CLAMP_Runtime -> CLAMPInstantiated_ACM_RuntimeInventory: Logread error
result of Automation Composition updates from participants
   else Wait for updates to complete
   alt Updates completed on all participants
	    CLAMP_Runtime -> Instantiated_ACM_Inventory: set end
configuration version of Automation Composition Instance endas 
Instantiated on Participants
	  else Control Loop Type Definition Participant decommission not underway
    end
  end
end
@enduml

1.6 Decommissioning a Control Loop Type Definition in CLAMP

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Database

CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Type Definitions
CLAMP_Runtime -> Database: Read Control Loop Type Definitions
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Control Loop Type Definition for Decommissioning
CLAMP_GUI -> CLAMP_Runtime: [REST] Decommission Control Loop Type Definition

alt Control Loop Type Definition not Commissioned on Participants
  CLAMP_Runtime -> Instantiated_ACM_Inventory: set overall configuration version of Automation Composition Instance state as Instantiated
      else Updates not completed
        alt Instantiation of Automation Composition Instance on participants timed out
	      CLAMP_Runtime -> Instantiated_ACM_Inventory: set configuration version Automation Composition Instance Instantiation as timed out on Participants
	      CLAMP_Runtime -> DatabaseCLAMP_Runtime: DeleteLog error
  Control Loop Type Definition
  CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definition Decommissioned
else Control Loop Type Definition not Commissioned on Participants
  CLAMP_Runtime -> CLAMP_GUI: [REST] Control Loop Type Definition cannot be decommissioned\nit is commissioned on participants
end

@enduml

...

else Wait for updates to complete
        end
      end 
    else Automation Composition Instance configuration version update on participants not underway
    end
  end
end
@enduml

2.4 Changing the state of an Automation Composition Instance on Participants

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database DatabaseInstantiated_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read all ControlInstantiated LoopAutomation TypeComposition DefinitionsInstances
CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Read Controlall Instantiated LoopAutomation TypeComposition DefinitionsInstances
CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned

@enduml

2. Instantiation Dialogues

Instantiation dialogues are used to create, set parameters on, instantiate, update, and remove Control Loop instances.

2.1 Creating a Control Loop Instance

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Database

All Instantiated Automation Composition Instances returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Instance on which to change state and specify new state
CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Type Definitions
 Change state of selected Automation Composition Instance on Participants

alt Selected Automation Composition Instance instantiated on Participants
  CLAMP_Runtime -> Database: Read Control Loop Type Definitions
Participants: [DMaaP] Request change of state of Automation Composition Instance
  CLAMP_Runtime -> CLAMP_GUI: [REST] Type Definitions returned
CLAMP_GUI -> CLAMP_GUI: Select Control Loop Type Definition to use to create Control Loop Instance
CLAMP_GUIChange of state of Automation Composition Instance ordered on participants
else Selected Automation Composition Instance not instantiated on Participants
  CLAMP_Runtime -> CLAMP_RuntimeGUI: [REST] FetchAutomation GUIComposition fieldsInstance fornot Instanceinstantiated Specificon Parameterparticipants Definitions
CLAMP_Runtime -> Database: Read Control Loop Type Definition
CLAMP_Runtime
end

== Participant Responses ==
Participants -> CLAMP_Runtime: Generate fields for Instance Specific Parameters for GUI [DMaaP] Result of State Change of Automation Composition Instance on participant
CLAMP_Runtime -> CLAMP_GUI: [REST] Return GUI fields Instance Specific Parameter Definitions
CLAMP_GUI -> CLAMP_GUI: Render UI for Instance Specific Parameters
CLAMP_GUI -> CLAMP_GUI: Get values for Instance Specific Parameters from user
CLAMP_GUI -> CLAMP_Runtime: [REST] Request Creation of Control Loop Instance
Instantiated_ACM_Inventory: Store result of State Change of Automation Composition Instance on participant

== Supervision ==
loop forever
  CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Automation Composition Instances
  loop over each Automation Composition Instance
    alt Automation Composition Instance State Change underway on participants
	  CLAMP_Runtime -> CLAMPInstantiated_ACM_RuntimeInventory: Create Control Loop Instance
CLAMP_Runtime -> Database: Store First Version of Control Loop Instance
 read result of Automation Composition State Change from participants
      alt Updates completed on all participants
	    CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST]set ControlAutomation LoopComposition Instance Updated

@enduml

2.2 Updating Instance Specific Parameters on a Control Loop Instance

PlantUML Macro
@startuml
participant CLAMP_GUI
participantstate as changed on Participants
	    CLAMP_Runtime
database Database

CLAMP_GUI -> CLAMPInstantiated_ACM_RuntimeInventory: [REST] Read Control Loop Instances
CLAMP_Runtime -> Database: Read Control Loop Instances
CLAMP_Runtime -> CLAMP_GUI: [REST] Control Loop Instances returned
CLAMP_GUI -> CLAMP_GUI: Select Control Loop Instance on which to Update Parameters
CLAMP_GUI -> CLAMP_GUI: Step version of Control Loop Instance as Major/Minor/Patch
CLAMP_GUI set overall Automation Composition Instance state as changed
      else Updates not completed
        alt Automation Composition Instance State Change on participants timed out
	      CLAMP_Runtime -> Instantiated_ACM_Inventory: set Automation Composition State Change as timed out on Participants
	      CLAMP_Runtime -> CLAMP_Runtime: [REST] Fetch GUI fields for Instance Specific Parameter Definitions
CLAMP_Runtime -> Database: Read Control Loop Type Definition
CLAMP_Runtime -> CLAMP_Runtime: Generate fields for Instance Specific Parameters for GUI
CLAMP_Runtime -> CLAMP_GUI: [REST] Return GUI fields Instance Specific Parameter Definitions
CLAMP_GUI -> CLAMP_GUI: Render UI for Instance Specific Parameters
CLAMP_GUI -> CLAMP_GUI: Get values for Instance Specific Parameters from user Log error
        else Wait for updates to complete
        end
      end 
    else Automation Composition Instance State Change on participants not underway
    end
  end
end
@enduml

2.5 De-instantiating an Automation Composition Instance from Participants

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Instantiated_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] RequestRead Updateall ofInstantiated ControlAutomation LoopComposition InstanceInstances
CLAMP_Runtime -> CLAMPInstantiated_ACM_RuntimeInventory: Update Control Loop InstanceRead all Instantiated Automation Composition Instances
CLAMP_Runtime -> DatabaseCLAMP_GUI: Store[REST] NewAll VersionInstantiated ofAutomation ControlComposition LoopInstances Instancereturned
CLAMP_RuntimeGUI -> CLAMP_GUI: [REST]Select ControlAutomation Loop Instance Updated

@enduml

2.3 Updating a Control Loop Instance Version on Participants

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Database
Composition Instance to de-instantiate
CLAMP_GUI -> CLAMP_Runtime: [REST] Read all versions of Control Loop Instance
 De-instantiate selected Automation Composition Instance on Participants

alt Selected Automation Composition Instance instantiated on Participants
  CLAMP_Runtime -> DatabaseParticipants: [DMaaP] ReadUpdate allParticipants versionsto ofremove ControlAutomation LoopComposition Instance
  CLAMP_Runtime -> CLAMP_GUI: [REST] AllDe-instantiation versions of ControlAutomation LoopComposition Instance returned
CLAMP_GUI -> CLAMP_GUI: Select version of Control Loop Instance for Instantiation Participants
CLAMP_GUIordered on participants
else Selected Automation Composition Instance not instantiated on Participants
  CLAMP_Runtime -> CLAMP_RuntimeGUI: [REST] InstantiateAutomation selectedComposition versionInstance ofnot Controlinstantiated Loopon Instance on Participantsparticipants 
end

alt== SelectedParticipant version of Control Loop Instance not instantiated on Participants
 Responses ==
Participants -> CLAMP_Runtime: -> Database: Read version[DMaaP] Result of update of ControlAutomation LoopComposition Instance
 on participant
CLAMP_Runtime -> Participants: [DMaaP] Update Participants with version of Control Loop InstanceInstantiated_ACM_Inventory: Store result of update of Automation Composition Instance on participant

== Supervision ==
loop forever
  CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST]Read InstantiationAutomation ofComposition VersionInstances
 of Controlloop Loopover Instanceeach orderedAutomation onComposition participantsInstance
else  Selected version ofalt ControlAutomation LoopComposition Instance instantiatedde-instantiation update underway on Participantsparticipants
	  CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST]read Versionresult of ControlAutomation LoopComposition Instance already instantiated on participants 
end

== Participant Responses ==
Participants -> CLAMP_Runtime: [DMaaP] Result of update of version of Control Loop Instance on participant
updates from participants
      alt Updates completed on all participants
	    CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Storeset resultAutomation ofComposition updateInstance ofas version of Control Loop Instance de-instantiated on participantParticipants

==	 Supervision ==
loop forever
  CLAMP_Runtime -> Database: Read Control Loop Instances
  loop over each Control Loop Instance
 Instantiated_ACM_Inventory: set overall Automation Composition Instance as de-instantiated
      else Updates not completed
        alt ControlAutomation LoopComposition Instance Instantiation update underwayde-instantiation Update timed out on participants
	      CLAMP_Runtime -> Database: read result of Control Loop updates from participants
Instantiated_ACM_Inventory: set Automation Composition Instance de-instantiation as timed out on Participants
	      alt Updates completed on all participants
	CLAMP_Runtime -> CLAMP_Runtime: Log error
    CLAMP_Runtime -> Database: set versionelse ofWait Controlfor Loopupdates Instanceto ascomplete
 Instantiated on Participants
	    CLAMP_Runtime -> Database: set overall version of Control Loop Instance state as Instantiated
      else Updates not completed end
      end 
    else Automation Composition Instance de-instantiation update on participants not underway
    end
  end
@enduml

2.6 Deleting an Automation Composition Instance

PlantUML Macro
@startuml
participant  alt Instantiation of Control Loop Instance on participants timed out
	      CLAMP_GUI
participant CLAMP_Runtime

database Instantiated_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read all Automation Composition Instances
CLAMP_Runtime -> Instantiated_ACM_Inventory: Read all Automation Composition Instances
CLAMP_Runtime -> DatabaseCLAMP_GUI: set[REST] versionAll ControlAutomation LoopComposition Instance Instantiation as timed out on Participants
	      CLAMP_RuntimeInstances returned
CLAMP_GUI -> CLAMP_GUI: Select Automation Composition Instance to delete
CLAMP_GUI -> CLAMP_Runtime: Log error
        else Wait for updates to complete
        end
      end 
    else Control Loop Instance Instantiation update on participants not underway
    end
  end
end
@enduml

...

[REST] Delete selected Automation Composition Instance

alt Selected Automation Composition Instance exists
  CLAMP_Runtime -> Instantiated_ACM_Inventory: Delete Automation Composition instance
  CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Instance deleted
else Selected Automation Composition Instance does not exist
  CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Instance does not exist 
end

@enduml

2.7 Reading Automation Composition Instances

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database DatabaseInstantiated_ACM_Inventory

CLAMP_GUI -> CLAMP_Runtime: [REST] Read all InstantiatedAutomation ControlComposition Loop Instances
CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Read all InstantiatedAutomation ControlComposition Loop Instances
CLAMP_Runtime -> CLAMP_GUI: [REST] All InstantiatedAutomation ControlComposition Loop Instances returned
CLAMP_GUI -> CLAMP_GUI: Select Control Loop Instance on which to change state and specify new state
CLAMP_GUI -> CLAMP_Runtime: [REST] Change state of selected Control Loop Instance on Participants

alt Selected Control Loop Instance instantiated on Participants
  CLAMP_Runtime -> Participants: [DMaaP] Request change of state of Control Loop Instance
  
@enduml

3. Monitoring Dialogues

Monitoring dialogues are used to monitor and read statistics on Automation Composition Instances.

3.1 Reporting of Monitoring Information and Statistics by Participants

PlantUML Macro
@startuml
participant CLAMP_Runtime
participant Participant
database Instantiated_ACM_Inventory

Participant -> CLAMP_Runtime: [DMaaP] Participant and Automation Composition Element Monitoring and Statistics report
CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST] Change of state of Control Loop Instance ordered on participants
else Selected Control Loop Instance not instantiated on Participants Store Participant and Automation Composition Element Monitoring and Statistics report

alt Fault reported on Participant
  CLAMP_Runtime -> CLAMP_Runtime: log fault on Participant
  CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: Record [REST]fault Control Loop Instance not instantiated on participants 
end

== Participant Responses ==
Participants -> CLAMP_Runtime: [DMaaP] Result of State Change of Control Loop Instance on participant
on Participant
end

loop Over all Automation Composition Elements in Participant Report
  alt Fault reported on Automation Composition Element
    CLAMP_Runtime -> DatabaseCLAMP_Runtime: Storelog resultfault ofon StateAutomation ChangeComposition ofElement Controland LoopAutomation InstanceComposition on participant

== Supervision ==
loop forever
      CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: ReadRecord Controlfault Loopon Instances
Automation Composition loopElement overand eachAutomation ControlComposition   end
end
@enduml

3.2 Viewing of Monitoring Information

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Instantiated_ACM_Inventory

== Overview of all Automation Composition Instances ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read all Automation Composition Instances
CLAMP_Runtime -> Instantiated_ACM_Inventory: Read all Automation Composition Instances
Loop Instance
    alt Control Loop Instance State Change underway on participants
	  CLAMP_Runtime -> Database: read result of Control Loop State Change from participants
      alt Updates completed on all participants
	    CLAMP_Runtime -> Database: set Control Loop Instance state as changed on Participants
	    CLAMP_RuntimeCLAMP_GUI: [REST] All Automation Composition Instances returned
CLAMP_GUI -> DatabaseCLAMP_GUI: Display setoverview overallof Controlstatus Loopof Instanceall stateAutomation asComposition changed
      else Updates not completed
        alt Control Loop Instance State Change on participants timed out
	      CLAMP_Runtime -> Database: set Control Loop State Change as timed out on Participants
	      CLAMP_RuntimeInstances

== Details of a Automation Composition Instance ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read Automation Composition Elements for Automation Composition Instance
CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Automation Composition Elements for Automation Composition Instance
CLAMP_Runtime -> CLAMP_GUI: [REST] Automation Composition Elements returned
CLAMP_GUI -> CLAMP_GUI: Display status of Automation Composition Elements in Automation Composition Instance

== Overview of all Participants ==
CLAMP_GUI -> CLAMP_Runtime: Log error
        else Wait for updates to complete
        end
      end 
    else Control Loop Instance State Change on participants not underway
    end
  end
end
@enduml

2.6 De-instantiating a Control Loop Instance from Participants

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
participant Participant
database Database
[REST] Read all participants
CLAMP_Runtime -> Instantiated_ACM_Inventory: Read all participants
CLAMP_Runtime -> CLAMP_GUI: [REST] All participants returned
CLAMP_GUI -> CLAMP_GUI: Display overview of status of all participants

== Details of a Participant ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read allAutomation InstantiatedComposition ControlElements Loopfor InstancesParticipant
CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Read allAutomation InstantiatedComposition ControlElements Loopfor InstancesParticipant
CLAMP_Runtime -> CLAMP_GUI: [REST] AllAutomation Instantiated Control Loop InstancesComposition Elements returned
CLAMP_GUI -> CLAMP_GUI: SelectDisplay Controlstatus Loopof InstanceAutomation to de-instantiate
CLAMP_GUI -> CLAMP_Runtime: [REST] De-instantiate selected Control Loop Instance on Participants

alt Selected Control Loop Instance instantiated on Participants
  CLAMP_Runtime -> Participants: [DMaaP] Update Participants to remove Control Loop Instance
  CLAMP_RuntimeComposition Elements in Participant

== Filtered Monitoring ==
CLAMP_GUI -> CLAMP_GUI: Set filter for Automation Composition Instances, Automation Composition Elements, and Participants
CLAMP_GUI -> CLAMP_GUIRuntime: [REST] De-instantiationRead ofAutomation ControlComposition LoopElements Instancethat ordered on participants
else Selected Control Loop Instance not instantiated on Participants
  match filter
CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST]Read Control Loop Instance not instantiated on participants 
end

== Participant Responses ==
ParticipantsAutomation Composition Elements that match filter
CLAMP_Runtime -> CLAMP_RuntimeGUI: [DMaaPREST] ResultAutomation ofComposition updateElements ofthat Controlmatch Loop Instance on participantfilter returned
CLAMP_RuntimeGUI -> DatabaseCLAMP_GUI: StoreDisplay resultstatus of updateAutomation ofComposition ControlElements Loopthat Instancematch filter

@enduml

3.2 Viewing of Statistics

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Instantiated_ACM_Inventory

== Statistics of all Automation Composition Instances ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read summary statistics for all Automation Composition Instances
on participant

== Supervision ==
loop forever
  CLAMP_Runtime -> Database: Read Control Loop Instances
  loop over each Control Loop Instance
    alt Control Loop Instance de-instantiation update underway on participants
	  CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: readCompile resultsummary ofstatistics Controlfor Loopall updatesAutomation fromComposition participantsInstances
CLAMP_Runtime -> CLAMP_GUI: [REST]   alt Updates completed onSummary statistics for all participants
	Automation Composition Instances  returned
CLAMP_RuntimeGUI -> DatabaseCLAMP_GUI: setDisplay Controlsummary Loopstatistics Instancefor asall de-instantiatedAutomation onComposition Participants
	    CLAMP_RuntimeInstances

== Statistics of a Automation Composition Instance ==
CLAMP_GUI -> DatabaseCLAMP_Runtime: set[REST] overallRead Controlstatistics Loopfor InstanceAutomation as de-instantiated
      else Updates not completed
        alt Control Loop Instance de-instantiation Update timed out on participants
	      CLAMP_Runtime -> Database: set Control Loop Instance de-instantiation as timed out on Participants
	      CLAMP_RuntimeComposition Elements for Automation Composition Instance
CLAMP_Runtime -> Instantiated_ACM_Inventory: Compile statistics for Automation Composition Elements for Automation Composition Instance
CLAMP_Runtime -> CLAMP_GUI: [REST] Statistics for Automation Composition Elements returned
CLAMP_GUI -> CLAMP_GUI: Display statistics for Automation Composition Elements in Automation Composition Instance

== Statistics of all Participants ==
CLAMP_GUI -> CLAMP_Runtime: Log error
        else Wait for updates to complete
        end
      end 
    else Control Loop Instance de-instantiation update on participants not underway
    end
  end
@enduml

2.7 Deleting a Control Loop Instance

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime

database Database

 [REST] Read summary statistics for all Automation Composition Instances
CLAMP_Runtime -> Instantiated_ACM_Inventory: Compile summary statistics for all Automation Composition Instances
CLAMP_Runtime -> CLAMP_GUI: [REST] Summary statistics for all Automation Composition Instances returned
CLAMP_GUI -> CLAMP_GUI: Display summary statistics for all Automation Composition Instances

== Statistics of a Participant ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read all Control Loop Instancesstatistics for Automation Composition Elements for Participant
CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Read all Control Loop Instances statistics for Automation Composition Elements for Participant
CLAMP_Runtime -> CLAMP_GUI: [REST] All Control Loop Instances returned] Statistics for Automation Composition Elements returned
CLAMP_GUI -> CLAMP_GUI: Display statistics for Automation Composition Elements in Participant

== Filtered Statistics ==
CLAMP_GUI -> CLAMP_GUI: Select Control Loop Instance to deleteSet filter for Automation Composition Instances, Automation Composition Elements, and Participants
CLAMP_GUI -> CLAMP_Runtime: [REST] DeleteRead selectedstatistics Controlfor Loop Instance

alt Selected Control Loop Instance exists
  Automation Composition Elements that match filter
CLAMP_Runtime -> Database: Delete control loop instance
  Instantiated_ACM_Inventory: Read statistics for Automation Composition Elements that match filter
CLAMP_Runtime -> CLAMP_GUI: [REST] ControlStatistics Loop Instance deleted
else Selected Control Loop Instance does not exist
  CLAMP_Runtimefor Automation Composition Elements that match filter returned
CLAMP_GUI -> CLAMP_GUI: [REST] Control Loop Instance does not exist 
endDisplay statistics for Automation Composition Elements that match filter

@enduml

...

3.3 Statistics Housekeeping

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Database

CLAMP_GUI_Runtime
database Instantiated_ACM_Inventory

== Automation Composition Instance Statistics ==

loop forever
  CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Automation Composition Instance Statistics
  CLAMP_Runtime -> CLAMP_Runtime: [REST] Read all Control Loop Instances
Summarise Automation Composition Instance Statistics
  CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: ReadStore summarised allAutomation ControlComposition LoopInstance InstancesStatistics
  CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST]Delete AllAutomation ControlComposition LoopInstance Instances returned

@enduml

3. Monitoring Dialogues

Monitoring dialogues are used to monitor and to read statistics on Control Loop Instances.

3.1 Reporting of Monitoring Information and Statistics by Participants

PlantUML Macro
@startuml
participant CLAMP_Runtime
participant Participant
database Database

Participant -> CLAMP_Runtime: [DMaaP] Participant and Control Loop Element Monitoring and Statistics report
Statistics on which retention period has expired
end

== Participant Statistics ==

loop forever
  CLAMP_Runtime -> Instantiated_ACM_Inventory: Read Participant Statistics
  CLAMP_Runtime -> CLAMP_Runtime: Summarise Participant Statistics
  CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Store summarised Participant andStatistics
 Control Loop Element Monitoring and Statistics report

alt Fault reported on Participant
  CLAMP_Runtime -> CLAMP_Runtime: log fault on ParticipantCLAMP_Runtime -> Instantiated_ACM_Inventory: Delete Participant Statistics on which retention period has expired
end

@enduml

4. Supervision Dialogues

Supervision dialogues are used to check the state of Automation Composition Instances and Participants.

4.1 Supervise Participants

PlantUML Macro
@startuml
participant CLAMP_Runtime
database Instantiated_ACM_Inventory

loop forever
  CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: RecordRead faultParticipants
 on Participant
end

loop Over all Control Loop Elements in Participant Report
each Participant
    alt Participant Faulthas not reported onin Controllast Loopreporting Elementwindow
       CLAMP_Runtime -> CLAMP_Runtime: logLog Participant faultas onhaving Controlmissed Loopa Elementreport
 and Control Loop
    CLAMP_Runtime -> Database: Record fault on Control Loop Element and Control Loop
  end
end
@enduml

3.2 Viewing of Monitoring Information

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Database

== Overview of all Control Loop Instances ==
CLAMP_GUIInstantiated_ACM_Inventory: Increment missed report counter on Participant
       alt Participant has exceeded alarm threshold on missed report counter
          CLAMP_Runtime -> CLAMP_Runtime: Raise [REST]a ReadParticipant allOffline Controlalarm Loopon Instances
participant
          CLAMP_Runtime -> Database: Read all Control Loop Instances
CLAMP_Runtime -> CLAMP_GUI: [REST] All Control Loop Instances returned
CLAMP_GUI -> CLAMP_GUI: Display overview of status of all Control Loop Instances

== Details of a Control Loop Instance ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Elements for Control Loop Instance
Instantiated_ACM_Inventory: Mark participant as being offline
       end
    else Participant has reported in last reporting window
       CLAMP_Runtime -> Instantiated_ACM_Inventory: Clear missed report counter on Participant
       alt Participant marked as being offline
          CLAMP_Runtime -> DatabaseCLAMP_Runtime: ReadClear ControlParticipant LoopOffline Elementsalarm foron Controlparticipant
 Loop Instance
CLAMP_Runtime -> CLAMP_GUI: [REST] Control Loop Elements returned
CLAMP_GUI       CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: DisplayMark statusparticipant ofas Controlbeing Looponline
 Elements in Control Loop Instance

== Overview of all Participants ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read all participants
CLAMP_Runtime -> Database: Read all participants
 end
    end
  end
end

@enduml

4.2 Supervise Automation Compositions

PlantUML Macro
@startuml
participant CLAMP_Runtime
database Instantiated_ACM_Inventory

loop forever
  CLAMP_Runtime -> CLAMPInstantiated_ACM_GUI: [REST] All participants returned
CLAMP_GUI -> CLAMP_GUI: Display overview of status of all participants

== Details of a Participant ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Elements for Participant
CLAMP_Runtime -> Database: Read Control Loop Elements for Participant
Inventory: Read Automation Composition Instances
  loop Over each Automation Composition Instance
    loop Over each Automation Composition Element
      alt Automation Composition Element has not reported in last reporting window
         CLAMP_Runtime -> CLAMP_GUIRuntime: [REST]Log ControlAutomation LoopComposition Elements returned
CLAMP_GUI -> CLAMP_GUI: Display status of Control Loop Elements in Participant

== Filtered Monitoring ==
CLAMP_GUI -> CLAMP_GUI: Set filter for Control Loop Instances, Control Loop Elements, and Participants
CLAMP_GUI -> CLAMP_Runtime: [REST] Read Control Loop Elements that match filter
CLAMP_Runtime -> Database: Read Control Loop Elements that match filter
Element as having missed a report
         CLAMP_Runtime -> Instantiated_ACM_Inventory: Increment missed report counter on Automation Composition Element
      else Automation Composition Element has reported in last reporting window
         CLAMP_Runtime -> CLAMPInstantiated_ACM_GUIInventory: [REST] Control Loop Elements that match filter returned
CLAMP_GUI -> CLAMP_GUI: Display status of Control Loop Elements that match filter

@enduml

3.2 Viewing of Statistics

PlantUML Macro
@startuml
participant CLAMP_GUI
participant CLAMP_Runtime
database Database

== Statistics of all Control Loop Instances ==
CLAMP_GUI Clear missed report counter on Automation Composition Element
      end
      alt Automation Composition Element in incorrect state in last reporting window
        CLAMP_Runtime -> CLAMP_Runtime: [REST]Log ReadAutomation summaryComposition statisticsElement foras allbeing Controlin Loopincorrect Instances
state
        CLAMP_Runtime -> Database: Compile summary statistics for all Control Loop Instances
CLAMP_Runtime -> CLAMP_GUI: [REST] Summary statistics for all Control Loop Instances returned
CLAMP_GUI -> CLAMP_GUI: Display summary statistics for all Control Loop Instances

== Statistics of a Control Loop Instance ==
CLAMP_GUIInstantiated_ACM_Inventory: Record Automation Composition Element as being in incorrect state
      else Automation Composition Element not in incorrect state in last reporting window
        alt Automation Composition Element was in incorrect state on previous report
          CLAMP_Runtime -> CLAMP_Runtime: [REST] Read statistics for Control Loop Elements for Control Loop Instance
 Log Automation Composition Element as being in correct state
          CLAMP_Runtime -> Database: Compile statistics for Control Loop Elements for Control Loop Instance
CLAMP_Runtime -> CLAMP_GUI: [REST] Statistics for Control Loop Elements returned
CLAMP_GUI -> CLAMP_GUI: Display statistics for Control Loop Elements in Control Loop Instance

== Statistics of all Participants ==
CLAMP_GUIInstantiated_ACM_Inventory: Record Automation Composition Element as being in correct state
        end
      end
      alt Automation Composition Element reported fault in last reporting window
        CLAMP_Runtime -> CLAMP_Runtime: [REST]Log ReadAutomation summaryComposition statisticsElement foras all Control Loop Instances
CLAMP_Runtime -> Database: Compile summary statistics for all Control Loop Instances
being faulty
        CLAMP_Runtime -> CLAMPInstantiated_ACM_GUI: [REST] Summary statistics for all Control Loop Instances returned
CLAMP_GUI -> CLAMP_GUI: Display summary statistics for all Control Loop Instances

== Statistics of a Participant ==
CLAMP_GUI -> CLAMP_Runtime: [REST] Read statistics for Control Loop Elements for Participant
CLAMP_Runtime -> Database: Read statistics for Control Loop Elements for Participant
Inventory: Record Automation Composition Element as being faulty
      else Automation Composition Element did not report fault in last reporting window
        alt Automation Composition Element reported fault on previous report
          CLAMP_Runtime -> CLAMP_GUIRuntime: [REST]Log StatisticsAutomation forComposition ControlElement Loopfault Elementsas returnedcleared
CLAMP_GUI -> CLAMP_GUI: Display statistics for Control Loop Elements in Participant

== Filtered Statistics ==
CLAMP_GUIRuntime -> CLAMPInstantiated_ACM_GUI: Set filter for Control Loop Instances, Control Loop Elements, and Participants
CLAMP_GUI -> CLAMP_Runtime: [REST] Read statistics for Control Loop Elements that match filter
CLAMP_Runtime -> Database: Read statistics for Control Loop Elements that match filter
CLAMP_Runtime -> CLAMP_GUI: [REST] Statistics for Control Loop Elements that match filter returned
CLAMP_GUIInventory: Mark fault Automation Composition Element as being cleared
        end
      end
    end
    alt Automation Composition Element in Automation Composition Instance has exceeded alarm threshold on missed report counter
      CLAMP_Runtime -> CLAMP_GUIRuntime: DisplayRaise statisticsa forAutomation ControlComposition LoopOffline Elementsalarm thaton match filter

@enduml

3.3 Statistics Housekeeping

PlantUML Macro
@startuml
participant CLAMP_Runtime
database Database

== Control Loop Instance Statistics ==

loop forever
Automation Composition Instance
      CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: ReadMark ControlAutomation LoopComposition Instance Statistics
  CLAMP_Runtime -> CLAMP_Runtime: Summarise Control Loop Instance Statistics
  CLAMP_Runtime -> Database: Store summarised Control Loop Instance Statistics
  CLAMP_Runtime -> Database: Delete Control Loop Instance Statistics on which retention period has expired
end

== Participant Statistics ==

loop forever
  CLAMP_Runtime -> Database: Read Participant Statistics
as being offline
    else No Automation Composition Element in Automation Composition Instance has exceeded alarm threshold on missed report counter
       alt Automation Composition Instance marked as being offline
          CLAMP_Runtime -> CLAMP_Runtime: Clear Automation SummariseComposition ParticipantInstance Statistics
Offline alarm CLAMP_Runtime -> Database: Store summarised Participant Statistics
 on Automation Composition           CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: DeleteMark ParticipantAutomation StatisticsComposition onInstance whichas retentionbeing periodonline
 has expired
end

@enduml

4. Supervision Dialogues

Supervision dialogues are used to check the state of Control Loop Instances and Participants.

4.1 Supervise Participants

PlantUML Macro
@startuml
participant CLAMP_Runtime
database Database

loop forever
  CLAMP_Runtime -> Database: Read Participantsend
    end
  loop  Overalt eachAutomation Participant
Composition Element in Automation altComposition ParticipantInstance hasin notincorrect reportedstate in last reporting window
       CLAMP_Runtime -> CLAMP_Runtime: Log ParticipantAutomation Composition Instance as havingbeing missedin aincorrect reportstate
       CLAMP_Runtime -> Database: Increment missed report counter on ParticipantInstantiated_ACM_Inventory: Record Automation Composition Instance as being in incorrect state
       alt Participantalt Automation Composition Element in Automation Composition Instance has exceeded alarm threshold on missedincorrect reportstate counterreports
          CLAMP_Runtime -> CLAMP_Runtime: Raise a Participant Offline Automation Composition Instance in Incorrect State alarm on participant
Automation Composition Instance
        CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Mark Automation participantComposition Instance as being offline
 in an incorrect state
      end
    else Participant has reportedNo Automation Composition Element in incorrect state in last reporting window
      alt CLAMP_Runtime -> Database: Clear missed report counter on Participant
       alt Participant marked as being offline
  Automation Composition Element in Automation Composition Instance was in incorrect state on previous report
        CLAMP_Runtime -> CLAMP_Runtime: Log ClearAutomation ParticipantComposition OfflineInstance alarmas onbeing participant
in correct state
        CLAMP_Runtime -> Database: Mark participantInstantiated_ACM_Inventory: Record Automation Composition Instance as being onlinein correct state
        end
    end
  end
end

@enduml

4.2 Supervise Control Loops

PlantUML Macro
@startuml
participant CLAMP_Runtime
database Database

loop forever
alt Automation Composition Instance in Incorrect State alarm raised on Automation Composition Instance
          CLAMP_Runtime -> Database: Read Control Loop Instances
  loop Over each Control Loop InstanceCLAMP_Runtime: Clear Automation Composition Instance in Incorrect State alarm on Automation Composition Instance
        end
    loop  Overend
 each Control Loop Elementend
    alt Automation altComposition ControlElement Loopin ElementAutomation hasComposition notInstance reported a fault in last reporting window
         CLAMP_Runtime -> CLAMP_Runtime: Log ControlAutomation LoopComposition ElementInstance as having missed a report
   being faulty
      CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: Increment missed report counter on Control Loop Element
      else Control Loop Element has reported in last reporting window
 Record Automation Composition Instance as being faulty
      alt Automation Composition Element in Automation Composition Instance has exceeded alarm threshold on faulty reports
        CLAMP_Runtime -> DatabaseCLAMP_Runtime: Clear missed report counterRaise a Automation Composition Instance Faulty alarm on ControlAutomation LoopComposition ElementInstance
      end
    else No Automation Composition Element faulty in last endreporting window
      alt ControlAutomation LoopComposition Element in ControlAutomation LoopComposition Instance has exceeded alarm thresholdwas faulty on missedprevious report
  counter
      CLAMP_Runtime -> CLAMP_Runtime: RaiseLog Automation aComposition ControlInstance Loopas Offlinebeing alarmfault onfree
 Control Loop
      CLAMP_Runtime -> DatabaseInstantiated_ACM_Inventory: MarkRecord Automation ControlComposition LoopInstance as being fault offlinefree
    else No Control Loop Elementalt inAutomation Control LoopComposition Instance hasFaulty exceeded alarm thresholdraised on missedAutomation report counter
       alt Control Loop marked as being offlineComposition Instance
          CLAMP_Runtime -> CLAMP_Runtime: Clear Automation ControlComposition LoopInstance OfflineFaulty alarm on ControlAutomation Composition LoopInstance
          CLAMP_Runtime -> Database: Mark Control Loop as being online
 end
      end
    end
  end
end

@enduml