How startPhase is currently implemented
- startPhase is configured in composition definition element and defines the order of execution of instance elements;
- Any instance element is executed only once;
- All instance elements whit same startPhase are executed at same time in parallel;
- startPhase is used by deploy and unlock; startPhase in reverse order is used by lock, undeploy and delete;
Example using the Demo. The table below shows the startPhase for each Composition Definition Element
...
The diagram below shows the flow of messages:
Note:
- startPhase is configured in composition definition element and defines the order of execution of instance elements;
- Any instance element is executed only once;
- All instance elements whit same startPhase are executed at same time in parallel;
- startPhase is used by deploy and unlock; startPhase in reverse order is used by lock, undeploy and delete;
Alternative flow with "stage"
...
Code Block | ||
---|---|---|
| ||
/** * Update the stage of a automation composition element. * * @param automationCompositionIdinstanceId the ID of the automation composition to update the state on * @param elementId the ID of the automation composition element to update the state on * @param stateChangeResult the indicator if error occurs * @param nextStage the next stage to do * @param message the message */ void updateAutomationCompositionElementStage(UUID automationCompositionIdinstanceId, UUID elementId, StateChangeResult stateChangeResult, Integer nextStage, String message); |
...
Code Block | ||
---|---|---|
| ||
"709c62b3-8918-41b9-a747-d21eb79c6c23": { "id": "709c62b3-8918-41b9-a747-d21eb79c6c23", "definition": { "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElementSefAutomationCompositionElement", "version": "1.2.3" }, "participantId": "101c62b3-8918-41b9-a747-d21eb79c6c91", "deployState": "MIGRATING", "stage": 2, "lockState": "NONELOCKED", "description": "SinkSef Automation Composition Element for the Demo", "message": "Stage 0 completed", |
...