4 CLAMP_Runtime -> CLAMP_Runtime: Build an ordered list of the Start Phases in the Automation Composition Instance
5 deactivate CLAMP_Runtime
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
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
33 CLAMP_Runtime -> CLAMP_Runtime: Set overall state of Automation Composition