Main Content

addInputQueries

Add input artifacts as inputs to task

    Description

    addInputQueries(taskObj,inputQueries) adds the input artifacts returned by inputQueries as inputs to the task represented by taskObj.

    If the task already has input queries specified, addInputQueries adds inputQueries to the list of input queries in the InputQueries property.

    This function requires CI/CD Automation for Simulink Check.

    example

    Examples

    collapse all

    Use addInputQueries to specify the models in the project as inputs to a task.

    Create a new padv.Task object myTaskObj that represents a task named runForEachModel.

    myTaskObj = padv.Task("runForEachModel");

    By default, the task does not have inputs.

    Use the function addInputQueries to add the built-in query padv.builtin.query.FindModels as the input query for the task.

    addInputQueries(myTaskObj,padv.builtin.query.FindModels);

    When you run the task defined by myTaskObj, the query padv.builtin.query.FindModels finds each model in the project and provides the models as the input artifacts for the task.

    Input Arguments

    collapse all

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

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

    A query or queries that get the input artifacts for a task, specified as a padv.Query object or an array of padv.Query objects. Each artifact that the query or queries return becomes an input to the task.

    For example, if you specify the InputQueries property for a task as the query padv.builtin.query.FindModels, the query returns each model and the models become input artifacts for the task.

    For more information, see Overview of Process Model and Find Artifacts with Queries.

    Example: addInputQueries(myTaskObj,padv.builtin.query.FindModels)

    Example: addInputQueries(myTaskObj,[padv.builtin.query.GetIterationArtifact,padv.builtin.query.GetDependentArtifacts])