560 likes | 1.48k Views
AllFusion ERwin Data Modeler API. Agenda. AllFusion ERwin DM API Objectives Architecture Components and their functions Examples of API use ERwin Spy XML Script Integration strategies and useful tips Summary Questions and answers Samples. AllFusion ERwin DM API. Objectives
E N D
Agenda • AllFusion ERwin DM API • Objectives • Architecture • Components and their functions • Examples of API use • ERwin Spy • XML • Script • Integration strategies and useful tips • Summary • Questions and answers • Samples
AllFusion ERwin DM API • Objectives • Architecture • Components and their functions
ERwin DM API Objectives • Enables access to data in ERwin Modeling Core memory at run-time, as well as to models persisted in files and in Model Mart repositories. • Add-In and Stand-Alone • Generic, object-property based. Access to model data and metadata • COM technology, Automation-compatible
ERwin DM API Architecture Modeling Core ERwin File I/O MM Repository API Application Persistence Directories Model Metamodel ERwin Spy XML Client Model Mart Clients Client
ERwin DM API Components • Application • Property bag • Persistence unit • Session • Model object • Model property
Application Component Modeling Core ERwin File I/O MM Repository Application API Persistence Directories Model Metamodel ERwin Spy XML Client Model Mart Clients Client
Application Component • ISCApplication • Main entry point into API • Encapsulates API functionality • Must be instantiated • Key properties • Persistence units • Model Directories • Sessions
Persistence Components Modeling Core ERwin File I/O MM Repository API Application Persistence Directories Model Metamodel ERwin Spy XML Client Model Mart Clients Client
Persistence Unit Component • ISCPersistenceUnitCollection • Container of Persistence Units • Interfaced via Application object • Key properties / methods • Item • Add • Create
Persistence Unit Component • ISCPersistenceUnit • Represents a model data unit in memory • Key properties / methods • PropertyBag • Save
Property Bag Component • ISCPropertyBag • Holds properties of a persistence unit • Needed to create a new persistence unit • Must be instantiated • Key properties / methods • Value • Add
Model, Metamodel Components Modeling Core ERwin File I/O MM Repository API Application Persistence Directories Model Metamodel ERwin Spy XML Client Model Mart Clients Client
AllFusion ERwin DM Metamodel • Object-property based • Model-based vs. intrinsic • Exposed through API • Use ERwin Spy to view
Session Component • ISCSessionCollection • Container of sessions • Interface via Application object • Key properties / methods • Item • Add • Remove
Session Component • ISCSession • Use the session to access model data • Key properties / methods • Open • ModelObjects • BeginTransaction • CommitTransaction • Close
Model Object Component • ISCModelObjectCollection • Container of model objects • Interface via session • Key properties / methods • Root • Collect • Item • Add • Remove
Model Object Component • ISCModelObject • Represents a single Object • Key Properties / Methods • Name • ClassName • Context • Properties
Model Property Component • ISCModelPropertyCollection • Container of model property objects • Interface via model object • Key properties / methods • HasProperty • Item • Add • Remove
Model Property Component • ISCModelProperty • Represents a single property • Single and multi valued • Key properties / methods • FormatAsString • Value • DataType
ERwin DM API Clients Modeling Core ERwin File I/O MM Repository API Application Persistence Directories Model Metamodel ERwin Spy XML Client Model Mart Clients Client
Samples • SCAPI using VBScript • SCAPI using HTML
XML for AllFusion ERwin DM • Standard XML file format • Based on AllFusion ERwin DM Object-Property Model • DTD supplied • Supports both import and export
XML File Terms • AllFusion ERwin DM objects • AllFusion ERwin DM properties • Object and property grouping • AllFusion ERwin DM IDs
XML – AllFusion ERwin DM Objects • Appear as XML elements • Contain a Name and ID attribute <Entity id="{E53D9A6E-9F69-4516-A7E6-72C058E2634C}+00000000" Name="EntOne">
XML – AllFusion ERwin DM Properties • Appear as XML elements • Property value stored as text • Optional RO attribute • <Type RO="Y">3</Type> • <Key_Group_Type>PK</Key_Group_Type> • <Parent_Domain>{39146A35-A713-4CAA-9FBF-9AA575FA9F44}+00000001</Parent_Domain>
XML – Grouping • Child object grouping • <Entity id=…> • <Attribute_Groups> • <Attribute id=…> • </Attribute_Groups> • </Entity>
XML – Grouping (continued) • Property grouping • <Entity id= …> • <EntityProps> • <Name>EntOne</Name> • <Type>1</Type> • <Index_Generate>1</Index_Generate> • </EntityProps>
XML – AllFusion ERwin DM IDs • GUID + offset • Unique • Generated on import • id="{E53D9A6E-9F69-4516-A7E6-72C058E2634C}+00000000"
XML Export • “Save As” file type • Exports complete AllFusion ERwin DM model
XML Import • “Open” file type • Imports into a new model • Supports “partial” XML files
<?xml version="1.0"?> <ERwin4 FileVersion="4002"> <Model id="0001" ModelType="3" TargetServer="192" DBMSVersion=“13“ DBMSMinorVersion="1"> </ERwin4> XML - Model
Samples • XML
Integration Strategies • Integration choices • Factors to consider • Examples
Integration Choices • XML • API • Standalone • Add-In • Combined solutions
Factors to Consider • Platform • Product dependencies • Level of integration • Size and speed
Integration Example • AllFusion Data Model Validator • Issues • Ability to directly read ER1 files • Needed only physical information • Solution • Use the API in standalone mode • Provide the ability to launch AllFusion Data Model Validator from AllFusion ERwin DM
Integration Example • AllFusion Component Modeler • Issues • Two-way integration • Product installation independent • Solution • Create an AllFusion ERwin DM add-in • Use both API and XML
Overall Value • AllFusion ERwin DM API functions offer powerful capabilities to support: • Model migration and conversion • Tool and life cycle integration • Extended reporting
Session Summary What have we covered? • AllFusion ERwin DM API, architecture, components • AllFusion ERwin DM metamodel • AllFusion ERwin DM XML • Integration strategies • Overall value
CA Education Making CA Clients Successful with CA Software • CA Education helps companies quickly transform the potential of Computer Associates software into a measurable performance advantage by providing a faster, easier, better approach to training • Stop by the Customer Pavilion for your Free 2002 Education Course Catalog and Schedule • Visit us on the web at ca.com/education, or contact us at 1-800-237-9273
Samples • XML • SCAPI using VBScript • SCAPI using HTML