3D PLM PPR Hub Open Gateway

Configuration Management

Creating and Using Milestones

Working with a program and milestones
Use Case

Abstract

This article discusses the CAAVpiMilestones use case. This use case explains how to create programs and milestones, and how to use them in Configuration Management.


What You Will Learn With This Use Case

This use case is intended to help you make your first steps in programming the ENOVIA Configuration Management. Its main intent is to create a program and milestones, and use them in Configuration Management.

[Top]

The CAAVpiMilestones Use Case

CAAVpiMilestones is a use case of the CAAVPMInterfaces.edu framework that illustrates VPMInterfaces framework capabilities.

[Top]

What Does CAAVpiMilestones Do

The goal of CAAVpiMilestones case is to show how to use Configuration Management interfaces to create a program, that is, an entity that aggregates milestones. Using milestones in Configuration Management is then demonstrated. The effects of a milestone value's modification is explained.

More precisely CAAVpiMilestones:

[Top]

How to Launch CAAVpiMilestones

To launch CAAVpiMilestones, you will need to set up the build time environment, then compile CAAVpiMilestones along with its prerequisites, set up the run time environment, and then execute the use case [1].

Launch the use case as follows:

[Top]

Where to Find the CAAVpiMilestones Code

The CAAVpiMilestones use case is made of a single class named CAAVpiMilestones located in the CAAVpiMilestones.m module of the CAAVPMInterfaces.edu framework:

Windows InstallRootDirectory\CAAVPMInterfaces.edu\CAAVpiMilestones.m\
Unix InstallRootDirectory/CAAVPMInterfaces.edu/CAAVpiMilestones.m/

where InstallRootDirectory is the directory where the CAA CD-ROM is installed.

[Top]

Step-by-Step

There are six main steps in CAAVpiMilestones Code:

  1. Prolog
  2. Creating a Program and a Milestone
  3. Initializing a Milestone
  4. Attaching a Program to the Configurable Root
  5. Defining Effectivities for Modification
  6. Modifying a Milestone Value

We will now comment each of these sections in detail.

[Top]

Prolog

CAAVpiMilestones creates two simple product trees, made of one product root class (prefix is uidPRC), and under it, two item instances (prefix is uidII ). The creation process won't be detailed here, as it's not the purpose of this use case, but a prerequisite. Please refer to Product Structure samples to get more explanations about Product Structure management.

On each of this two product trees, a configurable root and a configurable view are created. Please refer to the use case Configuring a Product Structure [2] to get more information.

[Top]

Creating a Program and a Milestone

...
//--Create Program   
  CATICfgProgram_var Program;
  CATUnicodeString ProgName("Program1");
  ret = CfgManager->CreateProgram(ProgName,Program);
  if FAILED(ret) return ret;
	 
//--Create MileStone
  CATICfgMileStone_var MileStone1;
  CATUnicodeString name_MS1("MileStone1");

  ret = Program->CreateMileStone(name_MS1,MileStone1);
  if FAILED(ret) return ret;
...

The configuration manager is used to create a program. A program aggregates milestones under its unique name.

To create milestones, a smart pointer to CATICfgProgram is needed. Here, a milestone under "Program1" is created.

A milestone is a label referencing a value used in modification effectivities. It is useful to use a milestone instead of a real value, so as to quicker modify all the effectivities impacted by a value change.

[Top]

Initializing a Milestone

...
  //--Milestones Initialization. Creation of Normal Value is needed.
  CATICfgNormalValue_var NV1;
  int Range = 20;

  ret = CfgManager->CreateNormalValue(Range,Range,NV1);
  if FAILED(ret) return ret;

  ret = MileStone1->SetDefaultNV(NV1);
  if FAILED(ret) return ret;
...

A milestone is initialized using a normal value and the SetDefaultNV method.

A milestone can take different values, depending on the configurable root to which its program is attached.

It is thus possible to give a default value that will apply when attaching the program to the configurable root.

[Top]

Attaching a Program to the Configurable Root

...
  //--Program Attachement
  ret = ConfigurableRootA->AttachProgram(Program);
  if FAILED(ret) return ret;
...

This essential step links the program and milestones under it to the configurable root.

A milestone value (of type MilestoneValue) is created, and set with the default value defined for the milestone.

This MilestoneValue is unique for the pair: ConfigurableRoot - Milestone.

[Top]

Defining Effectivity for Modification

...
  //--Define Effectivity1 : [MileStone1, 100]
  int StartRange1 = 20;
  int EndRange1   = 100;

  CATICfgBasicEffectivity_var BasEff1;
  ret = CfgManager->CreateBasicEffectivity(BasEff1);
  if FAILED(ret) return ret;

  ret = BasEff1->SetRangeInterval(StartRange1, EndRange1);
  if FAILED(ret) return ret;

  ret = BasEff1->SetStartMilestone(MileStone1);
  if FAILED(ret) return ret;

  CATICfgEffectivity_var Effectivity1;
  ret = CfgManager->CreateEffectivity(Effectivity1);
  if FAILED(ret) return ret;

  ret = Effectivity1->AddEffectivity(BasEff1);
  if FAILED(ret) return ret;
...

Please refer to the use case CAAVpiConfigurateStructure to get more information about creation of the basic effectivity and effectivities.

To define a milestone on a basic effectivity, the SetStartMileStone (or/and SetEndMilestone) method is used.

[Top]

Modifying a Milestone Value

...
  //-- Create new Normal value
  CATICfgNormalValue_var NV1bis;
  int Range1bis = 50;  //new value

  ret = CfgManager->CreateNormalValue(Range1bis,Range1bis,NV1bis);
  if FAILED(ret) return ret;

  //-- Query MileStoneValue
  CATICfgMileStoneValue_var MileStoneValue1;
  ret = ConfigurableRootA->QueryMileStoneValueByMileStone(MileStone1,MileStoneValue1);
  if FAILED(ret) return ret;

  //-- Modify Milestone Value
  ret = MileStoneValue1->SetNV(NV1bis);
  if FAILED(ret) return ret;
...

An important advantage of using milestones is the possibility to change their value. Thus, each effectivity impacted by these milestones is automatically refreshed. In case of large scale engineering project, a date type milestone can be used to set a specific value at the end of the design phase. This milestone will then be used in a large number of part instances' effectivities. If the date changes, there is no need to update each effectivity, but only the milestone value.

First, a normal value must be created with the expected new value for milestone.

Then, the unique milestone value for the pair Configurable Root - Milestones is retrieved.

Finally, this milestone value is modified using the SetNV method.

[Top]

In Short

This use case has demonstrated the way to create a program and milestones and use them in Configuration Management.

[Top]


References

[1] Building and Launching a CAA V5 Use Case
[2] Configuring a Product Structure and Using Filters
[Top]

History

Version: 1 [Apr 2001] Document created
[Top]

Copyright © 2001, Dassault Systèmes. All rights reserved.