You are on page 1of 43

Metadata Exchange with

AllFusion ERwin Data


Modeler
Application Life Cycle Management

ca.com Copyright 2003, Computer Associates International, Inc


Agenda
 AllFusion ERwin Data Modeler (DM)
metamodel
 XML for AllFusion ERwin DM
 AllFusion ERwin DM Script Client API
 Integration strategies
 Summary
 Questions and answers
 Samples

ca.com Copyright 2003, Computer Associates International, Inc


AllFusion ERwin DM Metamodel
 Object-property based
 Model-based vs. intrinsic
 Exposed through API
 Use ERwin Spy to view

ca.com Copyright 2003, Computer Associates International, Inc


ERwin Spy – Metamodel View

ca.com Copyright 2003, Computer Associates International, Inc


XML for AllFusion ERwin DM
 Standard XML file format
 Based on AllFusion ERwin DM Object-
Property Model
 DTD supplied
 Supports both import and export

ca.com Copyright 2003, Computer Associates International, Inc


XML File Terms
 AllFusion ERwin DM objects
 AllFusion ERwin DM properties
 Object and property grouping
 AllFusion ERwin DM IDs

ca.com Copyright 2003, Computer Associates International, Inc


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">

ca.com Copyright 2003, Computer Associates International, Inc


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>

ca.com Copyright 2003, Computer Associates International, Inc


XML – Grouping
 Child object grouping

<Entity id=…>
<Attribute_Groups>
<Attribute id=…>
</Attribute_Groups>
</Entity>

ca.com Copyright 2003, Computer Associates International, Inc


XML – Grouping (continued)
 Property grouping

<Entity id= …>


<EntityProps>
<Name>EntOne</Name>
<Type>1</Type>

<Index_Generate>1</Index_Generate>
</EntityProps>

ca.com Copyright 2003, Computer Associates International, Inc


XML – AllFusion ERwin DM IDs
 GUID + offset
 Unique
 Generated on import

id="{E53D9A6E-9F69-4516-A7E6-
72C058E2634C}+00000000"

ca.com Copyright 2003, Computer Associates International, Inc


XML Export
 “Save As” file type
 Exports complete AllFusion ERwin DM
model

ca.com Copyright 2003, Computer Associates International, Inc


XML Import
 “Open” file type
 Imports into a new model
 Supports “partial” XML files

ca.com Copyright 2003, Computer Associates International, Inc


XML - Model
<?xml version="1.0"?>
<ERwin4 FileVersion="4002">
<Model id="0001"
ModelType="3"
TargetServer="192"
DBMSVersion=“13“
DBMSMinorVersion="1">
</ERwin4>

ca.com Copyright 2003, Computer Associates International, Inc


AllFusion ERwin DM Script Client API (SCAPI)

 COM-based API
 Data and metadata
 Add-in vs. stand-alone
 Model access
 Access methods

ca.com Copyright 2003, Computer Associates International, Inc


SCAPI Components
 Application
 Property bag
 Persistence unit
 Session
 Model object
 Model property

ca.com Copyright 2003, Computer Associates International, Inc


Application Component
 ISCApplication
> Main entry point into SCAPI
> Encapsulates API functionality
> Must be instantiated
> Key properties
> Persistence units
> Sessions

ca.com Copyright 2003, Computer Associates International, Inc


Property Bag Component
 ISCPropertyBag
> Holds properties of a persistence unit
> Needed to create a persistence unit
> Must be instantiated
> Key properties / methods
> Value
> Add

ca.com Copyright 2003, Computer Associates International, Inc


Persistence Unit Component
 ISCPersistenceUnit
> Connection between API and storage
> Key properties / methods
> PropertyBag
> Save

ca.com Copyright 2003, Computer Associates International, Inc


Persistence Unit Component
 ISCPersistenceUnitCollection
> Container of persistence units
> Interfaced via application object
> Key properties / methods
> Item
> Add
> Create

ca.com Copyright 2003, Computer Associates International, Inc


Session Component
 ISCSession
> Link between model and persistence unit
> Use the session to access model data
> Key properties / methods
> Open
> ModelObjects
> BeginTransaction
> CommitTransaction
> Close

ca.com Copyright 2003, Computer Associates International, Inc


Session Component
 ISCSessionCollection
> Container of sessions
> Interface via application object
> Key properties / methods
> Item
> Add
> Remove

ca.com Copyright 2003, Computer Associates International, Inc


Model Object Component
 ISCModelObject
> Represents a single Object
> Key Properties / Methods
> Name
> ClassName
> Context
> Properties

ca.com Copyright 2003, Computer Associates International, Inc


Model Object Component
 ISCModelObjectCollection
> Container of model objects
> Interface via session
> Key properties / methods
> Root
> Collect
> Item
> Add
> Remove

ca.com Copyright 2003, Computer Associates International, Inc


Model Property Component
 ISCModelProperty
> Represents a single property
> Single and multi valued
> Key properties / methods
> FormatAsString
> Value
> DataType

ca.com Copyright 2003, Computer Associates International, Inc


Model Property Component
 ISCModelPropertyCollection
> Container of model property objects
> Interface via model object
> Key properties / methods
> HasProperty
> Item
> Add
> Remove

ca.com Copyright 2003, Computer Associates International, Inc


Integration Strategies
 Integration choices
 Factors to consider
 Examples

ca.com Copyright 2003, Computer Associates International, Inc


Integration Choices
 XML
 API
 Standalone
 Add-In
 Combined solutions

ca.com Copyright 2003, Computer Associates International, Inc


Factors to Consider
 Platform
 Product dependencies
 Level of integration
 Size and speed

ca.com Copyright 2003, Computer Associates International, Inc


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

ca.com Copyright 2003, Computer Associates International, Inc


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

ca.com Copyright 2003, Computer Associates International, Inc


Overall Value
 AllFusion ERwin DM API functions offer
powerful capabilities to support:
> Model migration and conversion
> Tool and life cycle integration
> Extended reporting

ca.com Copyright 2003, Computer Associates International, Inc


Session Summary
What have we covered?
 AllFusion ERwin DM metamodel
 AllFusion ERwin DM XML
 Script Client API (SCAPI)
 Integration strategies
 Overall value

ca.com Copyright 2003, Computer Associates International, Inc


Questions & Answers

ca.com Copyright 2003, Computer Associates International, Inc


Samples
 XML
 SCAPI using VBScript
 SCAPI using HTML

ca.com Copyright 2003, Computer Associates International, Inc


XML Sample

ca.com Copyright 2003, Computer Associates International, Inc


XML Sample Output

ca.com Copyright 2003, Computer Associates International, Inc


VBScript Sample 1

ca.com Copyright 2003, Computer Associates International, Inc


VBScript Sample 2

ca.com Copyright 2003, Computer Associates International, Inc


VBScript Sample 2 (cont)

ca.com Copyright 2003, Computer Associates International, Inc


VBScript Sample 2 Output

ca.com Copyright 2003, Computer Associates International, Inc


HTML Sample

ca.com Copyright 2003, Computer Associates International, Inc


HTML Sample Output

ca.com Copyright 2003, Computer Associates International, Inc

You might also like