Updated participant protocol docs
[policy/parent.git] / docs / clamp / acm / api-protocol / puml / ParticipantStateChangeDialogue.puml
1 @startuml
2
3 activate CLAMP_Runtime
4 CLAMP_Runtime -> CLAMP_Runtime: Build an ordered list of the Start Phases in the Automation Composition Instance
5 deactivate CLAMP_Runtime
6
7 alt "State Change UNDEPLOYED_to_DEPLOYED or LOCKED_to_UNLOCKED"
8   loop over Start Phases list in increasing order
9     CLAMP_Runtime -> Participant: Automation Composition State Change\n[to all Participants in Automation Composition with this Start Phase]
10     CLAMP_Runtime -> CLAMP_Runtime: Asynchronously wait for answers from Participants
11     CLAMP_Runtime <- Participant: Automation Composition State Change Ack [from each Participant in this Start Phase of Automation Composition]
12     alt "State Change Ack reports success"
13       CLAMP_Runtime -> CLAMP_Runtime: Log success
14     else "State Change Ack reports an error"
15       CLAMP_Runtime -> CLAMP_Runtime: Log error
16       CLAMP_Runtime -> CLAMP_Runtime: Reset state of Automation Composition CLAMP_Runtime -> CLAMP_Runtime: Abort State Change operation
17     end
18   end
19 else "State Change DEPLOYED_to_UNDEPLOYED or UNLOCKED_to_LOCKED"
20  loop over Start Phases list in decreasing order
21     CLAMP_Runtime -> Participant: Automation Composition State Change\n[to all Participants in Automation Composition with this Start Phase]
22     CLAMP_Runtime -> CLAMP_Runtime: Asynchronously wait for answers from Participants
23     CLAMP_Runtime <- Participant: Automation Composition State Change Ack [from each Participant in this Start Phase of Automation Composition]
24     alt "State Change Ack reports success"
25       CLAMP_Runtime -> CLAMP_Runtime: Log success
26     else "State Change Ack reports an error"
27       CLAMP_Runtime -> CLAMP_Runtime: Log error
28       CLAMP_Runtime -> CLAMP_Runtime: Reset state of Automation Composition CLAMP_Runtime -> CLAMP_Runtime: Abort State Change operation
29     end
30   end
31 end
32
33 CLAMP_Runtime -> CLAMP_Runtime: Set overall state of Automation Composition
34
35 @enduml