Data Exchange with 2012, Business-DNA Solutions GmbH 1
Introduction Name: Markus Schlegel, Business-DNA Solutions GmbH Position: Software-Architect Email: customerservice@business-dna.ch Version: 1.0, 24.10.2012 2012, Business-DNA Solutions GmbH 2
Schedule 1. Introduction 2. TopEase Metamodel 3. XML Import Setup 4. Practice 2012, Business-DNA Solutions GmbH 3
Introduction 2012, Business-DNA Solutions GmbH 4 4
TopEase Platform Active Directory TopEase WebExplorer / WebClient (Internet Browser) [Ajax based JSF]) read and modify data LDAP TopEase XChange Server TopEase WebServer JMX (Java Management Extension) Business Server Job Server HTML Pages (static) File Server TopEase WatchDog DB (Oracle) Repository Full capability: create, read, update, delete Connect / Offline Browse read only Clients (Internet Browser) [JSP & JavaScript] TopEase Designer 2012, Business-DNA Solutions GmbH 5
Open Technology / Flexible Interfaces csvfiles ASCII Files XML Files XMI Files XPDL Files TopEase Plattform COM / DCOM API Application Programming Interface Plugins, Rules Active Directory CMDB API - Relational Database (Oracle, SQL-Server, ) - Reporting Engine (Crystal Reports, ireports, ) - Business Intelligence SW (Cognos, QlikView, ) 2012, Business-DNA Solutions GmbH 6
History of Import Functionalities Number of Imports / relative Importamnce Custom XML Generic XML with Ant Runner with Delete Support CSV CMDB (CSV with Delete Support) Time 2012, Business-DNA Solutions GmbH 7 7
Example: Bidirectional XML Data Exchange Application XYZ TopEase Plattform Data Mapping Any XML Files TopEase XML Files xsd xslt xsd 2012, Business-DNA Solutions GmbH 8
Example: Bidirectional XML Data Exchange 2012, Business-DNA Solutions GmbH 9
Summary 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 10
TopEase Metamodel 2012, Business-DNA Solutions GmbH 11 11
The Metamodel behind TopEase MOF-based (http://www.omg.org/mof) Documented with: - XSD - Schema Documentation - Schema Inspector - XML-Export 2012, Business-DNA Solutions GmbH 12 12
Create and use XSD 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 only if you have to import multilanguage content. May be used to browse or search in Metamodel 2012, Business-DNA Solutions GmbH 13
Schema Documentation PlugIn I Use the Plugin Schema Documentation to create UML Diagrams of the TopEase Metamodel inside TopEase Create Diagram Select predefined View Folder 2012, Business-DNA Solutions GmbH 14 14
Schema Documentation PlugIn II Create an actual Schema Documentation Create UML Diagrams as needed Usage Create empty model Invoke the PlugIn Select your Folder Create a Class Diagram 2012, Business-DNA Solutions GmbH 15
Schema Inspector Plugin 2012, Business-DNA Solutions GmbH 16
Schema Inspector, how to read 2012, Business-DNA Solutions GmbH 17
Using an Export to learn Make an Example-Export of the Objects you like to import 2012, Business-DNA Solutions GmbH 18
XML Importer Documents Use «TEXMLInterface.doc» and «AntRunnerPlugin.doc» as Reference. 2012, Business-DNA Solutions GmbH 19 19
XML Import Setup 2012, Business-DNA Solutions GmbH 20 20
XML 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 21
XML Import technology - Starting a 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 22
A typical import roundtrip Excel CSV Excel to XML CSV to XML Excel Spreadsheet XML Simple Row/Column XML XPDL XMI XSLT TopEase XML XSD XML Import Plugin Designer = D XChange = X TopEase XBench some XML Ant Runner Automation 2012, Business-DNA Solutions GmbH 23 23
XLST-Development vs. Production Excel XLS Excel XML XSLT s XSLT s XSLT s validity Excel to XML (Designer Plugin) Stylus Studio (XML / XSLT Tool) visual review TopEase XML (pretty) XSD Schemagenerator (Designer Plugin) TopEase XSD Model Review XML Import (Designer Plugin) TopEase XTE 2012, Business-DNA Solutions GmbH 24 24
XSLT-Development vs. Production Ant Runner Execute in Designer Create Ant-Script antbuild.xml Define Server-Jobexecution 2012, Business-DNA Solutions GmbH 25 25
XSLT-Development vs. Production using AntRunner Excel XLS Excel to XML (Ant Runner) Excel XML TopEase XSD XSLT s XSLT s XSLT s XSLT-Processor (Ant Runner) TopEase XML antbuild.x ml XML Import (Ant Runner) TopEase XTE 2012, Business-DNA Solutions GmbH 26 26
Practice 2012, Business-DNA Solutions GmbH 27 27
Practice Mitarbeiterliste Csv to XML Excel to XML Stylus Studio Mapping Delete-Support / Import Management Plugin 2012, Business-DNA Solutions GmbH 28
Excel Data Conversion Two ways: directly as Excel XML Spreadsheet or first as CSV then as XML 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 Excel CSV Excel to XML CSV to XML Excel Spreadsheet XML Simple Row/Column XML Xls->csv->xml: Easy toreadin XML Easy tomapusingxslt Easy to debug Not suitedforall kindofdata(onlypure tabledatahavingoneheader) 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 toreadandmap 2012, Business-DNA Solutions GmbH 29 29
Using Stylus Studio 2012, Business-DNA Solutions GmbH 30 30
XSLT-Template Template <?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> 2012, Business-DNA Solutions GmbH 31 31
Pitfalls 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? 2012, Business-DNA Solutions GmbH 32 32
Ant Runner Manuelle Steps: Mit AntRunner: Excel-File (Mitarbeiter.csv) CSV to XML Converter csvtoxml Task Mitarbeiter.csv.xml XSLT (transformation.xsl) im StylusStudio xslt Task mitarb_te.xml XML Import Plugin (TopEase) xmlimport Task TopEase XTE-File 2012, Business-DNA Solutions GmbH 33
Fragen und Antworten customerservice@business-dna.ch Tel. +41 44 308 39 85 2012, Business-DNA Solutions GmbH 34