38
ADF EMG XML Data Control Powerful and Easy ADF Data Control for XML data

ADF EMG XML Data Control, OOW Presentation

Embed Size (px)

DESCRIPTION

Presentation by Wilfred van der Deijl and Richard Olrichs on the ADF EMG XML Data Control.

Citation preview

Page 1: ADF EMG XML Data Control, OOW Presentation

ADF EMGXML Data ControlPowerful and Easy ADF Data Control for XML data

Page 2: ADF EMG XML Data Control, OOW Presentation

About Us

Richard OlrichsMNwww.olrichs.nl@richardolrichs

Wilfred van der DeijlThe Future Groupwww.redheap.com@wilfreddeijl

Page 3: ADF EMG XML Data Control, OOW Presentation

AgendaShort introductionBrief historyAlternatives

Live product demoTheoretical summary of the demo

Page 4: ADF EMG XML Data Control, OOW Presentation

Short Introduction● Goal: An easy way to handle XML in ADF● Any XML element can be runtime data

o XML payload in SOA/BPM Human Tasko SOAP Web Service responseo RESTful XML APIo XML column in databaseo Static fileo and more

Page 5: ADF EMG XML Data Control, OOW Presentation

Short IntroductionADF abstraction through Data Controls

Page 6: ADF EMG XML Data Control, OOW Presentation

Short Introduction● XML Schema is the key● XML DataControl gets its structure from XSD● Runtime XML document can come from

anywhereo Human task payload, Static resource, Web service,

or… wherever you like

Page 7: ADF EMG XML Data Control, OOW Presentation

XML DataControl History● Development started at MN in August 2012● Adopted by Spir-it since March 2014● Open to the public

o ADF EMG sub projecto https://adfxmldc.atlassian.net/wikio Available through Help > Check For Updates

Page 8: ADF EMG XML Data Control, OOW Presentation

AlternativesCalling WebService from ADF

1. ADF WebService DataControl

2. JAX-WS Proxy with Bean DataControl

3. Programmatic Business Components

Page 9: ADF EMG XML Data Control, OOW Presentation

ADF WebService DataControlAlternatives

● Not customizable, for simple web services● Dates and enumerations not supported● Only for simple web services like stock info

or weather info

Page 10: ADF EMG XML Data Control, OOW Presentation

JAX-WS Proxy with Bean DCAlternatives

● Lots of work:o Generate JAX-WS Proxy classeso Domain POJO’so Mapper classes (and back).

● Labor intensive when services change● JAX-WS Proxy cannot be used directly as

bean DataControlo Dates and enumerations not supportedo JAXBElement getters/setters not supported

Page 11: ADF EMG XML Data Control, OOW Presentation

● Lot of work: o JAX-WS Proxyo ViewObjectso EntityObjectso Mappers (and back)

● BC is very database (SQL) centrico Commit, Rollback, Fault-In selects, locking,

connection pooling, etcetera

● Requires extensive coding in ADF BC base classes

Programmatic ADF BCAlternatives

Page 12: ADF EMG XML Data Control, OOW Presentation

ADF EMG

ADF EMG

ADF EMG

Page 13: ADF EMG XML Data Control, OOW Presentation

Demo TimeADF EMG XML DataControl

Page 14: ADF EMG XML Data Control, OOW Presentation

ADF EMG XML DataControl● Minimal effort to setup, yet powerful and

customizable● JDeveloper 11.1.1 and 12.1.3

Page 15: ADF EMG XML Data Control, OOW Presentation

Powerful Providers● Data Provider - Fetch XML Element

● Customization - Supplies customization classes

● Type Mapper - Map XML to Java types

● Structure Provider - Builds DC structure from XSD

Page 16: ADF EMG XML Data Control, OOW Presentation

DataProvider Nesting● Plain DataProviders

o WSDataProvider - Web Serviceo ELDataProvider - Expression Languageo ResourceDataProvider - XML file from classpath

● Nesting DataProviderso Can manipulate dynamic parameters going into the

nested dataprovidero Get XML from nested provider and can manipulate it

before returning it to the caller

Page 17: ADF EMG XML Data Control, OOW Presentation
Page 18: ADF EMG XML Data Control, OOW Presentation

Nesting DataProviders● XSL Transformation● XML Schema Validation● Caching● Multi Nesting

o UnionFilter - Combines result from multiple providerso Build your own...

Page 19: ADF EMG XML Data Control, OOW Presentation

WSDataProviderEmployeeService

<Employee> <Type>MGR</Type> …</Employee>

Page 20: ADF EMG XML Data Control, OOW Presentation

WSDataProviderReferenceDataService

WSDataProviderEmployeeService

<Employee> <Type>MGR</Type> …</Employee>

<EmployeeTypes> <Type> <Code>MGR</Code> <Desc>Manager</Desc> </Type> …</EmployeeTypes>

Page 21: ADF EMG XML Data Control, OOW Presentation

WSDataProviderReferenceDataService

WSDataProviderEmployeeService

UnionFilter

<Employee> <Type>MGR</Type> …</Employee>

<EmployeeTypes> <Type> <Code>MGR</Code> <Desc>Manager</Desc> </Type> …</EmployeeTypes>

<Union> <Employee> … </Employee> <EmployeeTypes> ... </EmployeeTypes></Union>

Page 22: ADF EMG XML Data Control, OOW Presentation

WSDataProviderReferenceDataService

WSDataProviderEmployeeService

UnionFilter

XSLFilter

<Employee> <Type>MGR</Type> …</Employee>

<EmployeeTypes> <Type> <Code>MGR</Code> <Desc>Manager</Desc> </Type> …</EmployeeTypes>

<Employee> <Type>MGR</Type> <TypeDesc>Manager</TypeDesc> …</Employee>

<Union> <Employee> … </Employee> <EmployeeTypes> ... </EmployeeTypes></Union>

Page 23: ADF EMG XML Data Control, OOW Presentation

WSDataProviderReferenceDataService

WSDataProviderEmployeeService

CacheFilter

UnionFilter

XSLFilter

<Employee> <Type>MGR</Type> …</Employee>

<EmployeeTypes> <Type> <Code>MGR</Code> <Desc>Manager</Desc> </Type> …</EmployeeTypes>

<Employee> <Type>MGR</Type> <TypeDesc>Manager</TypeDesc> …</Employee>

<Union> <Employee> … </Employee> <EmployeeTypes> ... </EmployeeTypes></Union>

Page 24: ADF EMG XML Data Control, OOW Presentation

Java Customizers● Java Classes with Annotations● Can alter structure and behavior of

datacontrol elementso Calculated Attributeso Transient Attributeso Attribute Validationo Element Validationo Post Attribute Changeo Post Element Createdo Custom operations/methods

Page 25: ADF EMG XML Data Control, OOW Presentation

Wiki - adfxmldc.atlassian.net/wiki

Page 26: ADF EMG XML Data Control, OOW Presentation

Next StepsDownload from JDev Update Center and follow 5 Minute Getting Started from wiki

Subscribe to ADF EMG:

http://www.adfemg.org

Follow XML DataControl development:

https://adfxmldc.atlassian.net/wiki

Page 27: ADF EMG XML Data Control, OOW Presentation

Questions

Page 28: ADF EMG XML Data Control, OOW Presentation

Demo shots

Page 29: ADF EMG XML Data Control, OOW Presentation

Creating Data Control

Page 30: ADF EMG XML Data Control, OOW Presentation
Page 31: ADF EMG XML Data Control, OOW Presentation
Page 32: ADF EMG XML Data Control, OOW Presentation

Initial Data Controlin 2 minutes

Dynamic Parameter from DataControls.dcx

Page 33: ADF EMG XML Data Control, OOW Presentation

Drag-DropData Control

onto Page

Dynamic Parameter value (typically from EL)

Page 34: ADF EMG XML Data Control, OOW Presentation

Initial Task Flowin 5 minutes

Page 35: ADF EMG XML Data Control, OOW Presentation

Which Data Collection is this customizing ?

Calculated (Read Only) Attribute

Transient (Read Write) Attribute

Attribute Validation

Page 36: ADF EMG XML Data Control, OOW Presentation

Register Customization Class(es) with Data Control

Page 37: ADF EMG XML Data Control, OOW Presentation

Calculated Attribute

Transient Attribute

Page 38: ADF EMG XML Data Control, OOW Presentation

Transient Attribute

Calculated Attribute

Attribute Validation