34
© 2012, Business-DNA Solutions GmbH 1 Data Exchange Data Exchange Data Exchange Data Exchange with with with with

Data Exchange Data Exchange withwith

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 1

Data Exchange Data Exchange Data Exchange Data Exchange withwithwithwith

Page 2: Data Exchange Data Exchange withwith

© 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

Page 3: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 3

1. Introduction2. TopEase Metamodel3. XML Import Setup4. Practice

ScheduleScheduleScheduleSchedule

Page 4: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 4

Introduction

4

Page 5: Data Exchange Data Exchange withwith

© 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)

Page 6: Data Exchange Data Exchange withwith

© 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

Page 7: Data Exchange Data Exchange withwith

© 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

Page 8: Data Exchange Data Exchange withwith

© 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

Page 9: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 9

ExampleExampleExampleExample: : : : BidirectionalBidirectionalBidirectionalBidirectional XML Data ExchangeData ExchangeData ExchangeData Exchange

Page 10: Data Exchange Data Exchange withwith

© 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)

Page 11: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 11

TopEase Metamodel

11

Page 12: Data Exchange Data Exchange withwith

© 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

Page 13: Data Exchange Data Exchange withwith

© 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

Page 14: Data Exchange Data Exchange withwith

© 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

Page 15: Data Exchange Data Exchange withwith

© 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

Page 16: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 16

Schema Inspector PluginSchema Inspector PluginSchema Inspector PluginSchema Inspector Plugin

Page 17: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 17

Schema Schema Schema Schema InspectorInspectorInspectorInspector, , , , how to readhow to readhow to readhow to read

Page 18: Data Exchange Data Exchange withwith

© 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

Page 19: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 19

XML XML XML XML ImporterImporterImporterImporter DocumentsDocumentsDocumentsDocuments

Use«TEXMLInterface.doc»and«AntRunnerPlugin.doc»as Reference.

19

Page 20: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 20

XML Import Setup

20

Page 21: Data Exchange Data Exchange withwith

© 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

Page 22: Data Exchange Data Exchange withwith

© 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

Page 23: Data Exchange Data Exchange withwith

© 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

Page 24: Data Exchange Data Exchange withwith

© 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

Page 25: Data Exchange Data Exchange withwith

© 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

����

Page 26: Data Exchange Data Exchange withwith

© 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

Page 27: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 27

Practice

27

Page 28: Data Exchange Data Exchange withwith

© 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

Page 29: Data Exchange Data Exchange withwith

© 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

Page 30: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 30

Using Stylus StudioUsing Stylus StudioUsing Stylus StudioUsing Stylus Studio

30

Page 31: Data Exchange Data Exchange withwith

© 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

Page 32: Data Exchange Data Exchange withwith

© 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

Page 33: Data Exchange Data Exchange withwith

© 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

Page 34: Data Exchange Data Exchange withwith

© 2012, Business-DNA Solutions GmbH 34

Fragen und AntwortenFragen und AntwortenFragen und AntwortenFragen und Antworten

[email protected]

Tel. +41 44 308 39 85