You are on page 1of 79

17

BPA Scripts

Copyright 2009, Oracle. All rights reserved.

You've Been Using Many BPA Scripts


BPA scripts are used in many parts of the UI to guide a
user through business processes
For example, in this last section, you were shown a UI
map that had buttons on it; clicking a button kicks off a
BPA script to guide the user through the respective
business process

Clicking the Edit button will start


a BPA script that guides the user
through editing the BO being
displayed in the map

17 - 2

Copyright 2009, Oracle. All rights reserved.

A Different Type of Script


Up to now, you've been creating plug-in scripts and service scripts to
develop server-based business rules and functions

These types of scripts run on the application server (this is why we


sometimes use the term "server script" to refer to both types of scripts)

During this section, we'll expose you to business process assistant


(BPA) scripts

These types of scripts run on the client's browser

NO CLIENT SOFTWARE IS INSTALLED, these scripts are executed in the


client's browser

All 3 types of scripts are defined


using the Script transaction that
you've been using (BPA scripts
just have different types of
steps)

BPA

17 - 3

Script

Plug-In

Service

Copyright 2009, Oracle. All rights reserved.

UI-Oriented Scripts
BPA scripts help users work through business processes
They typically ask users to enter information and then
invoke a server-based service to update the database
For example, you can develop BPA scripts to help users:

17 - 4

Add a new person to an existing account


Set up a customer to pay automatically
Modify a customer who no longer wants to receive marketing
information
Modify a customers web password
Record a complaint
Merge two accounts into one account
(the list is only limited by your time and imagination)

Copyright 2009, Oracle. All rights reserved.

17
Invoking BPA Scripts

Copyright 2009, Oracle. All rights reserved.

The BPA Menu Has Two Functions


In the last exercise you executed a BPA script by selecting an item
from the Administration menu
There are many other ways to initiate a BPA script, one is to use the
BPA menu
The BPA menu can be invoked by clicking the wizard's hat

The BPA menu has two functions:


1. The top part of the menu contains the
users favorite scripts

2. The bottom part of the menu contains


scripts that satisfy the users search criteria
You close the menu by:
- Selecting a script
- Pressing Esc (this is how all menus work)

17 - 6

Copyright 2009, Oracle. All rights reserved.

A Users Favorite Scripts


A user defines their favorite scripts in their user preferences
A hot key combination - Ctrl+Shift+a number - can be used to
execute one of the first 9 scripts without opening the script menu
(this is why numbers suffix the first 9 favorite scripts in the script
menu)
User

Favorite
Scripts

Script

17 - 7

Copyright 2009, Oracle. All rights reserved.

A Users Favorite Scripts Can Be Dictated


To achieve consistency throughout a user community, you can define
favorite scripts on a template user
You can then link this template user to real users
The template users favorite scripts become the real users favorite
scripts
The template user whose favorite
transactions AND scripts are dictated
to the linked users

User

Favorite
Scripts

Script

17 - 8

Copyright 2009, Oracle. All rights reserved.

Version 2 Implications
With the advent of version 2, the need to use the BPA menu to invoke
scripts is greatly reduced
This is because version 2 allows designers to place HL's and icons
that execute BPA scripts in more easily accessible places on the UI:

A menu item can invoke a BPA script (you just did this)
A context menu item can invoke a BPA script
An entry in the Favorite Links dashboard zone can invoke a BPA script
A hyperlink in an explorer zone can invoke a BPA script
A zone header can contain a hyperlink that invokes a BPA script
Buttons on display-only UI maps can invoke BPA scripts
Context sensitive zones can contains buttons and hyperlinks to invoke
BPA scripts
Selecting a To Do entry can kick off a BPA script
Etc.

17 - 9

Copyright 2009, Oracle. All rights reserved.

17
The BPA Area

Copyright 2009, Oracle. All rights reserved.

Earlier, We Said The Following

The action bar contains buttons that allow you to update the
database and navigate to transactions

These 4 elements
Area
appear onDisplay
every
page

The menu bar allows you to


Object
navigate to other pages

This area contains the portal /The


maintenance
objectzones
dashboard contains
(note, the Dashboard can
be
turned
off
allow you to perform common
/ query
that youvethat
requested
by setting up user preferences
tasks and navigate to other
accordingly (or by clicking its "bar"))
transactions

The status bar contains informational messages


about what the system just did

17 - 11

Copyright 2009, Oracle. All rights reserved.

There's One More Area - The BPA Area

When a BPA script executes, it can open an area on top of the


Object Display Area where it can display and capture information;
we refer to this as the BPA area
This area is rarely used in modern BPA scripts except for debugging and
displaying termination errors

Object Display Area

17 - 12

Copyright 2009, Oracle. All rights reserved.

17

Refresher: Declaring Data Areas for BPA Scripts

Copyright 2009, Oracle. All rights reserved.

BPA Scripts Defining Data Areas


Just like server scripts, BPA scripts need to have their data areas declared
It's the superset of these data areas that form the XML document whose data
can be manipulated by the script

UI Map
Service
Script

Script
(BPA)
Data Area

For example, if your script is going to


interact with a BO or service script, you
just have to reference the object's data
area (i.e., you don't have to redundantly
declare the data area in the BPA script)

17 - 14

BO
Standalone
Business
Service

Copyright 2009, Oracle. All rights reserved.

Remember, UI
maps have
schemas just like
everything else that
appears below

Naming Data Areas


You define a logical name for each data area so that you
can reference multiple instances of the same object
Human BO Schema
<taxpayerId mapField="PER_ID"/>

Script
(BPA)

This scripts data area can


reference 4 instances of
the same BO

Data Area

Taxpayer
Spouse
Depend1
Depend2

17 - 15

BO

BO: Human
BO: Human
BO: Human
BO: Human

<name mapField=ENTITY_NAME>
<row mapChild=CI_PER_NAME">
<PRIM_NAME_SW is="Y"/>
<NAME_TYPE_FLG default="Primary"/>
</row>
</name>
<email mapField=EMAILID"/>
<socialSecurityNumber mapField="PER_ID_NBR">
<row mapChild=CI_PER_ID">
<ID_TYPE_CD is="SSN"/>
</row>
<socialSecurityNumber/>
<homePhone mapField="PHONE" >
<row mapChild="CI_PER_PHONE">
<PHONE_TYPE_CD is="HOME" />
</row>
</homePhone>

Copyright 2009, Oracle. All rights reserved.

Same Thing
You could achieve the same thing by referencing a single
service script whose schema is configured accordingly
And this is, by far, the preferred approach as a single service call
from the client to the server is always better than 4 service calls
Family Service Script Schema

Script
(BPA)

Data Area

<Taxpayer type=group>
<includeBO name=Human"/>
<Taxpayer/>

Service
Script

<Spouse type=group>
<includeBO name=Human"/>
<Spouse/>
<Depend1 type=group>
<includeBO name=Human"/>
<Depend1/>

Family SS: Human

17 - 16

<Depend2 type=group>
<includeBO name=Human"/>
<Depend2/>

Copyright 2009, Oracle. All rights reserved.

17

BPA Step Types


(Some You Know, Some Are New)

Copyright 2009, Oracle. All rights reserved.

Refresher: Scripts Are Constructed Of Steps


You'll recognize some step types
from server scripts

These are shown in gray

The remainder fit into 3 categories:

Still available, but rarely used

Script

Scripts have undergone an evolution


with the advent of V2 and some step
types are rarely used

Step

Step Type

Control the UI
Structured programming techniques

In other words, you just have to learn


7 new step types to write BPA scripts
(the red and the green)

17 - 18

Copyright 2009, Oracle. All rights reserved.

Valid Values:
Move data
Conditional branch
Label
Go to a step
Edit data
Invoke business object
Invoke business service
Invoke service script
Terminate
Prompt user
Input data
Set focus to a field
Mathematical operation
Invoke function
Invoke map
Height
Navigate to a page
Press a button
Display text
Perform script
Transfer control

Edit Data Recap


All logic supported by the server-based scripts can be defined in a
BPA's edit data steps (e.g., invokeBO, goto, branch, terminate, etc.)
Just like server-based scripts, you can use For and If statements
In addition, the following BPA-only step types can be referenced:

Transfer control
Perform script
Invoke map
Navigate to a page

You can also use Xpath, but you are limited to the XPath 1.0 language
as most browsers have not adopted 2.0 yet

10 steps or 1 edit data step; the choice is yours


17 - 19

Copyright 2009, Oracle. All rights reserved.

Height Steps
Height steps allow you to change the height
of the BPA area to be larger or smaller than
the standard size
You can also specify a height of 0 to hide
the BPA area
Most of our scripts don't use the BPA area
and therefore the first step is frequently a
Height of zero
Remember, if you want to display data
during debugging, set the Height to
something other than zero (15% is a
standard height)
Or just leave out the height step (but then you'd
have to add it before "production")
17 - 20

Copyright 2009, Oracle. All rights reserved.

Script

Step

Height Unit
Valid Values:
Pixels
Percentage

Display Text Steps


A Display text step displays text and/or field values in the
BPA area
This is typically used during debugging to display the
contents of XML groups / elements
It's also used to show error messages associated with
abnormal terminations
Remember to use a Height step to set it to something > 0
otherwise your text won't be seen
You can use the %++% syntax to display
all elements in a group from the script's XML
document in the BPA area (make sure the
height is something other than 0%!)

17 - 21

Copyright 2009, Oracle. All rights reserved.

Navigate To A Page Steps


Use a Navigate to a page step to transfer to a portal or
maintenance transaction
These steps reference a navigation option; the navigation
option defines the target transaction (and a few other
things)
Script

Step

Remember, when you create a portal, the


system creates a navigation option for you;
you should rarely need to create new
navigation options

Navigation
Option

17 - 22

Copyright 2009, Oracle. All rights reserved.

Invoke Map Steps


An Invoke map step is used to display a UI map to capture
input from the user
The map can be displayed in one of 3 places:
The object display area (we frequently do this)
In a pop-up window (we sometimes do this for certain UI patterns)
The BPA area (we almost never do this)

We'll discuss this type of step in the next sections

17 - 23

Copyright 2009, Oracle. All rights reserved.

Press A Button Steps


A Press a Button step is used to press a button in the
main button bar (or in the dashboard or in a traditional
page)
This is rarely used in V2 BPA scripts except to redisplay a
portal after a user has executed a script that can change
something on the portal

17 - 24

Copyright 2009, Oracle. All rights reserved.

Perform Steps
A Perform step would better be defined as an Include step
Perform steps are used to execute script steps that are
defined in a separate script (which we refer to in common
parlance as a "subscript")
You'd move steps into a "subscript" just because its a
good programming technique to not repeat the same logic
in multiple scripts
No one can force you to be a good programmer though

17 - 25

Copyright 2009, Oracle. All rights reserved.

Transfer Steps
A Transfer step stops execution of the current script and
starts execution of another script
Again, you use this to consolidate common logic
And again, no one can force you to be a good programmer

17 - 26

Copyright 2009, Oracle. All rights reserved.

17

The Implications of Common Dialogs

Copyright 2009, Oracle. All rights reserved.

Common Dialogs = Common BPA Scripts


In an upcoming chapter (Maintenance Patterns), we describe that
most blueprints adhere to standard design dialogs to maintain an
MO's BO's
We do this as it results in a more predictable user experience

The nice side effect of this is that, while most MO's require a new BPA
script to add, change and delete their BO's, the script is trivial
What takes the work is the development of the UI maps to capture data

We will only be able to explain how this was achieved after the future
chapter is behind us
If you're interested in "reading ahead", have a look at the BPA script
used to add an approval profile and notice how virtually everything in
it is dynamic
We'll now move on to describing the structure of the UI maps that are
invoked by these trivial BPA scripts
17 - 28

Copyright 2009, Oracle. All rights reserved.

17
Scripts and UI Maps

Copyright 2009, Oracle. All rights reserved.

UI Maps Arent Just For Display-Only Zones


Up to now, the UI maps were used to construct displayonly map zones
But, as you've just learned, UI maps can also be presented
during BPA scripts to capture information during a
business process

17 - 30

Copyright 2009, Oracle. All rights reserved.

An Example
Clicking the icon causes a
BPA script to execute

The BPA script, in turn,


caused this UI map to be
popped up (to ask the user
where they want the bill sent)

17 - 31

Copyright 2009, Oracle. All rights reserved.

Review: UI Map Meta Data


The UI map contains the
HTML presented to the user

UI Map

The maps schema defines the


fields whose values are displayed
and maintained on the map

Schema

HTML

<includeBO name=C1-ConsProg"/>
<tr>
<td oraLabel="conservationProgram/description"></td>
<td><input type="text"
oraField="conservationProgram/description" />
</td>
</tr>
<tr>
<td oraLabel="conservationProgram/generalInfo/startDate"></td>
Notice in this example
<td><input type="text"
that weve just included
oraField="conservationProgram/generalInfo/startDate" />
the schema of a BO (so if
</td>
you change this BO, you
</tr>

This HTML is more interesting than the HTML in the


map zones as it can capture element values
17 - 32

Copyright 2009, Oracle. All rights reserved.

dont have to change the


maps schema, but youd
need to change the HTML
if the change is displayed)

BPA Scripts Invoke map Step Type


UI maps are presented using the Invoke map step type
This step type has several options
You define the portion of the scripts data area that is
injected into the maps HTML (and its also this portion
thats populated after the user is finished with the map)
You define the name of the UI Map

You define where to go based


on what the user clicks on

17 - 33

Copyright 2009, Oracle. All rights reserved.

How This Works At Runtime


When an Invoke map step is executed:
The data area groups XML is injected into the map's HTML
The injected HTML is presented to the user

When the user indicates they are ready to continue:


The element values in the HTML are loaded back into the group's
data area (assuming the user didnt cancel)
A system variable is populated with an indication of what the user
wants to do next (e.g., if the user clicks the Save button, the system
variable will indicate such)
The BPA then transfers control to the step associated with the
system variables value

17 - 34

Copyright 2009, Oracle. All rights reserved.

17

Pop-Ups versus Page Area

Copyright 2009, Oracle. All rights reserved.

Which Target Area?


You must say where the map should appear by referencing
a Target Area

You define where the map appears:


- in a pop-up window
- in the BPA area
- in the page area

17 - 36

Copyright 2009, Oracle. All rights reserved.

Base-Package Patterns
The BPA area is rarely, if ever, used as it looks odd having
a UI map in the BPA area
Pop-ups are used when:
You want the user to confirm the action (e.g., if the user wants to
delete something, we will frequently pop-up a map asking them to
confirm the deletion)
You need a small amount of additional information to complete the
action (e.g., if the user wants to reject an adjustment, we would
pop-up a map asking them for the rejection reason)

The Page area is used for all other situations


Note, when the page area is used, the system disables the rest of
the UI so that the user must complete the map or cancel the
business process

17 - 37

Copyright 2009, Oracle. All rights reserved.

17

HTML in UI Maps Invoked By BPA Scripts

Copyright 2009, Oracle. All rights reserved.

Map Zone HTML versus BPA Map HTML


The differences in the HTML:
Display-only map zones are display-only; BPA maps are frequently
input-output
Buttons on display-only map zones typically kick off BPA scripts,
buttons on BPA maps are typically restricted to OK, Save, Cancel,
etc.
Display-only map zones dont have to deal with displaying errors;
BPA maps must cater for error display

17 - 39

Copyright 2009, Oracle. All rights reserved.

Enforcing Consistency
We ship a sample style sheet so your HTML can inherit the
look and feel from a single spot
We also ship a library of JavaScript functions to handle
things like monetary formatting, date formatting,
defaulting, etc.
You can add your own functions if you want
You can choose to ignore our functions; the choice is yours

17 - 40

Copyright 2009, Oracle. All rights reserved.

HTML Sources
The UI map tips contain many HTML examples
Recall that the UI map transaction has a dashboard zone
that can generate sample HTML for display only and input
maps using the map's schema
There are many base-package and demo BPA scripts and
UI maps with interesting examples

17 - 41

Copyright 2009, Oracle. All rights reserved.

Team Walk Through (60 minutes)


Analyze a maintenance UI map
Break up into teams and follow the instructions in the workbook

17 - 42

Copyright 2009, Oracle. All rights reserved.

17
User Interface (UI) Maps

Drop Downs

Copyright 2009, Oracle. All rights reserved.

Simple Drop Downs On UI Maps


The base-package UI
map functionality
supports several
different ways to
populate a drop down
without the need for
Java Script (this is
from the tips)
Notice all the different
ways to easily populate
a drop down

17 - 44

Copyright 2009, Oracle. All rights reserved.

Drop Downs and The User Experience


The clever use of drop downs can greatly improve the
user's experience
Let's check out the Add Conservation Program dialog to
see what we're talking about

17 - 45

Copyright 2009, Oracle. All rights reserved.

The CCB Base Package Has Good Examples


We've supplied examples in the base-package of
idiosyncratic UI maps
See the map used to add / update a Conservation Program for how
to populate dropdowns with interesting values (e.g., show only SA
Types for a selected Division)
This example also has several techniques of UI events invoking
services to change dropdown values based on the selection of another
drop down (e.g., show only To Do Roles for a selected To Do Type,
show only Adjustment Types for a SA Type)
This example also shows how to implement complex grids

See the map used to add / update a Rebate Definition to see how
users can upload data from a CSV (useful for mass uploads)
See the map used to display the Sample and Submit results to see
how user can see a list of the results from an explorer zone in a UI
map

17 - 46

Copyright 2009, Oracle. All rights reserved.

17
Updating The Database

Copyright 2009, Oracle. All rights reserved.

A Strong Pattern: Invoke map Steps Are Followed By


A Step That Invokes A Server-Based Service
One of the following steps will frequently follow an Invoke map step:
Invoke business object
Invoke service script
Invoke business service

You define the portion of the scripts data


area that is sent to the service script
You define the name of the service
script thats invoked
You define where to go if the
service call fails and succeeds

17 - 48

Copyright 2009, Oracle. All rights reserved.

Displaying Errors
In most sample scripts, if an error is returned, we return to the step
that invokes the map
This causes the map to be redisplayed with the error message shown in
red
This is the base-package standard

If you want to show the error in a pop-up, you can; just navigate to a
step that invokes another pop-up

You can click the message


to see the long message

17 - 49

Copyright 2009, Oracle. All rights reserved.

Highlighting The Field That's In Error


In addition to displaying the error message at the top of
the UI map, you can also turn the background of the field
in error to red
The framework will do this for you for all schema-based
validation
For idiosyncratic validation in your plug-ins, simply return
the name of the element that's in error in the Terminate
with error step

17 - 50

Copyright 2009, Oracle. All rights reserved.

17

Favorite Links and BPA Scripts

Copyright 2009, Oracle. All rights reserved.

Favorite Links Can Reference A BPA Script


Favorite Links is a dashboard zone that contain the user's "favorite"
transactions
These transaction can be true maintenance pages and portals
They can also initiate BPA scripts
We realize that this is duplicative of the user's favorite scripts and there is
no reason to use one versus the other
User

User /
Favorite
Link

Navigation
Option

Transaction

Navigation options that


appear on a user's favorite
links can reference a BPA
script

Script

Script
(BPA)

The script must be user invokable


17 - 52

Copyright 2009, Oracle. All rights reserved.

17

Menu Items for BPA Scripts

Copyright 2009, Oracle. All rights reserved.

Navigation Options Can Reference A BPA Script


Kicking off scripts from menus
Menu
Navigation
Option

Menu Line

Navigation options that


appear on menus can
reference a BPA script

Menu Item
Transaction

You can put these navigation


options on the menu bars
and on context menus

17 - 54

Script

Script
(BPA)

The script must be user invokable

Copyright 2009, Oracle. All rights reserved.

Temporary Storage Is Initiated For Context Menus


If the menu item is on a context menu, a temporary storage variable is initiated:
The name of the variable is the name of the field in the navigation options context
For example, you could have an item on the account context menu to stop autopay; when this
script is initiated, a temporary storage variable named ACCT_ID will be populated so you can
read the accounts current autopay options and pop a window where they can be changed

Navigation
Option

Menu Item
Transaction

17 - 55

Script

Copyright 2009, Oracle. All rights reserved.

Context

Script
(BPA)

17

Advanced BPA Script Features

BPA Scripts On Info and Query Zones

Copyright 2009, Oracle. All rights reserved.

BPA Scripts On Query & Info Zones


You've already seen how columns in info and query zones
can invoke a BPA script
This icon column has been
configured to launch a BPA script
(and to pass the respective Bill Id)

17 - 57

Copyright 2009, Oracle. All rights reserved.

Context Menus Query & Info Zones


You've already seen how a FK ref column contains a context menu
You can add menu items to these context menus that kick off BPA scripts

This context menu can contain


items that launch a BPA script
(passing the ID of the respective
object in context)

17 - 58

Copyright 2009, Oracle. All rights reserved.

17
Access Rights

Copyright 2009, Oracle. All rights reserved.

BPA Scripts Can Be Secured


Earlier, you learned how the application service on a BO
and a service script governs who can access and update it
BPA scripts can optionally reference an application
service
If a BPA script has an application service, the user must have
access right to this app services in order to execute the BPA script
Script

Plug-In

17 - 60

Application
Service

BPA and
Service

This is optional

Copyright 2009, Oracle. All rights reserved.

Valid actions
aren't used for
this type of
security check

When Are Access Rights Checked?


Access rights are checked whenever a user attempts to
invoke a BPA script (it doesn't matter what type of
invocation method)

17 - 61

Copyright 2009, Oracle. All rights reserved.

17

Advanced BPA Script Features

Learn Via Experimentation

Copyright 2009, Oracle. All rights reserved.

Scratching The Surface


Being able to invoke a service passing the data entered on
an HTML form is a powerful tool
The combinations of user interface patterns that you can
now implement are infinite
However, we try to avoid unusual dialogs because users
typically like predictable, simple dialogs and we've tried to
include as many of these as possible in the demo
database

17 - 63

Copyright 2009, Oracle. All rights reserved.

Review Questions

17 - 64

Copyright 2009, Oracle. All rights reserved.

17
Eligibility Rules

Copyright 2009, Oracle. All rights reserved.

Outdated Concept
Eligibility rules were used prior to version 2
With the advent of V2 (and the ability to put BPA scripts on
menus, favorites, explorer hyperlinks, explorer zone
header hyperlinks, context sensitive zones, etc.) the need
to use the BPA menu and the eligible scripts zones to
invoke scripts has been reduced
Because eligibility rules are only used on the BPA menu
and the eligible scripts zone, this section is therefore not
as relevant as it used to be
If you're running short of time, skip this section as it's
sophisticated and will rarely be used in base-package
development
17 - 66

Copyright 2009, Oracle. All rights reserved.

Eligibility Rules Reduce Search Results


You can optionally link eligibility rules to a script
For example, you can indicate a script is only eligible if the user is
part of the CSR user group AND the current accounts customer
class is residential and the accounts division is Texas

Eligibility rules do not affect a users favorite scripts, i.e., a


user can execute a favorite script even if its not eligible
Eligibility rules do affect the scripts that appear when a
user searches for a script, i.e., only eligible scripts
matching the users search criteria appear in the bottom
half of the script menu (if theyve turn on the switch on the
BPA menu)

17 - 67

Copyright 2009, Oracle. All rights reserved.

Only Eligible Scripts May Appear In The BPA Menu


You can optionally link eligibility rules to a script

For example, you can indicate a script is only eligible if the user is part of the
CSR user group AND the current accounts customer class is residential

Eligibility rules do not affect a users favorite scripts

i.e., a user can execute a favorite script even if its not eligible

Eligibility rules do affect the scripts that appear when a user


searches for a script

i.e., only eligible scripts matching the users search criteria appear in the
bottom half of the script menu (if theyve turn on the switch on the BPA
menu)

Only eligible scripts appear if


the check box is on

17 - 68

Copyright 2009, Oracle. All rights reserved.

Eligible Scripts Can Appear In The Dashboard


If a user updates their portal
preferences to include the Eligible
Scripts Zone, a zone will appear on
the Dashboard
This zone contains the users eligible
scripts
Clicking on a line executes a script
Only visible if the user has
selected the zone on Portal
Preferences

17 - 69

Copyright 2009, Oracle. All rights reserved.

You Dont Have To Set Up Eligibility Rules


When you set up a BPA script, you must indicate if it has
eligibility rules or if its judged as always eligible or
never eligible
By default, the system assumes a script is always
eligible
If a script is always eligible or never eligible, the rest of
this presentation is not applicable
Eligibility
Indicator

Valid Values:
Always Eligible
Never Eligible
Based on Criteria Group

Script

17 - 70

Copyright 2009, Oracle. All rights reserved.

If A Script Is Not Always / Never Eligible Then It Has


Criteria Groups
A scripts criteria group(s) control whether the
script is eligible
A script must have at least one criteria group if
its not always/ never eligible
At a high level, it works like this
A criteria group has one or more eligibility criteria
A groups criteria control whether the group is
considered TRUE or FALSE for a given customer and
user
You also define what should happen if the group is
TRUE or FALSE. You have the following choices
The script is judged as eligible
The script is judged as ineligible
The next criteria group should be checked

17 - 71

Copyright 2009, Oracle. All rights reserved.

Script

Criteria
Group
Eligibility
Criteria

Schematic Of A Sample Scripts Eligibility Rules


Assume a script exists that can only be selected if

Customers credit rating is > 700 and amount of debt older than 60
days is between $50 and $500, OR
Credit rating is > 800 and the amount of debt older than 60 days is
Eligibility Group 1
between $50 and $1,000
Eligible for the script if the criteria indicate the group is

The script needs two


criteria groups and each
group needs two eligibility
criteria

TRUE

Script Eligibility Criteria


Credit rating > 700
Debt older than 60 days is between $50 and $500

Script Setup Payment Arrangement


Eligibility Groups
Customer has a good credit rating and old debt is
between $50 and $500
Customer has an excellent credit rating and old
debt is between $50 and $1,000

17 - 72

Script Group 2
Eligible for the script if the criteria indicate the group is
TRUE

Package Eligibility Criteria


Credit rate > 800
Debt older than 60 days is between $50 and $1,000

Copyright 2009, Oracle. All rights reserved.

Eligibility Criteria
When an eligibility criterion is executed, the system

Retrieves a comparison value and compares it to something


Based on results, determines if next eligibility criterion in the group should be
checked of if the group should be judged TRUE or FALSE

Here is an example of an eligibility criteria group that restricts a script to


customers whose credit rating is > 700 and whose debt thats older than
60 days is between $50 and $500

17 - 73

Copyright 2009, Oracle. All rights reserved.

Valid Values:
Person
Account
Premise
Valid Values:
Call an algorithm
Characteristic
This is only used if you need
to retrieve a value from
someplace else in the
system (other than a
characteristic)
Valid Values:
<
<=
=
>=
>
<>
Between
In
Call an algorithm
17 - 74

Used if you need


to retrieve a value
Eligibility Criteria
ERD
Criteria
characteristic
entity

from a person, account, or premise


characteristic

Script
How to retrieve
comparison
value

Value
Retrieval
Algorithm
How to
compare

Comparison
Algorithm

All 3 flags have the same values:


- The group is true
- The group is false
- Check the next eligibility criteria

Criteria
Group
Eligibility
Criteria

What happens
if the criteria is
true
What happens
if the criteria is
false
What happens
if the criteria is
indeterminate

This is only used if you need to perform a


complex comparison (e.g., determine if a birth
date is that of a senior)

Copyright 2009, Oracle. All rights reserved.

Eligibility Group ERD

The criteria group is simpler; it simply contains an indication


of what should happen if the eligibility criteria indicate the
group is considered to be TRUE or FALSE
There are only 3 options:
The script is eligible
The script isnt eligible
Check the next group

17 - 75

Script

Valid values:
Eligible
Ineligible
Check Next Group

If Group Is
True

Valid values:
Eligible
Ineligible
Check Next Group

If Group Is
False

Copyright 2009, Oracle. All rights reserved.

Criteria
Group
Eligibility
Criteria

17

Value Retrieval Algorithms

Copyright 2009, Oracle. All rights reserved.

Base Package Value Retrieval Algorithms


The following value retrieval
algorithms are delivered with
the base package
Return the value of a field held on
CI_ACCT
Return TRUE if the account has a
non-closed / non-canceled SA of a
given service type
Return TRUE if the user belongs to
a given user group

17 - 77

Script

How to retrieve
comparison
value

Value
Retrieval
Algorithm

Copyright 2009, Oracle. All rights reserved.

Criteria
Group
Eligibility
Criteria

Base Package Value Comparison Algorithms


Only one value comparison is
being delivered in the base
It has the same logic as the time
span comparison algorithm
from the package eligibility rules
It may prove handy for criteria
like

Script

How to
compare

Must be a senior
Must have been a customer for less than
Comparison
a year
Algorithm

17 - 78

Copyright 2009, Oracle. All rights reserved.

Criteria
Group
Eligibility
Criteria

17 - 79

Copyright 2009, Oracle. All rights reserved.

You might also like