src/sasctl/_services/model_management.py
def execute_model_workflow_definition(cls, project_name, workflow_name, input=None):
        """Runs specific Workflow Processes Definitions.

        Parameters
        ----------
        project_name : str
            Name of the Project that will execute workflow
        workflow_name : str
            Name or ID of an enabled workflow to execute
        input : dict, optional
            Input values for the workflow for initial workflow prompt

        Returns
        -------
        RestObj
            The executing workflow
            
        """
        from .model_repository import ModelRepository
        from .workflow import Workflow

        mr = ModelRepository()
        wf = Workflow()
        
        project = mr.get_project(project_name)

        workflow = wf.run_workflow_definition(workflow_name, input=input)
        
        # Associations running workflow to model project, note workflow has to be running
        # THINK ABOUT: do we do a check on status of the workflow to determine if it is still running before associating?

        input = {"processName": workflow['name'],
                 "processId": workflow['id'],
                 "objectType": "MM_Project",
                 "solutionObjectName": project_name,
                 "solutionObjectId": project['id'],
                 "solutionObjectUri": "/modelRepository/projects/" + project['id'],
                 "solutionObjectMediaType": "application/vnd.sas.models.project+json"}
        
        #Note, you can get a HTTP Error 404: {"errorCode":74052,"message":"The workflow process for id <> cannot be found.
        #                                    Associations can only be made to running processes.","details":["correlator:
        #                                    e62c5562-2b11-45db-bcb7-933200cb0f0a","traceId: 3118c0fb1eb9702d","path:
        #                                    /modelManagement/workflowAssociations"],"links":[],"version":2,"httpStatusCode":404} 
        # Which is fine and expected like the Visual Experience.
        return cls.post('/workflowAssociations',
                        json=input,
                        headers={'Content-Type': 'application/vnd.sas.workflow.object.association+json'})
Runs specific Workflow Processes Definitions.

        Parameters
        ----------
        project_name : str
            Name of the Project that will execute workflow
        workflow_name : str
            Name or ID of an enabled workflow to execute
        input : dict, optional
            Input values for the workflow for initial workflow prompt

        Returns
        -------
        RestObj
            The executing workflow
            
        
Runs specific Workflow Processes Definitions.
Parameters

project_name : str
Name of the Project that will execute workflow
workflow_name : str
Name or ID of an enabled workflow to execute
input : dict, optional
Input values for the workflow for initial workflow prompt

Returns

RestObj
The executing workflow
Runs specific Workflow Processes Definitions . Parameters project_name : str Name of the Project that will execute workflow workflow_name : str Name or ID of an enabled workflow to execute input : dict optional Input values for the workflow for initial workflow prompt Returns RestObj The executing workflow
def execute_model_workflow_definition(cls, project_name, workflow_name, input=None):
        from .model_repository import ModelRepository
        from .workflow import Workflow
        mr = ModelRepository()
        wf = Workflow()
        project = mr.get_project(project_name)
        workflow = wf.run_workflow_definition(workflow_name, input=input)
        input = {"processName": workflow['name'],
                 "processId": workflow['id'],
                 "objectType": "MM_Project",
                 "solutionObjectName": project_name,
                 "solutionObjectId": project['id'],
                 "solutionObjectUri": "/modelRepository/projects/" + project['id'],
                 "solutionObjectMediaType": "application/vnd.sas.models.project+json"}
        return cls.post('/workflowAssociations',
                        json=input,
                        headers={'Content-Type': 'application/vnd.sas.workflow.object.association+json'})
def execute_model_workflow_definition ( cls , project_name , workflow_name , input = None ) : from . model_repository import ModelRepository from . workflow import Workflow mr = ModelRepository ( ) wf = Workflow ( ) project = mr . get_project ( project_name ) workflow = wf . run_workflow_definition ( workflow_name , input = input ) input = { "processName" : workflow [ 'name' ] , "processId" : workflow [ 'id' ] , "objectType" : "MM_Project" , "solutionObjectName" : project_name , "solutionObjectId" : project [ 'id' ] , "solutionObjectUri" : "/modelRepository/projects/" + project [ 'id' ] , "solutionObjectMediaType" : "application/vnd.sas.models.project+json" } return cls . post ( '/workflowAssociations' , json = input , headers = { 'Content-Type' : 'application/vnd.sas.workflow.object.association+json' } )
Runs specific Workflow Processes Definitions.
Runs specific Workflow Processes Definitions .
"""Runs specific Workflow Processes Definitions.

        Parameters
        ----------
        project_name : str
            Name of the Project that will execute workflow
        workflow_name : str
            Name or ID of an enabled workflow to execute
        input : dict, optional
            Input values for the workflow for initial workflow prompt

        Returns
        -------
        RestObj
            The executing workflow
            
        """ # Associations running workflow to model project, note workflow has to be running # THINK ABOUT: do we do a check on status of the workflow to determine if it is still running before associating? #Note, you can get a HTTP Error 404: {"errorCode":74052,"message":"The workflow process for id <> cannot be found. #                                    Associations can only be made to running processes.","details":["correlator: #                                    e62c5562-2b11-45db-bcb7-933200cb0f0a","traceId: 3118c0fb1eb9702d","path: #                                    /modelManagement/workflowAssociations"],"links":[],"version":2,"httpStatusCode":404}  # Which is fine and expected like the Visual Experience.
cls
project_name
workflow_name
input