classdef OptimizationApplySolutionStrategy < fxptds.WorkflowTopology.Strategy
    %% OPTIMIZATIONAPPLYSOLUTIONSTRATEGY class
    % Encapsulates the strategy to explore a OptimizationResult solution
    
    % Copyright 2019 The MathWorks, Inc.
    
    % Access is protected and extended to Facade and to the test class
    methods (Access = {?fxptds.WorkflowTopology.Strategy, ?fxptds.WorkflowTopology.Facade, ?WorkflowTopologyTestCase})
        function execute(this)
            
            % declare the source as OptimizedConversion action given
            actionName = this.FPTRunID;
            
            % create a new AutoscalerDesign node
            type = fxptds.WorkflowTopology.element.NodeType.AutoscalerDesign;
            designNode = this.createAndAddNodeByType(type);
            
            % get the name of the Design node
            designName = designNode.Name;
            
            % connect the OptimizationAction to the new Design Node
            this.verifyAndConnect(actionName, designName);
            
        end
        
    end
    
end

