Lifecycle Applications |
Engineering Change Management |
The Action Manager InterfaceCreating and deleting Actions and ECRs |
Use Case |
AbstractThis article shows how to use the ENOVICWActionManager interface of the ENOVInterfaces framework to create and remove Actions and Engineering Change Requests in the Change Management domain. |
This use case is intended to show you how to create and delete two of the basic objects of the Change Management domain: Actions and Engineering Change Requests. These objects are used to request and accomplish the modification or development of a product. The ENOVInterfaces framework contains the ENOVICWActionManager interface which allow you to directly create the business objects which may then be manipulated as desired.
[Top]
CAAEviActionManager is a use case of the CAAENOVInterfaces.edu framework that illustrates the creation of the Actions and Engineering Change Requests.
[Top]
CAAEviActionManager begins by opening a VPM session and creating a login a session. Then the Action Manager is retrieved. The necessary parameters are created and the managers are directly used to create the business objects.
The ENOVInterfaces interfaces/methods shown are as follows:
[Top]
To launch CAAEviActionManager, you will need to set up the build time environment, then compile CAAEviActionManager.cpp along with its prerequisites, set up the run time environment, and then execute the use case. The required interfaces can be found in the ENOVInterfaces, VPMInterfaces, VPMPersistency, System frameworks. From the directory where the executable file is stored, enter"CAAEviActionManager" to execute the program. [1].
[Top]
The CAAEviActionManager use case is made of a single file located in the CAAEviActionManager.m module of the CAAENOVInterfaces.edu framework:
Windows | InstallRootDirectory\CAAENOVInterfaces.edu\CAAEviActionManager.m\ |
Unix | InstallRootDirectory/CAAENOVInterfaces.edu/CAAEviActionManager.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
For demonstration purposes, the code from the CAAEviActionManager use case is shown here. There are five logical steps in the CAAEviActionManager use case:
[Top]
#include "ENOVIBOActionManager.h" |
This include statement gives access to the interface demonstrated here.
//--- Get the ENOVIBOActionManager ENOVIBOActionManager_var spActMgr = GetBOActManager(); if ( spActMgr == NULL_var ) { cout << "ERROR in getting Action Manager." << endl << flush; VPMSession::CloseSession(); return 2; } cout << "Got Action Manager successfully." << endl << flush; |
[Top]
#include "CATIAFLAction.h" #include "CATUnicodeString.h" #include "ENOVIBOActionManager.h" |
These include statements are required for the following operations.
//--- Create a new Action CATIVpmAFLAction_var Action = NULL_var; CATUnicodeString ActType("Action_Design"); CATUnicodeString ActName("MyDesignAction"); CATUnicodeString ActPriority("Routine"); CATUnicodeString ActInitialAbstract("This is a CAA Design Action."); rc = spActMgr->CreateNewAction( ActType, Action, ActName, ActPriority, ActInitialAbstract ); if ( !SUCCEEDED(rc) || Action==NULL_var ) { cout << "ERROR in creating Action." << endl << flush; VPMSession::CloseSession(); return 3; } cout << "Created new Action successfully." << endl << flush; |
[Top]
#include "CATIVpmAFLAction.h" #include "CATUnicodeString.h" #include "ENOVIBOActionManager.h" |
These include statements are required for the following operations.
//--- Create a new Engineering Change Request CATIVpmAFLAction_var Ecr = NULL_var; CATUnicodeString EcrType("ECR"); CATUnicodeString EcrName("MyEcr"); CATUnicodeString EcrPriority("Routine"); CATUnicodeString EcrInitialAbstract("This is a CAA Engineering Change Request."); CATUnicodeString EcrTypeCode("Release"); rc = spActMgr->CreateNewECR( EcrType, Ecr, EcrName, EcrPriority, EcrInitialAbstract, EcrTypeCode ); if ( !SUCCEEDED(rc) || Ecr==NULL_var ) { cout << "ERROR in creating Engineering Change Request." << endl << flush; VPMSession::CloseSession(); return 4; } cout << "Created new Engineering Change Request successfully." << endl << flush; |
[Top]
#include "CATIVpmFactoryObject.h" #include "CATUnicodeString.h #include "ENOVIBOActionManager.h" |
These include statements are required for the following operations.
//--- Update Custom Attribute 'ServiceLife' on the Action CATIVpmFactoryObject_var ActFactObj(Action); CATUnicodeString attName("ServiceLife"); CATUnicodeString attValue("20 years"); rc = spActMgr->UpdatecustomAttribute(ActFactObj, attName, attValue); if ( !SUCCEEDED(rc) ) { cout << "ERROR in Updating Custom Attribute." << endl << flush; VPMSession::CloseSession(); return 5; } cout << "Updated Custom Attribute successfully." << endl << flush; |
[Top]
#include "CATIVpmAFLAction.h" #include "ENOVIBOActionManager.h" |
These include statements are required for the following operations.
//--- Delete Action rc = spActMgr->RemoveAction(Action); if ( !SUCCEEDED(rc)) { cout << "ERROR in Deleting Action." << endl << flush; VPMSession::CloseSession(); return 6; } cout << "Deleted Action successfully." << endl << flush; //--- Delete Engineering Change Request rc = spActMgr->RemoveAction(Ecr); if ( !SUCCEEDED(rc)) { cout << "ERROR in Deleting Engineering Change Request." << endl << flush; VPMSession::CloseSession(); return 7; } cout << "Deleted Engineering Change Request successfully." << endl << flush; |
[Top]
The ENOVIBOActionManager interface available in the ENOVInterfaces framework can be used to create and delete Actions and ECRs. Action manager is also used to update customer defined attributes on Actions. You can retrieve the Action manager with GetBOActManager().
[Top]
[1] | Building and Launching a CAA V5 Use Case |
[Top] |
Version: 1 [Feb 2002] | Document created |
[Top] |
Copyright © 1994-2002, Dassault Systèmes. All rights reserved.