Versions Compared

Key

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

...

PlantUML Macro
@startuml
participant REST
participant ACM_Runtime
database ACM_Database

REST -> ACM_Runtime: Get Automation Composition Instance Information 
ACM_Runtime -> ACM_Database: Read Automation Composition Instance Information
ACM_Runtime -> REST: Respond with Automation Composition Instance information\nincluding ACM Element Instance information\nand admin, operational, and usage state

@enduml

3.

...

6 Unlock Automation Composition Instance

The user requests the AC Instance to be unlocked using a REST endpoint. The ACM Runtime orders the AC Instance to be unlocked on Participants.

...

PlantUML Macro
@startuml
participant REST
participant ACM_Runtime
participant Participants
database ACM_Database 

REST -> ACM_Runtime: Unlock Automation Composition Instance
ACM_Runtime -> ACM_Database: Read Automation Composition Instance Information

alt Automation Composition Instance exists
 alt Automation Composition Instance administrative state is LOCKED
  ACM_Runtime -> Participants: [ASYNC] Unlock AC Element Instances for this AC Instance
  ACM_Runtime -> ACM_Database: Mark AC Instance and its AC Element Instances as Unlocking
  ACM_Runtime -> REST: Unlocking of Automation Composition Instance has been requested
 else
  ACM_Runtime -> REST: Automation Composition instance is not locked
 end
else
  ACM_Runtime -> REST: Automation Composition instance does not exist
end

@enduml

...

PlantUML Macro
@startuml

participant ACM_Runtime
participant Participant
database ACM_Database 

ACM_Runtime <- Participant: [ASYNC] Unlock Automation Composition Element Instance Response
ACM_Runtime -> ACM_Database: Store Automation Composition Element Instance Response Information

alt Is AC Element Instance Unlocked?
 ACM_Runtime -> ACM_Database: Set AC Element Instance administrative state as UNLOCKED
 alt Have all the other AC Element Instances in this AC Instance been UNLOCKED?
  ACM_Runtime -> ACM_Runtime: Set AC Instance administrative state as UNLOCKED
  end
end

@enduml

3.7 Lock Automation Composition Instance

The user requests the AC Instance to be locked using a REST endpoint. The ACM Runtime orders the AC Instance to be locked on Participants.


PlantUML Macro
@startuml
participant REST
participant ACM_Runtime
participant Participants
database ACM_Database 

REST -> ACM_Runtime: Lock Automation Composition Instance
ACM_Runtime -> ACM_Database: Read Automation Composition Instance Information

alt Automation Composition Instance exists
 alt Automation Composition Instance administrative state is UNLOCKED
  ACM_Runtime -> Participants: [ASYNC] Lock AC Element Instances for this AC Instance
  ACM_Runtime -> ACM_Database: Mark AC Instance and its AC Element Instances as Locking
  ACM_Runtime -> REST: Locking of Automation Composition Instance has been requested
 else
  ACM_Runtime -> REST: Automation Composition instance is not unlocked
 end
else
  ACM_Runtime -> REST: Automation Composition instance does not exist
end

@enduml


Each participant locks its AC Element Instances from the AC Instance.


PlantUML Macro
@startuml
participant ACM_Runtime
participant Participant

ACM_Runtime -> Participant: [ASYNC] Lock AC Element Instances for this AC Instance 

loop over AC Element Instances in AC Instance
 alt Does the primed Participant ID on this AC Element Instance\nmatch my Participant ID?
  alt Is this AC Element Instance administrative state not UNLOCKED
   ACM_Runtime <- Participant: [ASYNC] WARN: AC Element is not UNLOCKED
  else
     Participant -> Participant: Order lock AC Element Instance
     Participant -> Participant: Set AC Element Instance administrative state to SHUTTING_DOWN
   activate Participant
   deactivate Participant
   alt AC Element locked successfully
    Participant -> Participant: Set AC Element Instance administrative state to LOCKED
    ACM_Runtime <- Participant: [ASYNC] INFO: AC Element has been locked
   else
    ACM_Runtime <- Participant: [ASYNC] ERROR: AC Element was not locked
   end
  end
 else
  note left of participant
   ignore this AC Element instance as its for another participant 
  end note
 end
end

@enduml


The ACM Runtime receives and stores the responses.


PlantUML Macro
@startuml

participant ACM_Runtime
participant Participant
database ACM_Database 

ACM_Runtime <- Participant: [ASYNC] Lock Automation Composition Element Instance Response
ACM_Runtime -> ACM_Database: Store Automation Composition Element Instance Response Information

alt Is AC Element Instance Locked?
 ACM_Runtime -> ACM_Database: Set AC Element Instance administrative state as LOCKED
 alt Have all the other AC Element Instances in this AC Instance been LOCKED?
  ACM_Runtime -> ACM_Runtime: Set AC Instance administrative state as LOCKED
  end
end

@enduml