0% found this document useful (0 votes)
62 views70 pages

WM6681 G06 MSG Modeling

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views70 pages

WM6681 G06 MSG Modeling

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Modeling the data

© Copyright IBM Corporation 2015, 2019


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Unit objectives
• Explain the concepts of message models and how they are used to help
message transformation
• List the parsers that are available for use within IBM App Connect
Enterprise
• Create and modify a DFDL model
• Use importers to create data models
• Choose the appropriate message validation options
• Organize and administer message models
• Reference message models in message flows

Modeling the data © Copyright IBM Corporation 2015, 2019


Key concepts in this unit (1 of 2)
• ACORD Assoc. for Coop. Operations Research and Development
• ANSI American National Standards Institute
• ASM Assembly Language source file
• BCD Binary Code Decimal
• CSV Comma Separated Value
• CWF Custom Wire Format
• DTD Document Type Definition
• EDIFACT Electronic Data Interchange For Administration,
Commerce, & Transport
• HL7 Health Level 7
• IDOC Intermediate Document

Modeling the data © Copyright IBM Corporation 2015, 2019


Key concepts in this unit (2 of 2)
• ISO8583 International Organization for Standardization - finance
• MRM Message Repository Manager
• OGF Open Grid Forum
• PL/I Programming Language 1
• TDS Tag/Delimited String format
• TLOG Transaction Log
• W3C World Wide Web Consortium
• X12 Standards committee chartered by ANSI
• XSDL XML Schema Definition Language

Modeling the data © Copyright IBM Corporation 2015, 2019


Topics
• Message modeling
• Data Format Description Language (DFDL)
• XML message modeling
• Message validation

Modeling the data © Copyright IBM Corporation 2015, 2019


Message modeling

Modeling the data © Copyright IBM Corporation 2015, 2019


Message modeling
• Most messages require a model at run time to parse the message bit
stream from the physical data and serialize to create the physical bit
stream from the model
• Modeling accelerates the development of transformations at design
time in the IBM App Connect Enterprise Toolkit
▪ Provides a source and a target for graphical mappings
▪ Assists when editing transformation programs
• Validation can be used for checking message correctness when parsing
• Provides version control when storing artifacts in a central shared
repository
• Instant documentation for programmers, analysts, and integration
specialists

Modeling the data © Copyright IBM Corporation 2015, 2019


Message model object properties
• Logical model is a format-independent description, similar to default
values
• Physical model
▪ Controls the parsing and the writing of the object
▪ One set of physical properties for the physical format
▪ For the MRM message set, one set of physical properties for each format
(XML, Text, and Binary)

• Documentation does not affect processing

Modeling the data © Copyright IBM Corporation 2015, 2019


IBM App Connect Enterprise message modeling
Domain: DFDL Domain: XMLNSC
COBOL WSDL Adapters Set: Person Defs Set: Person Defs
Type: Person Type:
Format: COBOL1 Format:
C XSD

Importers

IBM DFDL XMLNSC


App Connect Parser Serializer
Enterprise Toolkit IBM App
Connect
Message Enterprise XSD
model server

Message model

XSD
Legend
WSDL
Bitstream
Logical message or
Modeling the data © Copyright IBM Corporation 2015, 2019
Parser types
Parsers understand the format of messages

• Programmatic parsers
▪ Knowledge of the message format is encoded in a program
▪ Each message format needs a new parser program

• Descriptive parsers
▪ Knowledge of the message format is encoded in a model
▪ A general-purpose parser program uses the model when parsing
▪ Model can be used as-is or generated into code

• IBM App Connect Enterprise uses both approaches


▪ XMLNSC, JSON, and BLOB are programmatic parsers
▪ DFDL, MRM, and XMLNSC with an XML schema are model-driven parsers *

Modeling the data © Copyright IBM Corporation 2015, 2019


Model definition files
• Describe the logical structure of the message
• Describe the physical formats of the message bit stream during
transmission
• Can be imported from WSDL, an XML schema, DTD, COBOL, or C (or
hand-edited)
• Contains a message model with messages, elements, types, and so
on
• Can link DFDL schema files
• Based on XML schema standards

Modeling the data © Copyright IBM Corporation 2015, 2019


Message definition importers
• COBOL, C, XML DTD, XML schema, WSDL
• Logical model
▪ Importers create types, elements, and attributes
▪ Message creation is optional
• Physical information
▪ Importers populate selected wire formats
▪ Create more wire formats, such as XML, if necessary
▪ For C or COBOL, you must specify the target environment and the
compiler
▪ Other wire formats are filled with default values and can lead to warnings
for a custom wire format and tagged-delimited
• Use the Message Definition wizard or the mqsicreatemsgdefs
command

Modeling the data © Copyright IBM Corporation 2015, 2019


Specification, model, logical message tree
01 AddressesMsg.
10 HomeAddress. My_Set.xsd
20 Line PIC X(20) OCCURS 2 TIMES.
20 Country PIC X(2).
20 PostalCode PIC X(10). AddressesMsg
10 WorkAddress.
20 Line PIC X(20) OCCURS 2 TIMES.
20 Country PIC X(2).
20 PostalCode PIC X(10).
HomeAddress WorkAddress
Root
Properties G_Address
MessageSet My_Set.xsd
MessageType AddressesMsg
Line Country PostalCode
MQMD
DFDL
HomeAddress xsd:string
Line
Country
PostalCode
WorkAddress
Line
Country
PostalCode
Modeling the data © Copyright IBM Corporation 2015, 2019
Custom wire format (binary or CWF)
• Typical legacy data format
Example: COBOL or C definitions

• Various physical representations


Examples: 4-byte integer, or packed

• Often fixed-length fields, length-encoded or null-delimited

• Variable length and repeating fields


▪ Predefined length or repeat
▪ Dynamic length or repeat counter that is determined by preceding INTEGER
field

• Fixed field order

Modeling the data © Copyright IBM Corporation 2015, 2019


Logical message and CWF format
#*******************#*******************#.#
Mail Point 135******Hursley Park********UKSO21 2JN

complex Type
Address CWF

MinOccurs: 1 Physical type: Fixed Len Str


Element
MaxOccurs: 2 Length count: 20
Line P
Default: # L Padding character *
Type xsd:String h
o
y
g
MinOccurs: 1 s Physical: Fixed Len Str
Element i
MaxOccurs: 1 i Length count: 2
Country Default: # c
c Padding character NUL
Type xsd:String a
a
l
l
MinOccurs: 0 Physical: Fixed Len Str
Element
MaxOccurs: 1 Length count: 10
PostalCode Default: # Padding character SPACE
Type xsd:String

Modeling the data © Copyright IBM Corporation 2015, 2019


Tagged and delimited string format (text or TDS)
• Typical industry standard formats, including SWIFT, EDI, ACORD,
AL3, and TLOG
• Typically text, but can also handle binary data
• Variable length, repeat, and field order
• Structured
• Various data separation techniques
▪ Fixed length, like CWF
▪ Delimited: All elements, or variable-length elements only
Example: CSV (comma-separated values)
▪ Tagged
Delimited Fixed length Encoded length
TAG1:aaa/TAG2:xx/ TAG1aaaTAG2xxx TAG103aaaTAG202xx

▪ Data patterns: Regular expressions, such as [A-Z] or {1,3}

Modeling the data © Copyright IBM Corporation 2015, 2019


Logical message and TDS format

{LINE:Mail Point 135;LINE:Hursley Park;COUNTRY:UK;ZIP:SO21 2JN}

TDS
complexType Group indicator: {
Address Group terminator: }
Tag data separator: :
Element DataElementSeparation: Tagged-Delimited
Line Delimiter: ;
P
Type xsd:String L
h Tag: LINE
o
y
Element g
s
Country i
i Tag: COUNTRY
Type xsd:String c
c
a
a
l
Element l
PostalCode
Tag: ZIP
Type xsd:String

Modeling the data © Copyright IBM Corporation 2015, 2019


Data Format Description
Language (DFDL)

Modeling the data © Copyright IBM Corporation 2015, 2019


Data Format Description Language (DFDL)
• An open standard from the Open Grid Forum (OGF)
• Uses XML technology and concepts
▪ W3C XML Schema subset and type system describe the logical format of the
data
▪ Annotations within the XSD describe the physical representation of the data
▪ XPath notation references fields within the data
• Describes any data format
▪ Textual and binary
▪ Commercial record-oriented
▪ Scientific and numeric
▪ Modern and legacy data
▪ Industry standards
• Supports round-tripping
▪ Read and write data in the described format from the same description

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL data support (1 of 2)
• Text data types such as strings, numbers, zoned decimals, calendars,
and Booleans
• Binary data types such as integers, floats, BCD, packed decimal,
calendars, and Booleans
• Bidirectional text
• Bit data of arbitrary length
• Pattern languages for text, numbers, and calendars
• Ordered, unordered, and floating content
• Default values on parsing and serializing
• Nil values for handling out-of-band data
• XPath 2.0 expression language, including variables to model dynamic
data
• Speculative parsing to resolve choices and optional content
• Fixed and variable arrays

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL data support (2 of 2)
• Hide elements in the data
• Calculate element values
• Validation to XML schema 1.0 rules
• Scoping mechanism to allow common property values to be applied at
multiple points
• User-defined variables in DFDL expressions
• TLOG packed numeric fields
• Delimited binary data
• Fields lengths that come from regular expressions

Modeling the data © Copyright IBM Corporation 2015, 2019


Example: Delimited text data

int=5;float=-7.1E8

ASCII text
Initiator Delimiter
floating point

ASCII text
Initiator
integer

Separators, initiators (tags), and terminators are all


examples of DFDL delimiters

Modeling the data © Copyright IBM Corporation 2015, 2019


Example: DFDL schema
<xs:complexType name="myNumbers">
<xs:sequence>
<xs:annotation>
<xs:appinfo source="http://www.ogf.org/dfdl/v1.0">
<dfdl:sequence separator=";" encoding="ascii"/> ;
</xs:appinfo>
</xs:annotation>
<xs:element name="myInt" type="xs:int">
<xs:annotation>
<xs:appinfo source="http://www.ogf.org/dfdl/v1.0">
<dfdl:element representation="text"
textNumberRep="standard" encoding="ascii"
int=5
lengthKind="delimited" initiator="int=" …/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="myFloat" type="xs:float">
<xs:annotation>
<xs:appinfo source="http://www.ogf.org/dfdl/v1.0">
<dfdl:element representation="text" float=-7.1E8
DFDL textNumberRep="standard" encoding="ascii"
annotation lengthKind="delimited" initiator="float=" …/>
</xs:appinfo>
</xs:annotation>
</xs:element> DFDL
</xs:sequence> properties
</xs:complexType>
Modeling the data © Copyright IBM Corporation 2015, 2019
Example: DFDL schema (short form)
<xs:complexType name="myNumbers">
<xs:sequence dfdl:separator=";" dfdl:encoding="ascii" >
<xs:element name="myInt" type="xs:int"
dfdl:representation="text"
dfdl:textNumberRep="standard" dfdl:encoding="ascii"
dfdl:lengthKind="delimited" dfdl:initiator="int=" … />
<xs:element name="myFloat" type="xs:float"
dfdl:representation="text"
dfdl:textNumberRep="standard" dfdl:encoding="ascii"
dfdl:lengthKind="delimited" dfdl:initiator="float=" … />
</xs:sequence>
</xs:complexType> DFDL
properties

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL support in IBM App Connect Enterprise
• DFDL models (schema files) are stored in IBM App Connect Enterprise
projects
• DFDL domain and the model-driven parser are available in all nodes
• IBM App Connect Enterprise Toolkit has built in tools for creating DFDL
models
▪ DFDL model debugger to test the parsing and serialization of data by using a
model

• DFDL models are deployed to the integration server

Modeling the data © Copyright IBM Corporation 2015, 2019


When should you use DFDL?
• Use DFDL to model:
▪ Binary data from COBOL, C, PL/I*, ASM programs
▪ Text data with delimiters such as CSV
▪ Text industry standards such as SWIFT, HL7, EDIFACT, and X12
▪ Binary industry standards such as ISO8583 and Tlog

• Do not use DFDL to model:


▪ XML data that can use XML parsers and have an XML schema or DTD
▪ JSON that can use JSON parsers
▪ Serialization formats where the wire format is never available to the
consumer and access uses APIs

• Do not use DFDL expressions to implement complex validation rules

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL schema editor
• Use the DFDL schema editor to create, edit, and test DFDL schema
files

• DFDL schema editor is started when you open an existing DFDL


schema file or when you create a DFDL schema file by using the New
Message Model wizard

• With the DFDL schema editor, you can:


▪ Edit DFDL schema files
▪ Populate empty DFDL schema files with DFDL schema objects
▪ Parse the DFDL schema files against sample input data
▪ Serialize a logical instance document against your DFDL schema file

Modeling the data © Copyright IBM Corporation 2015, 2019


Creating a DFDL schema file with the New Message Model wizard

You can use the New Message Model wizard to generate a DFDL
schema file by modeling an existing data file
• Comma-separated value (CSV) data
• Record-oriented data
• Custom text or binary data
• COBOL data structures

Modeling the data © Copyright IBM Corporation 2015, 2019


Creating a DFDL model

1 2

Click Message Model

Alternatively, you can


drop an existing DFDL Selecting CSV text, Record-
schema into an IBM App oriented text, COBOL, C, or Other
Connect Enterprise text or binary builds a DFDL
application schema

Modeling the data © Copyright IBM Corporation 2015, 2019


Wizard options for creating a DFDL model

Select the method that you want to use to create the DFDL model:
•Create a DFDL schema file by using the wizard
•Create an empty DFDL schema file and model the data by using
the DFDL schema editor
•Import or replace the IBM supplied DFDL schema property
defaults for CSV

Modeling the data © Copyright IBM Corporation 2015, 2019


Creating a DFDL model by using guided authoring

Specify record settings, field


settings, encoding code
page options, and global
settings

Generated model

Modeling the data © Copyright IBM Corporation 2015, 2019


Creating a DFDL model by using the editor (1 of 2)

Logical Physical
structure view Properties
view

Modeling the data © Copyright IBM Corporation 2015, 2019


Creating a DFDL model by using the editor (2 of 2)

Detailed
view

DFDL properties
view

Modeling the data © Copyright IBM Corporation 2015, 2019


Created DFDL schemas

User DFDL
schema

Helper DFDL
schema

Options for clearing


and showing properties

Source icon

Reference to helper
DFDL schema

Modeling the data © Copyright IBM Corporation 2015, 2019


Helper DFDL schemas
• DFDL properties do not have built-in defaults, so if an object needs a
property, a value must be supplied
• New Message Model wizard automatically creates a helper DFDL
schema with values that are set for most DFDL properties, and adds it
as an import into the user DFDL schema
▪ Different helper DFDL schema for each type of data such as COBOL or CSV
▪ Helper DFDL schemas are created only one time per IBM App Connect
Enterprise application
▪ Helper DFDL schemas are created as read-only but can be edited by using
the DFDL editor, if required
▪ Helper DFDL schemas must be deployed with user DFDL schema

Modeling the data © Copyright IBM Corporation 2015, 2019


New Message Model wizard example

Configure characteristics of the


schema file (based on the
imported CSV file)

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL schema editor (1 of 3)

After the wizard finishes, a


generic schema is displayed

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL schema editor (2 of 3)

Use this toolbar to add, remove,


and reorder elements

Modify default names, data types,


and other schema properties

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL schema editor (3 of 3)

The right side of the schema editor


shows the DFDL properties of the
selected item

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL schema editor toolbar actions

• Test Parse Model: Runs the parser against a data file with the model
• Test Serialize Model: Runs the serializer against logical instance data
• Hide properties / Show properties: Hides or reveals the element Properties
pane
• Show all sections / hide empty sections: Hides or reveals schema definition
sections that contain no information
• Focus on selected: When Show all sections is selected, the focus is on the
currently selected item
• Show quick outline: Displays a summary outline menu of the DFDL schema
• Create logical instance: Creates a logical instance for the Test Serialize Model

Modeling the data © Copyright IBM Corporation 2015, 2019


Testing the DFDL schema
• Parse a data file by using the model as it is defined at the time
• Test the schema definition on real data, and modify it if needed
• IBM DFDL editor uses parser error markers to highlight errors
Static schema error when a schema is saved
Parser error when test parsing data
Serializer error when test serializing a logical instance

• Click Test Parse Model


 Opens the DFDL Test perspective in the IBM App Connect Enterprise Toolkit
 Specify the input file to use for testing; either a resource that is in the
application, or one from the file system

Modeling the data © Copyright IBM Corporation 2015, 2019


Testing a DFDL model within the editor (1 of 4)

1
Click Test Parse Model 2
to run the parser Select a message

Modeling the data © Copyright IBM Corporation 2015, 2019


Testing a DFDL model within the editor (2 of 4)

3
Click the Run
icon
Sample data

Modeling the data © Copyright IBM Corporation 2015, 2019


Testing a DFDL model within the editor (3 of 4)

Parsed ‘infoset’

Parsed data with the


delimiters highlighted

Modeling the data © Copyright IBM Corporation 2015, 2019


Testing a DFDL model within the editor (4 of 4)

A message indicates when the


test parsing is complete without
errors

Modeling the data © Copyright IBM Corporation 2015, 2019


Test parse logical instance

A logical instance shows


how the file was parsed
into XML that the DFDL
schema generated

Modeling the data © Copyright IBM Corporation 2015, 2019


Test parse failure

If parsing fails, the error


message indicates the
reasons

Parsed file shows delimiters and the


last element that was correctly parsed

Modeling the data © Copyright IBM Corporation 2015, 2019


Debugging a DFDL model test failure

Object in error

Parsed ‘infoset’ up
to the error

The model and the


data are linked

Show Hexadecimal
Parsed up to the representation
data in error

Modeling the data © Copyright IBM Corporation 2015, 2019


Trace console
• Another place to view parse operations is in the DFDL Test - Trace view.
• You use this view to identify any DFDL parsing errors that occurred during
test parsing of sample data, or any DFDL serializing errors that occurred
during test serialization of sample data.

•A fine-grained trace shows details of the


test parsing operations
•Generated for every test run, whether it is
successful or it fails
•Useful for detecting errors in the model

Modeling the data © Copyright IBM Corporation 2015, 2019


Test serialize model

To start the test,


click Run Serializer.

Use the DFDL Test perspective to create sample data from the selected DFDL
message to verify that the DFDL schema is correct for creating output
• Test with the populated DFDL Test - Logical Instance view
• Test with content from a file in the workspace or on the file system

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL points of uncertainty
• DFDL parser is a recursive-descent parser; it uses look-ahead when it
encounters “points of uncertainty,” such as:
▪ A choice
▪ An optional element
▪ A variable array of elements
• Parser attempts to parse data until an object is either “known to exist”
or “known not to exist”
▪ When a parsing error occurs, the parser attempts to suppress the error,
backtrack, and try another alternative
▪ Use a discriminator annotation to assert that an object is “known to exist” to
prevent unnecessary backtracking during parsing
▪ Use an initiator to assert that an object is “known to exist”

Modeling the data © Copyright IBM Corporation 2015, 2019


Assigning the DFDL parser to a message
• IBM App Connect Enterprise uses Root.Properties to determine the
parser and the dictionary for parsing (In) and for serialization (Out)

• Which information is needed?


▪ Message domain
▪ Message

Modeling the data © Copyright IBM Corporation 2015, 2019


DFDL message tree
( ['MQROOT' : 0xd6d218]
(0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0x141d34e8]
(0x03000000:NameValue):MessageSet = 'company.xsd' (CHARACTER)
(0x03000000:NameValue):MessageType = '{}:company_msg' (CHARACTER)
(0x03000000:NameValue):MessageFormat = '' (CHARACTER)
(0x03000000:NameValue):Encoding = 273 (INTEGER)
(0x03000000:NameValue):CodedCharSetId DFDL
= 850 (INTEGER) schema and the
DFDL domain
.... message name
)
(0x01000000:Name):DFDL = ( ['dfdl' : 0xd812c8]
(0x01000000:Name):company_msg = (
Message name in
the tree
(0x01000000:Name):header = (
(0x03000000:NameValue):company = 'IBM' (CHARACTER)
)
(0x01000000:Name):employee = (
(0x03000000:NameValue):name = 'Steve Hanson' (CHARACTER)
(0x03000000:NameValue):age = 47 (INTEGER)
(0x03000000:NameValue):dept = 12345 (INTEGER)
(0x03000000:NameValue):contract = FALSE (BOOLEAN)
(0x03000000:NameValue):start = '1988-10-30 09:00:00' (TIMESTAMP)
)
) Compact ‘Name/Value’ Data types from the
) syntax elements DFDL schema
)
Modeling the data © Copyright IBM Corporation 2015, 2019
Getting started with DFDL
• DFDL home page:
http://www.ogf.org/dfdl/,

• DFDL 1.0 specification:


http://www.ogf.org/documents/GFD.174.pdf,

• DFDL schemas on GitHub


https://github.com/DFDLSchemas,

• IBM developerWorks: Get Started with Data Format Description


Language
http://www.ibm.com/developerworks/library/se-dfdl/,

Modeling the data © Copyright IBM Corporation 2015, 2019


XML message modeling

Modeling the data © Copyright IBM Corporation 2015, 2019


Creating an XML message model

2
Select SOAP XML or
Click Message Model to Other XML
create an IBM App Connect
Enterprise library or to
include a model in an
application

Or drop an existing XML


schema into an IBM App
Connect Enterprise
application

Modeling the data © Copyright IBM Corporation 2015, 2019


Parsing XML data
• In most cases, use the XMLNSC parser
▪ Fast memory-saving parser
▪ Builds a compact message tree with options to preserve the white space
▪ Supports opaque parsing where an opaque element (an element in a
message that a message flow never references) and its subtree are parsed
as a single string; reduces parse time
▪ Can operate both as a programmatic and a model-driven parser
▪ An XML schema is created from the message set and deployed to the
integration node
▪ Optional validation compliant with the XML schema V1.0 specification
• Use MRM only with the wire format XML for non-XML data that is
parsed by MRM CWF or TDS, which is rendered as XML with no further
transformation
• Use XMLNS only if the message tree must conform as closely as
possible to the XML data model (for example, by using certain XPath
expressions), or to preserve the inline DTDs

Modeling the data © Copyright IBM Corporation 2015, 2019


Configuring nodes for an XMLNSC parser (1 of 2)

Select the XMLNSC domain


and the message set on the
Input Message Parsing tab

Enable validation to parse and


validate against the XML
schema in the Validation tab

Modeling the data © Copyright IBM Corporation 2015, 2019


Configuring nodes for an XMLNSC parser (2 of 2)

If validating, use the


option to build a tree
with the correct data
types

If not validating, use


the option to parse the
named elements
opaquely

Modeling the data © Copyright IBM Corporation 2015, 2019


Message validation

Modeling the data © Copyright IBM Corporation 2015, 2019


Message validation
• What can be validated?
▪ Runtime data is validated against a dictionary or an XML schema
▪ Content: Cardinality, complex type content, composition, and data type
▪ Value: Data fields conform to the value constraints in a message model

• When does validation occur?


▪ Validate an incoming message in the XXinput node
▪ Validate a constructed output message in the XXoutput node
▪ Validate immediately or request validation when a message is converted to a
bitstream

• Failure action choices


▪ Throw an Exception on the first validation failure and stop validation
▪ Log all validation failures in the ExceptionList and throw an Exception after
completion of a parse or a write operation
▪ Log all validation failures in Usertrace or LocalErrorLog and continue

Modeling the data © Copyright IBM Corporation 2015, 2019


Parse timing option on input nodes
• Parsing is an expensive operation
• On demand (default):
▪ When a field is first referred in ESQL
▪ Only up to this field
▪ Debugger or Trace node (${Body}) forces parsing of the entire body
• Complete: Validate everything
• Immediate: Validate CHOICE and nested messages later

MQMD MQRFH2 Application Data F1

Parsed in MQInput Filter: Body.F1=3


Modeling the data © Copyright IBM Corporation 2015, 2019
Parsing and validation

On demand or complete
parsing

Validation

Modeling the data © Copyright IBM Corporation 2015, 2019


Default and fixed values for elements
• Logical property of an element
• IBM App Connect Enterprise applies default or fixed values only when
necessary to create a parsable bit stream
▪ For CWF and TDS fixed-length output messages
▪ Can lead to unexpected validation errors for missing elements in other
formats, even though they have default or fixed values
• ESQL can be used to provide default values
• Or use ResetContentDescriptor node to serialize data by using
properties and then reparse by using the message domain that is
supplied in node properties

Modeling the data © Copyright IBM Corporation 2015, 2019


Organizing message models
Shared Library
Application

Message model
.xsd files

• App Connect Enterprise provides runtime isolation so that the


visibility of a resource is restricted to the application in which it is
contained
• Use applications to ensure that updates to one group of deployed
resources do not affect another group
• Consider the use of shared libraries to share message models
across multiple teams, projects, or integration nodes

Modeling the data © Copyright IBM Corporation 2015, 2019


Unit summary
• Explain the concepts of message models and how they are used to help
message transformation
• List the parsers that are available for use within IBM App Connect
Enterprise
• Create and modify a DFDL model
• Use importers to create data models
• Choose the appropriate message validation options
• Organize and administer message models
• Reference message models in message flows

Modeling the data © Copyright IBM Corporation 2015, 2019


Review questions
1. True or false:
When building a new message model, selecting CSV text
builds a DFDL schema.

2. True or false:
When writing a message, the DFDL parser generates a
DFDL formatted bit stream from a DFDL domain logical
message tree.

Modeling the data © Copyright IBM Corporation 2015, 2019


Review answers
1. True When building a new message model, selecting CSV
text, Record-oriented text, COBOL, C, or Other text or binary
builds a DFDL schema.

2. False The DFDL serializer generates a DFDL formatted bit


stream.

Modeling the data © Copyright IBM Corporation 2015, 2019


Exercise 5: Creating a DFDL
model

Modeling the data © Copyright IBM Corporation 2015, 2019


Exercise introduction
• Create a DFDL message model schema file in a shared library
• Define the logical structure and physical properties of the message
model elements
• Test a DFDL schema by parsing test input data
• Test a DFDL schema by serializing test data to create an output file

Modeling the data © Copyright IBM Corporation 2015, 2019

You might also like