Main Content

run

    Description

    taskResult = run(taskObj) runs the task represented by taskObj and returns the result from the task.

    This function requires CI/CD Automation for Simulink Check.

    How a task runs depends on how the you define the task. You can define tasks using a function or a class:

    • Function-based tasks — Runs the function specified by the Action property of the task.

    • Class-based task — Runs the run function implemented inside the class definition.

    By default, when you create a padv.Task object, the task is a function-based task, even if you do not specify an Action property for the task.

    taskResult = run(taskObj,inputArtifacts) uses the artifacts specified by inputArtifacts as inputs to the task. The InputQueries property of the task specifies the query that provides the inputArtifacts for the task.

    Input Arguments

    collapse all

    Task object that represents a task, specified as a padv.Task object.

    Example: myTaskObj = padv.Task("myTask");

    Artifacts that are inputs to the task, specified as a cell array of padv.Artifact objects.

    If you specified the InputQueries property for a task, the InputQueries automatically passes a cell array of padv.Artifact objects to inputArtifacts when you run the task.

    Output Arguments

    collapse all

    Result from the task, returned as a TaskResult object.