Upload
others
View
10
Download
0
Embed Size (px)
Citation preview
© 2012, Business-DNA Solutions GmbH 1
Data Exchange Data Exchange Data Exchange Data Exchange withwithwithwith
© 2012, Business-DNA Solutions GmbH 2
Name: Markus Schlegel,Business-DNA Solutions GmbH
Position: Software-Architect
Email: [email protected]
Version: 1.0, 24.10.2012
IntroductionIntroductionIntroductionIntroduction
© 2012, Business-DNA Solutions GmbH 3
1. Introduction2. TopEase Metamodel3. XML Import Setup4. Practice
ScheduleScheduleScheduleSchedule
© 2012, Business-DNA Solutions GmbH 4
Introduction
4
© 2012, Business-DNA Solutions GmbH 5
TopEase® TopEase® TopEase® TopEase® PlatformPlatformPlatformPlatform
Repository
TopEase Designer
TopEase® XChange Server
Connect /Offline
Business Server
Browse
TopEase® WebServer
TopEase® WebExplorer / WebClient(Internet Browser)[Ajax based JSF])
Job Server
HTML Pages (static)File Server
Clients (Internet Browser) [JSP & JavaScript]
read and modify data
read onlyFull capability:create, read, update, delete
Active Directory
LDAP
TopEase® WatchDog
JMX(Java Management Extension)
DB (Oracle)
© 2012, Business-DNA Solutions GmbH 6
Plugins, Rules
APIApplication Programming Interface
Open Technology / Flexible InterfacesOpen Technology / Flexible InterfacesOpen Technology / Flexible InterfacesOpen Technology / Flexible Interfaces
• csv Files
• ASCII Files
• XML Files
• XMI Files
• XPDL Files
- Relational Database
(Oracle, SQL-Server, …)
- Reporting Engine
(Crystal Reports, iReports, …)
- Business Intelligence SW
(Cognos, QlikView, …)
TopEase®
Plattform
AP
I
CMDB …
COM / DCOM
• Active Directory
© 2012, Business-DNA Solutions GmbH 7
HistoryHistoryHistoryHistory ofofofof Import Import Import Import FunctionalitiesFunctionalitiesFunctionalitiesFunctionalities
7
Custom XML
CSV CMDB (CSV with Delete Support)
Generic XML
with Delete Support
Num
ber
ofIm
port
s /
rela
tive
Impo
rtam
nce
Time
with Ant Runner
© 2012, Business-DNA Solutions GmbH 8
ExampleExampleExampleExample: : : : BidirectionalBidirectionalBidirectionalBidirectional XML Data ExchangeData ExchangeData ExchangeData Exchange
Any
XML Files
TopEase®
Plattform
xsd
TopEase®
XML Files
xsd
Data Mapping
xslt
Application
XYZ
© 2012, Business-DNA Solutions GmbH 9
ExampleExampleExampleExample: : : : BidirectionalBidirectionalBidirectionalBidirectional XML Data ExchangeData ExchangeData ExchangeData Exchange
© 2012, Business-DNA Solutions GmbH 10
SummarySummarySummarySummary
• Flexibler Datenimport / -export von / nach beliebigen Datenquellen
• Datenimport basiert auf best. Schnittstellen (Konfiguration)
• Manuelle oder Batch Verarbeitung (Automatische Ausführung)
• Ausführung vorgelagerter, nachgelagerter anderen Bearbeitungen
• Regelbasierte Import - / Export Logik (Löschungen, …)
• Automatische Versionierung vor / nach Datenaustausch
• Stakeholder gerechter Datenaustausch (Berechtigungsmagement)
© 2012, Business-DNA Solutions GmbH 11
TopEase Metamodel
11
© 2012, Business-DNA Solutions GmbH 12
MOF-based (http://www.omg.org/mof)
The Metamodel The Metamodel The Metamodel The Metamodel behindbehindbehindbehind TopEaseTopEaseTopEaseTopEase
12
Documented with:
- XSD
- Schema Documentation
- Schema Inspector
- XML-Export
© 2012, Business-DNA Solutions GmbH 13
Create Create Create Create andandandand useuseuseuse XSDXSDXSDXSD
Create the XSD using the Plugin for each TopEase Version/Metamodel• Normally you don‘t need to include the I18N Properties.
You may require them onlyif you have to import multi-language content.
• May be used to browse orsearch in Metamodel
© 2012, Business-DNA Solutions GmbH 14
Schema Schema Schema Schema DocumentationDocumentationDocumentationDocumentation PlugInPlugInPlugInPlugIn IIII
• Use the Plugin „Schema Documentation“ to create UML Diagrams of the TopEase Metamodel inside TopEase
14
Select predefined View Folder
Create Diagram
© 2012, Business-DNA Solutions GmbH 15
• Create an actual Schema Documentation
• Create UML Diagrams as needed• Usage
• Create empty model• Invoke the PlugIn• Select your Folder• Create a Class Diagram
Schema Documentation Schema Documentation Schema Documentation Schema Documentation PlugInPlugInPlugInPlugIn IIIIIIII
© 2012, Business-DNA Solutions GmbH 16
Schema Inspector PluginSchema Inspector PluginSchema Inspector PluginSchema Inspector Plugin
© 2012, Business-DNA Solutions GmbH 17
Schema Schema Schema Schema InspectorInspectorInspectorInspector, , , , how to readhow to readhow to readhow to read
© 2012, Business-DNA Solutions GmbH 18
UsingUsingUsingUsing an Export an Export an Export an Export totototo learnlearnlearnlearn
Make an Example-Export of the Objects you like to import
© 2012, Business-DNA Solutions GmbH 19
XML XML XML XML ImporterImporterImporterImporter DocumentsDocumentsDocumentsDocuments
Use«TEXMLInterface.doc»and«AntRunnerPlugin.doc»as Reference.
19
© 2012, Business-DNA Solutions GmbH 20
XML Import Setup
20
© 2012, Business-DNA Solutions GmbH 21
XML Import SetupXML Import SetupXML Import SetupXML Import Setup
•Stylus Studio
•TopEase Plugins
•XML Import/Export
•DevTools
•Maybe CSV Import (for CSV to XML conversion)
•Maybe Antrunner
•XSD Schema
•Create using Plugin in TopEase
© 2012, Business-DNA Solutions GmbH 22
XML Import XML Import XML Import XML Import technologytechnologytechnologytechnology ---- StartingStartingStartingStarting a Projecta Projecta Projecta Project
•Understand the Requirements•Umfang des Imports (Anzahl unterschiedliche Files, Anzahl Spalten/Artefakte, Komplexität, Redundanzen?)
•Wiederholtes Importieren, oder einmalig? (Nicht alles lohnt sich in XML zu machen, DeleteSupport…)
•Datenformats Quelle? Nicht immer ist XML geeignet (z.B. Excel 2010…)
•Understand the Datasources, draw a Picture
•Define Import Sets
•Define the Mapping (conceptually)
•*Then* do the xslt mapping
© 2012, Business-DNA Solutions GmbH 23
A A A A typicaltypicaltypicaltypical importimportimportimport roundtriproundtriproundtriproundtrip
23
Excel
CSV
Excel Spreadsheet
XML
Simple Row/Column
XML
XPDL
XMI
some XML
XSLT
XSD
TopEase
XML
TopE
ase
XB
ench
Des
igne
r =
DX
Cha
nge
= X
XM
L Im
port
Plu
gin
Ant Runner Automation
Excel to XML
CSV to XML
© 2012, Business-DNA Solutions GmbH 24
XSLT‘s
XLSTXLSTXLSTXLST----DevelopmentDevelopmentDevelopmentDevelopment vs. vs. vs. vs. ProductionProductionProductionProduction
24
ExcelXLS
ExcelXML
TopEaseXSD
TopEaseXTE
XSLT‘sXSLT‘s
TopEase XML
(pretty)
Excel to XML(Designer Plugin)
Stylus Studio(XML / XSLT Tool)
XML Import(Designer Plugin)
XSD Schemagenerator(Designer Plugin)
Model Review ����
visual review
validity
© 2012, Business-DNA Solutions GmbH 25
XSLTXSLTXSLTXSLT----DevelopmentDevelopmentDevelopmentDevelopment vsvsvsvs. Production . Production . Production . Production ���� Ant RunnerAnt RunnerAnt RunnerAnt Runner
25
antbuild.xmlCreate Ant-Script
Execute in Designer
Define Server-Jobexecution
����
© 2012, Business-DNA Solutions GmbH 26
XSLTXSLTXSLTXSLT----Development Development Development Development vsvsvsvs. . . . Production Production Production Production ���� using AntRunnerusing AntRunnerusing AntRunnerusing AntRunner
26
ExcelXLS
ExcelXML
TopEaseXSD
TopEaseXTE
XSLT‘sXSLT‘sXSLT‘s
TopEase XML
Excel to XML(Ant Runner)
XSLT-Processor
(Ant Runner)
XML Import(Ant Runner)
antbuild.xml
© 2012, Business-DNA Solutions GmbH 27
Practice
27
© 2012, Business-DNA Solutions GmbH 28
Practice „Mitarbeiterliste“Practice „Mitarbeiterliste“Practice „Mitarbeiterliste“Practice „Mitarbeiterliste“
Csv to XML
Excel to XML
�Stylus Studio Mapping
�Delete-Support / Import Management Plugin
© 2012, Business-DNA Solutions GmbH 29
Excel Data Excel Data Excel Data Excel Data ConversionConversionConversionConversion
• Two ways: directly as „Excel XML Spreadsheet“ or first as CSV then asXML using CSV to XML Conversion
• Converts formulas to values• Converts empty cells too, such that cells and rows are accessible using
their numeric index• At least Excel 2003 required• Ability to perform customer specific things during the conversion using
COM-API
29
Excel
CSV
Excel Spreadsheet
XML
Simple Row/Column
XML
Excel to XML
CSV to XML
• Xls->csv->xml:
• Easy to read in XML
• Easy to map using xslt
• Easy to debug
• Not suited for all kind of data (only pure table data having one Header)
• Some overhead in the roundtrip
• Xls->xml:
• Exact image/copy of the original excel data
• Several Worksheets in the same xml file
• Suited for all kind of Excel documents
• Harder to read and map
© 2012, Business-DNA Solutions GmbH 30
Using Stylus StudioUsing Stylus StudioUsing Stylus StudioUsing Stylus Studio
30
© 2012, Business-DNA Solutions GmbH 31
XSLTXSLTXSLTXSLT----TemplateTemplateTemplateTemplate
<?xml version='1.0' ?><xsl:stylesheet version=„2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"><Extent partial="true" docversion="1.0" schema="63H">
<!-- here comes your mapping -->
</Extent></xsl:template>
</xsl:stylesheet>
31
© 2012, Business-DNA Solutions GmbH 32
PitfallsPitfallsPitfallsPitfalls
• XML-Importer may import structures which make no sense. For Example, you may create a Process-Object inside the Resources Folder.� You are responsible to make semantically correct and meaningful things (only things that you could make using the UI too).
• Always check the Log of the Import for Warnings and Errors.• TODO: more things?
32
© 2012, Business-DNA Solutions GmbH 33
Manuelle Steps: Mit AntRunner:
AntAntAntAnt RunnerRunnerRunnerRunner
Excel-File (Mitarbeiter.csv)
CSV to XML Converter
Mitarbeiter.csv.xml
XSLT (transformation.xsl) im StylusStudio
mitarb_te.xml
XML Import Plugin (TopEase)
TopEase XTE-File
„csvToXML“ Task
„xslt“ Task
„xmlImport“ Task
© 2012, Business-DNA Solutions GmbH 34
Fragen und AntwortenFragen und AntwortenFragen und AntwortenFragen und Antworten
Tel. +41 44 308 39 85