User`s guide

Create Procedures
27-3
Add Subprocedures and Tasks to Procedures
You can add subprocedures or tasks to a procedure. The tasks are wrappers for checks.
Use the ModelAdvisor.Procedure.addProcedure method to add a subprocedure
to a procedure.
Use the ModelAdvisor.Procedure.addTask method to add a task to a procedure.
Define Where Procedures Appear
You can specify where the Model Advisor places a procedure using the
ModelAdvisor.Group.addProcedure method.
Procedure Definition
The following code example adds procedures to a group:
%Create three procedures
MAP1=ModelAdvisor.Procedure('com.mathworks.sample.myProcedure1');
MAP2=ModelAdvisor.Procedure('com.mathworks.sample.myProcedure2');
MAP3=ModelAdvisor.Procedure('com.mathworks.sample.myProcedure3');
%Create a group
MAG = ModelAdvisor.Group('com.mathworks.sample.myGroup');
%Add the three procedures to the group
addProcedure(MAG, MAP1);
addProcedure(MAG, MAP2);
addProcedure(MAG, MAP3);
%register the group and and procedures
mdladvRoot = ModelAdvisor.Root;
mdladvRoot.register(MAG);
mdladvRoot.register(MAP1);
mdladvRoot.register(MAP2);
mdladvRoot.register(MAP3);
The following code example adds subprocedures to a procedure:
%Create a procedures
MAP = ModelAdvisor.Procedure('com.mathworks.example.Procedure');
%Create 3 sub procedures
MAP1=ModelAdvisor.Procedure('com.mathworks.example.procedure_sub1');