Professional Documents
Culture Documents
Usiness Bject Lements: H A P T E R
Usiness Bject Lements: H A P T E R
Overview
A business object is a logical view of a maintenance object. This section describes how
to define a business object's elements.
Objectives
By the end of this chapter, you will be able to:
Chapter 4
columns.
Define a business object's elements using an XML schema.
Instructors Notes
The purpose of this exercise is not to come up with an exhaustive list of every
column on every table that isn't used. Rather, it's just to get the students
comfortable with the situation that a BO is not a one-to-one mapping with a MO.
However, to satisfy the request made of the students, here the answer:
- All of the columns on the MO's primary table have elements (this is a coincidence
as a BO can happily contain a subset of the columns on the MO's primary table).
- You'll notice that both elements on the MO's language table are specified (again,
this is not a rule). We'll discuss language tables more in a few slides.
- None of the columns on the following tables are referenced:
- CI_ADJ_TY_ALG
- CI_CHTY_ADJTY
- CI_ADJ_TY_CHAR
Chapter 4
Click the View MO link adjacent to the Maintenance Object field. Doing this will
open the application viewer with the maintenance object's tables displayed in an
ERD.
Context Sensitive Dashboard Zone Listing The MO's Tables and Fields
You could navigate to the Maintenance Object page by clicking the hyperlink
under the MO's description. Once on this page, you'd then need to navigate to the
table page to see its columns.
Use which method you prefer and then prepare a list of every field on the MO's tables
that does NOT have a corresponding element in the business object's schema.
Instructors Notes
The purpose of this is to see the CLOB whose elements exactly match the element
names in the BO schema. Outbound message is one of the few pages where we
show a CLOB and that's why we used this one in the example. It's also kind of easy
to get your head around an email message BO that is related to the outbound
message MO.
Chapter 4
Business Object Main
Chapter 4
Outbound Message - Main
Notice the contents of the XML Source (this is the contents of the CLOB). You'll see the
various elements in the business object along with the element values (as you are now
looking at an instance of this business object).
Prepare a brief explanation describing anything new that you learned about BO schema
definitions and the related instance data.
Read the portion of the Conservation Program blueprint that describes the
conservation programs BO (don't spend time during the exercise looking at the other
BO's, but try to find the time after class to do this)
Prepare a presentation describing the differences between the BO in the
blueprint and what was released
Prepare a list of the top 5 cool things you learned about schema mapping that
were not covered in this section's slides
Instructors Notes
version was added (as usual).
endDate was judged not to be required.
The schema language doesn't support the fkRef to div / SA type as it's a multi-part
key.
The architect forgot to declare the prime keys of the lists.
The developer may have forgotten to set required=true on the ToDo type.
The product code in the schema has a lookup that defines the valid product codes.
Several elements that control when / how statistics are accumulated were added:
hoursBetweenStatisticsUpdate
manualUpdateRequested
manualUpdateRequestUser
manualUpdateRequestDateTime
Review Questions
1. A field is to a table as an element is to a business object. True/False
2. Underline the various types of BO elements (i.e., underline the valid values of the
type= attribute):
field
list
raw
date
datetime
fkref
group
3. The base package is shipped with BO's. True/False
The base package is shipped with a limited number of business objects and an
implementation can add additional business objects.
4. You can set up a BO with elements that are mapped to several MO's. True/False
5. When you add a BO, all business rules embodied in the related MO's service are
executed and therefore you cannot violate the base-package's integrity. True/False
There is no way around this rule. So, if you dont like a base-package business rule,
you're stuck (and we think this is a VERY good thing).
6. An MO field may be optional in the base-package, but required on a BO. True/False
Chapter 4
with a blank / null value in the element. You could use this, for example, to make a
date of birth or SSN required when adding a person.
7. Underline what you need to know to map a BO element to a field on a "child table".
The mapping rules need only be declared on one of the elements, the other
elements can use a rowRef= attribute to reference this element (and inherit its
mapping rules). This reduces errors and simplifies maintenance should you ever
decide to change the mapping rules.
10. The contents of a BO schema on the Business Object - Schema tab will look
identical to the information displayed when you click View Schema on Business
Object - Main. True/False
If the BO includes stand-alone data areas, the View Schema information will show
the included information (and note, data areas can include other data areas ad
infinitum).
11. You should always create an element on your BO's that's mapped to the Version
field. True/False
Trick question - if the BO is used purely to read information, it doesn't need a version
element as there are no concurrency issues. However, if the BO is used to change
or delete a BO, it'd be VERY WISE to include a version element otherwise a user
could overwrite another user's changes without knowing it.
12. A "version" element should have an attribute of private="true". True/False
Remember that private="true" hides an element from the caller and, for concurrency
purposes, the caller must retain the version number of the object when it is read.
13. An elements label always comes from its mdField= attribute. True/False
If an element is defined with an explicit label=attribute its label is the attribute value.
If no explicit label is used and the element is defined with an mdField= attribute the
label is taken from this field. Otherwise, if the element is mapped to a field using
mapField= the label is taken from the mapped field.
14. You must set up a meta-data field before you can map an element to a CLOB.
True/False
However - most elements will appear somewhere on the user interface (that's
typically why you put an element on a BO). For product development, there's a
strong rule that says "If an element can appear on the UI, it must be mapped to a
field in the meta-data using the mdField= attribute".
15. The data stored in a CLOB is a true XML document. True/False
And, we hope that when relational databases are able to index elements in an XML
document, you'll be able to create an index on such an element.
16. Using a BO to access information is always slower than using an MO. True/False
Not necessarily as BO reads are very efficient and only retrieve the data that's
needed.
17. Only a limited number of MO's support CLOBs. True/False
All new MO's in all future releases support CLOB's. However, older MO's have not
necessarily been retrofitted with CLOB columns.
18. Some MO's cannot be updated via a BO. True/False