Академический Документы
Профессиональный Документы
Культура Документы
Business Objects
Person
Person
Name
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Individual Taxpayer
Busines
s
Objects
Legal name
ID (e.g. drivers license)
Commercial Customer
Birth date
Name
Spouse
Tax ID
Number of dependents
Daytime phone Primary SIC code
Evening phone Accounting phone nbr
Service phone nbr
Mailing address
Mailing address
Credit issues address
4-4
An Apology
We've just described some of the many benefits of
business objects
Before we can describe how to take advantage of these
benefits, we have to describe how to configure business
objects
This discussion is long and deals with abstract concepts
We ask you to be patient as you'll soon learn how to "reap
the rewards"
4-5
Business Objects
Person
Person
Name
Person Id
Individual Taxpayer BO
Individual
Taxpayer ID
Name
E-mail
SSN
Home Phone
Date of Birth
Dependents
4-7
Person
Char
Person
Phone
Corporation BO
Corporate
Taxpayer ID
Corporate Name
Employer ID
Main Phone
Date of Incorporation
Corporate Officers
Individual Taxpayer
Individual Taxpayer elements
Taxpayer ID
Name
E-mail
SSN
Home Phone
Date of Birth
Dependents
4-8
Corporation
Corporate Taxpayer elements
Taxpayer ID
Corporate Name
Employer ID
Main Phone
Date of Incorporation
Corporate Officers
Individual Taxpayer
Person ID
123
Brazil_Mark@yahoo.com
Names (CI_PER_NAME)
Elements
Taxpayer ID
E-mail
Name (Name)
Name
E-mail
SSN (ID)
Home Phone (Phone)
Work Phone (Phone)
Work Extension
Phone Ext. (Phone)
Date of Birth (Char)
Type
Name
Primary
Brazil, Mark
Ids (CI_PER_ID)
Type
ID Number
SSN
777
Phones (CI_PER_PHONE)
Type
Phone Number
Home
973-777-7777
Work
973-451-7777
Ext
111
Characteristics (CI_PER_CHAR)
4-9
Type
Value
DOB
1961-11-15
Business Objects
MO
Individual
Partnership
Sole Proprietorship
Business
Object
MO
Corporation
Premise MO
Single family
4 - 11
Apartment
Business
Object
Multi-apartment building
MO
Base-package data
Implementation data
Individual
Partnership
These have an
owner flag of C1
Business
Object
4 - 12
These have an
owner flag of CM
Business
Object
Sole Proprietorship
Corporation
Table
Service
MO / Table
Table / Field
Primary
Child
Field
The fields linked to the MOs Tables
are the physical fields on the
database
4 - 13
XML Doc
Technical Execution
At a high-level, heres how a call to add a BO is
implemented on the server
1
Add new individual taxpayer BO
taxpayerId = null
name = Mark, Brazil
email = abc@yahoo.con
ssn = 1234567
homePhone = 973-451-7777
birthDate = 1970-01-01
Individual
Taxpayer BO
Map Individual
Taxpayer BO XML to
Person MO XML
Person MO
Map Person XML back to
Individual Taxpayer XML
4
Add
6
Individual taxpayer added
taxpayerId = 9999129912
name = Mark, Brazil
email = abc@yahoo.con
ssn = 1234567
homePhone = 973-451-7777
birthDate = 1970-01-01
4 - 14
3
Validate
All business rules applied
Database
Business Objects
Business
Object
<taxpayerId />
<name />
<email />
<socialSecurityNumber />
<homePhone />
<birthDate />
4 - 16
Table
MO / Table
Business
Object
Field
Table / Field
IndividualTaxpayer Schema
<taxpayerId />
<name />
<email />
<socialSecurityNumber />
<homePhone />
<birthDate />
4 - 17
4 - 18
Person
Person
Name
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
4 - 19
Person
Person
Name
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
4 - 20
4 - 21
4 - 22
Business Objects
Flattening Elements
<taxpayerId mapField="PER_ID"/>
<name mapField="ENTITY_NAME">
<row mapChild="CI_PER_NAME">
Person
Person
<PRIM_NAME_SW is="true"/>
Char
<NAME_TYPE_FLG default="PRIM"/>
</row>
Person
Person
</name>
Name
Person Id
Phone
<email mapField="EMAILID"/>
<socialSecurityNumber mapField="PER_ID_NBR">
<row mapChild="CI_PER_ID">
Phone Type Char Type
Id Type
<ID_TYPE_CD is="SSN"/>
</row>
<socialSecurityNumber/>
mapField= identifies the column
<homePhone mapField="PHONE" >
where the elements value resides
<row mapChild="CI_PER_PHONE">
<PHONE_TYPE_CD is="HOME" />
The row node defines the child tables name (mapChild=)
</row>
</homePhone>
...
And finally, you must identify the row's identifying column(s) and value(s)
4 - 24
Person
Person
Name
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Business Objects
Person
Person
Name
Person Id
Person
Phone
Id Type
Phone Type
4 - 27
Person
Char
Char Type
Business Objects
If an element resides in an "edated" table, you must decide if you care about changes over time
If you dont care (i.e., you dont want different rows created when the elements value changes)
IndividualTaxpayer Schema
...
<riskCategory mapField="ADHOC_CHAR_VAL" >
<row mapChild="CI_PER_CHAR">
<CHAR_TYPE_CD is="RISKCAT" />
<EFFDT default="%CurrentDate" />
</row>
</riskCategory>
...
Person
Person
Name
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Person
Person
Name
Notice that mapField= references the column that holds the effective
date; also notice the rowRef= references the effective-dated element
4 - 30
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Business Objects
4 - 32
Phone
Type
Language
Language
Business Objects
dataType=
If you want the system to validate that an elements value
holds a specific type of data, use dataType=
Use the "tips" to see all of the valid dataTypes
Note: dataType="lookup" / lookup= can be used to define valid
values for an element in a lookup value
IndividualTaxpayer Schema
...
<birthDate mapField="ADHOC_CHAR_VAL"
dataType="date">
<row mapChild="CI_PER_CHAR">
<CHAR_TYPE_CD is="BIRTHDT" />
<EFFDT default="%CurrentDate" />
</row>
</birthDate>
...
4 - 34
Person
Person
Name
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
dataType= vs mdField=
Rather than use dataType=, you can use mdField= and reference the
meta-data field whose format controls how the fields value is
validated
4 - 35
IndividualTaxpayer Schema
...
<birthDate mapField="ADHOC_CHAR_VAL"
dataType="date">
<row mapChild="CI_PER_CHAR">
<CHAR_TYPE_CD is="BIRTHDT" />
<EFFDT default="%CurrentDate" />
</row>
</birthDate>
...
IndividualTaxpayer Schema
...
<birthDate mapField="ADHOC_CHAR_VAL"
mdField="BIRTH_DT">
...
</birthDate>
...
fkRef=
If you want the system to validate that an elements value holds a
foreign key, use fkRef=
The attributes value must reference a "FK reference code" (a FK reference
is meta-data that describes a foreign key)
IndividualTaxpayer Schema
...
<primaryContract mapField="CHAR_VAL_FK1" fkRef="SA" >
<row mapChild="CI_PER_CHAR">
<CHAR_TYPE_CD is="PRIMCON" />
<EFFDT default="%CurrentDate" />
</row>
</propertyManager>
...
Person MO
Person
Name
4 - 36
Person
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
4 - 37
required="true"
If you want the system to validate that an element is
present and non-blank, use required="true"
IndividualTaxpayer Schema
...
<birthDate mapField="ADHOC_CHAR_VAL"
dataType="date" required="true" >
<row mapChild="CI_PER_CHAR">
<CHAR_TYPE_CD is="BIRTHDT" />
<EFFDT default="%CurrentDate" />
</row>
</birthDate>
...
Person
Person
Name
4 - 38
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Defaulting
On the earlier flattening slides, you saw how you can
default the values of related columns on a flattened
element's row using is= and default=
This will default the value of customerType on
an add and update (i.e., it can't be blanked out)
IndividualTaxpayer Schema
...
<birthDate mapField="ADHOC_CHAR_VAL"
dataType="date" >
<row mapChild="CI_PER_CHAR">
<CHAR_TYPE_CD is="BIRTHDT" />
<EFFDT default="%CurrentDate" />
</row>
</birthDate>
...
4 - 39
ResidentialAccount Schema
...
<customerType mapField="CUST_CLASS_CD"
required="true" default="R" />
<mngGroup mapField="ACCT_MGMT_GRP_CD"
default="ALL" />
...
4 - 40
Business Objects
Groups of Elements
The elements encountered up to now are classic "fields" and dont
require you to declare their type (type=field is the default)
You can declare other types of elements, well first describe
type=group
Groups allow you to document
groups of other elements
Notice the type= attribute, also notice
IndividualTaxpayer Schema
how this element is not mapped
...
<homeAddress type="group">
<country mapField="COUNTRY" default="USA"/>
<address1 mapField="ADDRESS1"/>
Besides elegance, the other reason (that
<address2 mapField="ADDRESS2"/>
youll discover later) is that you can move
<city mapField="CITY"/>
a group to a similar group in a single
<postal mapField="POSTAL"/>
<state mapField="STATE"/>
statement (i.e., you can do a "move by
<homeAddress />
name" from one group to another)
...
4 - 42
Lists = Array
You can also declare arrays of elements (and arrays within
arrays) using type=list
An element where type=List declares
the structure of an array (this
example is for an array of seasonal
addresses)
IndividualTaxpayer Schema
...
<seasonalAddress type="list"
mapChild="CI_PER_ADDR_SEAS">
<country mapField="COUNTRY" default="USA"/>
<address1 mapField="ADDRESS1"/>
<address2 mapField="ADDERSS2"/>
<city mapField="CITY"/>
<postal mapField="POSTAL"/>
<state mapField="STATE"/>
<seasonStart mapfield="SEASON_START_MMDD"/>
<seasonEnd mapfield="SEASON_END_MMDD"/>
<sequence mapfield="SEQ_NUM"/>
<seasonalAddress />
...
4 - 43
Business Objects
Naming Conventions
BO Naming Convention
For example:
F1-Country
C1-CustomerContact
A2-Message121
4 - 45
customerName
postalCode
accountId
saId
Words like 'code', 'switch', or 'flag', are generally not appropriate as suffixes
for an element name
The following is not a naming convention, but it bears repeating - every
element that can appear on a UI must have some type of mapping to a metadata field (either via mapField= or mdField=), no exceptions
Without this, we don't have a translatable label for this field and this is a requirement
for base-package deliverables
4 - 46
4 - 47
F1-emailMsg Schema
...
<OutboundMsgStatFlg mapField="OUTMSG_STATUS_FLG"/>
<CreationDttm dataType="dateTime" mapField="CRE_DTTM"/>
<EmailDocument type="group" mapXML="XML_SOURCE">
<From type="group">
<InternetAddress type="group">
<address mdField="EMAILID"/>
<personal dataType="string"/>
<charset dataType="string"/>
</InternetAddress>
</From>
<To type="list">
<InternetAddress type="group">
<address mdField="EMAILID" isPrimeKey="true"/>
<personal dataType="string"/>
<charset dataType="string"/>
</InternetAddress>
</To>
<Subject type="group">
<text dataType="string"/>
<charset dataType="string"/>
</Subject>
...
Business Objects
Person
Person
Name
4 - 49
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Business Objects
<taxpayerId mapField="PER_ID"/>
<name mapField="ENTITY_NAME">
<row mapChild="CI_PER_NAME">
<PRIM_NAME_SW is="true"/>
<NAME_TYPE_FLG default="PRIM"/>
</row>
</name>
<email mapField="EMAILID"/>
...
<perBusFlag mapfield="PER_OR_BUS_FLG"
default="P" private="true" />
...
Person
Person
Name
4 - 51
Person
Char
Person Id
Person
Phone
Id Type
Phone Type
Char Type
Business Objects
Mapping Elements To
Character Large Object (CLOB) Columns
Person
CLOB
4 - 53
You'll find that CLOBs support all of the element structures that you've
learned up to now
This means that if the physical tables don't have a place to store your
elements, you can put them in a CLOB
But you can only do this for MO's that have CLOBs
4 - 54
Inbound
Message
CLOB
4 - 55
...
<messageTypeCode mapXML="BO_DEFN_AREA" />
<versionNumber mapXML="BO_DEFN_AREA" />
<marketTimeStamp mapXML="BO_DEFN_AREA" />
<senderID mapXML="BO_DEFN_AREA" />
<recipientID mapXML="BO_DEFN_AREA" />
<txRefNbr mapXML="BO_DEFN_AREA" />
...
Inbound
Message
CLOB
<messageTypeCode>AA-101</messageTypeCode>
<versionNumber>123</versionNumber>
...
4 - 56
4 - 57
CLOB vs Characteristics
The rule - if you need to "join" to an element value, it needs
to reside in a real column
A Snippit Of A Market Message Schema
Inbound
Message
CLOB
Char Type
Charact.
4 - 58
...
<messageType mapXML="BO_DEFN_AREA" />
<versionNumber mapXML="BO_DEFN_AREA" />
<marketTimeStamp mapXML="BO_DEFN_AREA" />
<senderId mapXML="BO_DEFN_AREA" />
<recipientId mapXML="BO_DEFN_AREA" />
<taxReferenceNumber mapXML="BO_DEFN_AREA" />
<receiveDate mapXML="BO_DEFN_AREA" dataType="date" />
<serviceAgreementId mapField="FK_CHAR_VAL" >
<row mapChild="CI_CASE_CHAR">
<CHAR_TYPE_CD is="SA ID" />
</row>
</serviceAgreementId>
...
Business Objects
Groups of Elements
Groups and lists can be held in a CLOB
We'll first show a type="group":
A Snippet Of A Market Message Schema
...
<messageHeader type="group" mapXML="BO_DEFN_AREA" >
<messageTypeCode required="true" />
<versionNumber required="true" />
<marketTimeStamp required="true" />
<senderID required="true" />
<recipientID required="true" />
<txRefNbr required="true" />
</messageHeader>
4 - 60
...
<messageHeader type="group" mapXML="BO_DEFN_AREA">
<messageTypeCode mdField="MSG_TYPE_CD"/>
<versionNumber />
<marketTimeStamp dataType="dateTime"/>
<senderID />
<recipientID />
<txRefNbr />
</messageHeader>
...
<messageHeader>
<messageTypeCode>ASDF</messageTypeCode>
<versionNumber>123</versionNumber>
...
</messageHeader>
4 - 61
Inbound
Message
CLOB
Inbound
Message
CLOB
...
4 - 62
Lists = Array
You can also declare arrays of elements (and arrays within
arrays) using type="list"
An element where type="list"
IndividualTaxpayer Schema
...
<seasonalAddress type="list"
<country default="USA"/>
<address1 />
<address2 />
<city />
<postal />
<state />
<seasonStart />
<seasonEnd />
<sequence />
<seasonalAddress />
...
4 - 63
4 - 64
4 - 65
Business Objects
Foreshadowing
You can create elements that reside in a CLOB using
type="raw"
These elements are created when you need to save XML
documents within an XML document
For example, in a market message world, we frequently
need to save the message that was sent into the system in
the exact format in which it was received
To do this, you can create a raw element called something
like originalMessage and define it as type="raw"
There are other more interesting examples of raw
elements that will be described much later in the class
4 - 67
Business Objects
4 - 69
<formType mapField="CASE_TYPE_CD"
default="1040a.07" />
<includeDA name="StandardTaxpayerElements"/>
<1040page1 type="group" mapXML="BO_DEFN_AREA">
<line1 dataType="number"/>
<line2 dataType="number"/>
<1040page1/>
Form1040ez BO Schema
<formType mapField="CASE_TYPE_CD"
default="1040ez.07" />
<includeDA name="StandardTaxpayerElements"/>
<1040ezpage1 type="group" mapXML="BO_DEFN_AREA">
<line1 dataType="number"/>
<line2 dataType="number"/>
<1040ezpage1/>
<formType mapField="CASE_TYPE_CD"
default="1040a.07" />
<includeDA name="StandardTaxpayerElements"/>
<1040page1 type="group" mapXML="BO_DEFN_AREA">
<line1 dataType="number"/>
<line2 dataType="number"/>
<1040page1/>
Form1040ez BO Schema
<formType mapField="CASE_TYPE_CD"
default="1040ez.07" />
<includeDA name="StandardTaxpayerElements"/>
<1040ezpage1 type="group" mapXML="BO_DEFN_AREA">
<line1 dataType="number"/>
<line2 dataType="number"/>
<1040ezpage1/>
4 - 70
4 - 71
4 - 72
Business Objects
Performance
4 - 74
Business Objects
XAI
4 - 76
Business Objects
Summary
4 - 78
4 - 79
Review Questions
4 - 80
4 - 81