Main Content

padv.Process Class

Namespace: padv

Group tasks and subprocesses in process model

Description

This class requires CI/CD Automation for Simulink Check.

A padv.Process object represents a group of tasks and subprocesses in your process model. By default, your process model has a default process "CIPipeline". To create other processes in your process model, create a new process object by using the method addProcess. You can group tasks and other subprocesses inside a specified process by using addTask and addSubprocess. You can specify a dependency or desired execution order between tasks and subprocesses inside your process by using either addDependsOnRelationship or addRunsAfterRelationship. For more information, see Manage Multiple Build and Verification Workflows Using Processes.

The padv.Process class is a handle class.

Creation

Description

process = padv.Process(Name) represents a process, named Name, inside a process model. Each process in the process model must have a unique Name.

example

process = padv.Process(___,Name=Value) sets properties using one or more name-value arguments. For example, padv.Process("myProcess",Title="My Process") creates a process with the title My Process in Process Advisor.

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Properties

expand all

Path to process documentation, returned as a string.

Example: padv.Process("myProcess",DescriptionCSH = fullfile(pwd,"myHelpFiles","myProcessDocumentation.pdf"))

Data Types: string

Process description, returned as a string.

Example: padv.Process("myProcess",DescriptionText = "This is my process.")

Data Types: string

Human readable name that appears in the Processes drop-down menu in the Process Advisor app, returned as a string. By default, the Process Advisor app uses the Name property of the process as the Title.

Example: padv.Process("myProcess",Title = "My Process")

Data Types: string

Unique identifier for the process, returned as a string. When you specify the Name, you specify the Name property of the process object.

Each process in the process model must have a unique Name.

Example: padv.Process("myProcess")

Data Types: string

Methods

expand all

Examples

collapse all

You can use addProcess to create a new process and add that process to the process model. addProcess returns a padv.Process object that can represent a group of tasks and subprocesses in a process model.

For example, this process model creates a new process, ProcessA, adds tasks to the process, and adds a dependency between those tasks.

function processmodel(pm)
    % Defines the project's processmodel

    arguments
        pm padv.ProcessModel
    end

    % Create and add process to process model
    processA = pm.addProcess("ProcessA");

    % Add tasks to Process A
    taskA = processA.addTask("taskA");
    taskB = processA.addTask("taskB");

    % Add dependency between tasks inside Process A
    processA.addDependsOnRelationship(...
        Source = taskB,...
        Dependency = taskA);
    
end