Versions Compared

Key

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

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
languageyml
properties:
  stage:
    - deploy: [0,1]
    - migrate: [0,2]
    - update: [0]
    - undeploy: [10]
    - delete: [10]

All not defined operations will be set to 0.

...

When an instance element has completed a stepstage, not means that the full execution is completed (DEPLOYED state).

...

Code Block
languagejava
    /**
     * 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
languagexml
                "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": "DEPLOYINGMIGRATING",
                    "stage": 12,
                    "lockState": "NONELOCKED",
                    "description": "SinkSef Automation Composition Element for the Demo",
                    "message": "Stage 0 completed",