Versions Compared

Key

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

...

To maintain the backward compatibility, we are introducing a new property: "stage".

Minimal support for stage:

...

ParticipantComposition Definition Element

stage

SEFA10, 2
SEFA20, 2
CNLCMB1


At the migrate method will be add a new stage parameter, and it will be created a new abstract class AcElementListenerV3. The abstract class AcElementListenerV1 and AcElementListenerV2 will wrap the new method to maintain the compatibility. 

Below the refactored migrate method.

Code Block
languagejava
    /**
     * Handle an update on a automation composition element.
     *
     * @param compositionElement the information of the Automation Composition Definition Element
     * @param compositionElementTarget the information of the Automation Composition Definition Element Target
     * @param instanceElement the information of the Automation Composition Instance Element
     * @param instanceElementMigrate the information of the Automation Composition Instance Element updated
     * @param stage the stage to perform
     * @throws PfModelException from Policy framework
     */
    void migrate(CompositionElementDto compositionElement, CompositionElementDto compositionElementTarget,
            InstanceElementDto instanceElement, InstanceElementDto instanceElementMigrate, int stage) throws PfModelException;

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

It will add new method "updateAutomationCompositionElementState" as below:

Code Block
languagejava
    /**
     * Update the state of a automation composition element.
     *
     * @param automationCompositionId 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 deployState the Deploy State of the automation composition element
     * @param lockState the Lock State of the automation composition element
     * @param stateChangeResult the indicator if error occurs
     * @param stageCompleted the stage completed
     * @param message the message
     */
    void updateAutomationCompositionElementState(UUID automationCompositionId, UUID elementId, DeployState deployState,
            LockState lockState, StateChangeResult stateChangeResult, int stageCompleted, String message);


During the execution of the operation how the user is able to see the steps executed by the instance element? Same issue for monitoring, it needs new filed into Instance Element to store what step is executed.

Code Block
languagexml
                "709c62b3-8918-41b9-a747-d21eb79c6c23": {
                    "id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
                    "definition": {
                        "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
                        "version": "1.2.3"
                    },
                    "participantId": "101c62b3-8918-41b9-a747-d21eb79c6c91",
                    "deployState": "DEPLOYING",
                    "stage": 1,
                    "lockState": "NONE",
                    "description": "Sink Automation Composition Element for the Demo",
                    "message": "",