Main Content

getprocess

Get process model object for process model in project

    Description

    processModelObject = getprocess() returns a process model object, processModelObject, for the process model in the project. You can use the process model object to view the properties of the process model in the project. For more information, see padv.ProcessModel.

    If the current project does not have a process model, the function getprocess automatically creates a new process model at the root of the project.

    This function requires CI/CD Automation for Simulink Check.

    example

    Examples

    collapse all

    Use getprocess to find the default query that the current process model uses. If you have a task that does not specify an iteration query, the default query defines which artifacts the process iterates over. By default, custom tasks run once per project because the default query is "padv.builtin.query.FindProjectFile".

    Open the Process Advisor example project, which contains an example process model.

    processAdvisorExampleStart

    Get the properties of the current process model.

    currentProcessModel = getprocess()

    Get the default query for the current process model.

    defaultQuery = currentProcessModel.DefaultQueryName
    defaultQuery = 
    
        "padv.builtin.query.FindProjectFile"

    You can use the findTask and findQuery functions on the loaded process model to find specific tasks and queries in the process.

    findTask(currentProcessModel,"padv.builtin.task.RunModelStandards")

    Output Arguments

    collapse all

    Properties of process model, returned as a padv.ProcessModel object.

    The padv.ProcessModel object returns the names of the tasks, queries, default query, and root process model file for the process.