You are on page 1of 12

Exercises for Lesson 4: BO

Elements
Overview

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 1 of 12 Rev 1
Practices for Lesson 4

Distribution
Job Title*

Ownership
The Job Title [list@YourCompany.com?Subject=Exercises for Lesson 4: BO Elements:
344609932.doc] is responsible for ensuring this document is necessary, reflects actual practice,
and supports corporate policy.

Lesson Overview
A business object is a logical view of a maintenance object. This section describes how to
define a business object's elements.

Lesson Objectives
By the end of this chapter, you will be able to:
Understand how business objects allow both the base-package and implementation
teams create logical views of maintenance objects (and why this is important)
Understand the place and importance of Character Large Object (CLOB) columns.
Define a business object's elements using an XML schema.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 2 of 12 Rev 1
Practice 4-2: Compare A Business Object To Its Maintenance Object

Overview
In this walk through, you'll display a business object and define which columns and tables on its
MO are not referenced.

Tasks
1. Navigate To The Business Object Page
Open the Business Object page (it's on the Admin menu) and display the M1-
ActivityType business object:

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 3 of 12 Rev 1
2. Examine The BO's Schema
Click the View Schema link (adjacent to the BO's description) to examine this BO's
elements:

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 4 of 12 Rev 1
3. Compare The BO's Elements To The MO's Tables and Columns
There are numerous ways to see the associated MO's tables and columns:
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.

The demonstration system has been configured with a context sensitive dashboard
zone that lists all columns on the MO's tables.

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.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 5 of 12 Rev 1
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, if you really want, you can
use business object M1-BreakTaskType which only maps a subset of the columns on the MOs
primary table).
- We'll discuss language tables more in a few slides.
- None of the columns on table M1_TASK_TYPE_CHAR are referenced:

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 6 of 12 Rev 1
Practice 4-2: Examine an Instance Of A BO That Uses A CLOB

Overview
In this walk through, you'll display a business object with elements that are mapped to the
CLOB on its MO's primary table. You will then look at instances of this business object to see
the contents of the CLOB.

Tasks
1. Navigate To The Business Object Page
Open the Business Object page (it's on the Admin menu) and display the F1-
BundleExport business object:

2. Examine The BO's Schema


Click the View Schema link (adjacent to the BO's description) to examine this BO's
elements:

Notice how many of the elements are mapped to the BNDL_DETAIL column. If you
were to open the application viewer and look at this column, you'd see that it is a
CLOB. This means that the vast majority of the elements in this business object do
not reside in classic columns. Rather they are held in an XML document that is
retained in the CLOB field on the MO's primary table.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 7 of 12 Rev 1
3. Examine An Export Bundle
Navigate to Admin E Export Bundle.
When the search opens, click the Refresh bar to display bundle exports.

Select a row with status 'Bundled' to display the respective bundle export and then scroll
down to the Bundle Details:

Notice the contents of the Bundle Details (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).

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 8 of 12 Rev 1
Prepare a brief explanation describing anything new that you learned about BO schema
definitions and the related instance data.

Instructors Notes
The purpose of this is to see the CLOB whose elements exactly match the element names in
the BO schema. Bundle Export is one of the few pages where we show a CLOB and that's why
we used this one in the example.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 9 of 12 Rev 1
Practice 4-4: Compare a Completed BO to the Blueprint Design

Overview
During this walk through we'd like you to use the following:
Admin Business Object (View Schema)
The tips on Admin Business Object
Let's split up into teams. Each team should do the following:
Read the portion of the 21000 MWM Data Model Admin Blueprint that describes
the activity types 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
The BP didnt set the default value for auto dispatch and crew size.
The BP didnt set fkref on todo role.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 10 of 12 Rev 1
Review Questions
1. A field is to a table as an element is to a business object. True/False
True.
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
Field, list, raw, and group
3. The base package is shipped with BO's. True/False
True, 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
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
True. 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
True. If you set up a BO element with a required="true" attribute this BO can't be added 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 name of the child table.
The name of the field on the child table in which the element resides.
The prime-key of the child table.
The name and values of the fields that uniquely identify the row on the child table.
The name of the child table, the name of the field on the child table in which the element
resides, and the name and values of the fields that uniquely identify the row on the child table
8. It's easy to default values into required base-package fields that your implementation
doesn't care about (and hide these fields from end-users). True/False
True. One of the many purposes of the default= attribute.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 11 of 12 Rev 1
9. All elements that reside on the same row on a child table will have the same mapping rules.
True/False
False. 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
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
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
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
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
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
True. 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
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
True. 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
True. These are typically transaction-oriented MO's. You'll learn a technique in the Business
Service chapter that you can use to update these more finicky MO's.

Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Exercises for Lesson 4: BO Elements 344609932.doc


Effective mm/dd/yy Page 12 of 12 Rev 1

You might also like