Beruflich Dokumente
Kultur Dokumente
Check Point
You know how to:
Define a BO's data structure (i.e., its schema)
Create plug-ins for a BO
Create a child BO that inherits rules defined on a parent BO
7-2
Literature
Sent
Open
Being Worked
On
Follow Up
Complete
Not Interested
7-4
Refer To
Salesperson
This is an example of a
BO whose MO supports
"soft state transition rules"
These rules have been
entered in the BO metadata (i.e., they have not
been hard-coded by a
programmer)
Follow Up
Not Interested
Refer To
Salesperson
7-5
Literature
Sent
Lodged
Preliminary
Investigation
Follow Up
Not Interested
Refer To
Salesperson
Canceled
Investigation
In Progress
Decision
Checkpoint
Cancel / Rebill
Approved
7-7
Rejected
BO Status ERD
BO's associated with soft lifecycle MO's have their valid
statuses defined in the BO meta-data
One status must be marked as
Initial and there must be at least
one state marked as Final
Values:
Initial
Interim
Final
Business
Object
Valid
Status
Condition
Valid State
Description
Condition
LS
Literature Sent
Initial
FU
Follow Up
Interim
NI
Not Interested
Final
RTS
Refer To Salesperson
Interim
Follow Up
Not Interested
Refer To
Salesperson
7-8
To
Follow Up
Transition
Rule
7-9
From State
To State
Literature Sent
Follow Up
Follow Up
Not Interested
Follow Up
Refer To Salesperson
Refer To Salesperson
Not Interested
Refer To
Salesperson
State-Specific Rules
In an earlier chapter, you learned how you can plug-in
algorithms on a BO
For example, you learned how you could develop validation plugins to validate the elements on different types of customers
7 - 11
For example,
Exit
Error
7 - 12
Enter
BO / State /
Algorithm
Algorithm
System
Event
Algorithm
Type
Valid Values:
Enter
Exit
and one more
7 - 13
Business
Object
BO /
Algorithm
System
Event
Valid
Status
BO / State /
Algorithm
7 - 14
System
Event
Valid Values:
Pre processing
Validation
Post processing
Valid Values:
Enter
Exit
and one more
7 - 15
Monitor Rules
For example,
You could transition a BO to the Canceled state if it's been in the
Error state too long
You could update statistics held on the object while it's in the
Active state (we'll discuss this in a later chapter)
Error
Canceled
Monitor
7 - 17
Business
Object
Error
Monitor
Canceled
Valid
Status
Algorithm
BO / State /
Algorithm
7 - 18
System
Event
Algorithm
Type
Valid Values:
Enter
Exit
Monitor
In the example below, a monitoring algorithm is associated with the Pending state of
a Credit Line Increase BO
This algorithm is designed to move the object to the Accepted state if a credit rating
verification is returned with a good rating, and to the Denied state if the credit rating
is not adequate
If the credit rating verification is not received, the BO remains in the Pending state
BO: CreditLineIncrease
Pending
Denied
Monitor
This plug-in will be invoked when the object is
first created. If the monitoring condition doesn't
apply when the object if first created, a batch
process will periodically invoke the plug-in (i.e.,
this algorithm is invoked when the object first
enters the state and also periodically in batch)
7 - 19
Accepted
Transition the BO to another state note, if there are other monitoring algorithms plugged in on the state,
they will NOT be checked
So it's important to think carefully about the sequence number allocated to this type of algorithm when it's plugged in
Stop monitoring the BO (i.e., tell the framework not to transition the BO and to not call any other monitor
algorithms plugged in on the BO / Status)
We design algorithms to do this when we want to prevent transitions while some condition is true
BO: CreditLineIncrease
Pending
Denied
Monitor
Accepted
7 - 20
Multiple Conditions
Assume that the Pending object should only be transitioned to Accepted if two conditions are true:
1) we've received a good credit rating back from the credit agency, and
2) at least 3 days have passed since the request was created
You could bundle both conditions into a single monitoring plug-in; alternatively, you could create 3
BO: CreditLineIncrease
Pending
Denied
Monitor
Accepted
7 - 21
7 - 22
Monitor
Exit
Pending
Enter
Denied
Enter
Accepted
In the following example, the Denied state also has monitoring algorithms and
these will be invoked when the Denied state is entered
The Denied monitoring algorithms could, in turn, transition the BO to another
state (and then this state's monitoring algorithms will fire)
Ad infinitum
7 - 23
Monitor
Exit
Pending
Enter
4
5
Denied
Monitor
Monitor
Retry Later
7 - 24
4
5
Denied
Monitor
Monitor
Enter
Monitor
Exit
Pending
Enter
Retry Later
If this plug-in is not specified and an error is thrown, the object will be
rolled back to its state before the start of the logical transaction
Your MO designs will specifically call for such a plug-in if it's needed
MO
MO /
Algorithm
7 - 25
System
Event
Valid Values:
Info
Transition Error
Determine BO
plus a few more
7 - 27
MO
BO
Valid
Status
BO /
Status /
Algorithm
7 - 28
System
Event
Valid Values:
Enter
Exit
Monitor
Another example from market messaging is that you don't want an inbound
message processed when it's received; rather, you want to wait until a later
point in time (maybe at the end of the day)
You'll learn another example later in this course when we describe how
statistics can be periodically updated while an object is in a given state
7 - 29
Batch
Control
The presence of this FK can be thought of as
a switch that tells the FW to not execute the
monitor plug-in when the object initially
enters the state
System
Event
Valid Values:
Enter
Exit
Monitor
BO: OnceADayAudit
Status: Pending
Monitoring Batch Process: C1-MON-AUD
System Event: Enter
Algorithm: Snapshot Customer Information
System Event: Monitor
Algorithm: Transition to Sent
Status: Sent
System Event: Enter
Algorithm: Send Customer Change To Market
Participants
7 - 31
Business
Object
Valid
Status
BO /
Status /
Algorithm
Batch
Control
System
Event
Valid Values:
Enter
Exit
Monitor
7 - 32
Case Study
Assume high-bill complaints are added
in a web self service app in the Lodged
state and an implementation only
wants to move them into the
Preliminary Investigation state (where
an investigator is assigned) in the
evening so that the entire new
workload can be considered when
making the assignment
To do this:
Preliminary
Investigation
Canceled
7 - 33
Investigation
In Progress
Decision
Checkpoint
Cancel / Rebill
Approved
Rejected
Transitory States
Error
Pending
Enter
Validate
Complete
Valid
Status
Transitory
Valid State
Description
Transitory
Pending
No
Validate
Yes
Error
No
OK
OK
No
7 - 36
Validate
Error
OK
7
MO Logs
Introducing Logs
Most new MO's that have a status column have a log
Note, there are some simple admin MO's that have a status and
don't have a log (this is done to save development time)
MO Log ERD
Values:
Created
Status Transition
System
User Details
Status Transition Error
Exception
product-specific values
This pair of log entries is
created by the MO's
Transition Error plug-in (as
explained during the earlier
"save point" discussion). The
first records the state in which
the error occurred, the second
records the actual error.
Remember, this plug-in is
optional, if it's not there, these
log entries won't be created
and there won't be save
points.
7 - 39
"MO"
Log Type
Char Type
Log
Message
User ID
Message
Parm
7 - 40
7
Just In Case
BO
7 - 42
MO
Algorithm
MO /
Algorithm
System
Event
Valid Values:
Transition
(and a few more)
Inheriting Lifecycle
If you knew nothing more, you'd be forced to define the same valid states on
every BO
BO: InstallMeter
BO: RemoveMeter
Pending
Canceled
Dispatched
Complete
7 - 44
Pending
Canceled
BO: ReadMeter
Pending
Dispatched
Complete
Canceled
Dispatched
Complete
Complete
BO: InstallMeter
7 - 45
BO: RemoveMeter
BO: ReadMeter
Complete
BO: InstallMeter
BO: InstallComplexMeter
7 - 46
BO: ReadMeter
BO: InstallSimpleMeter
Complete
BO: InstallMeter
Status: Complete
System Event: Enter
Algorithm: Create
Installation Charge
7 - 47
BO: InvestiSvcTheft
BO: ReadMeter
BO /
Algorithm
System
Event
Valid Values:
Validation
Pre Processing
Post Processing
Audit
Info
Valid
Status
BO / State /
Algorithm
7 - 48
System
Event
Valid Values:
Enter
Exit
Monitor
Dispatched
Canceled
Complete
BO: InstallMeter
7 - 49
BO: InvestiSvcTheft
BO: ReadMeter
7 - 50
7 - 51
7
Check Point
System
Event
BO
Algorithm
BO /
Algorithm
System
Event
Valid
Status
BO / State /
Algorithm
7 - 53
System
Event
Valid Values:
Info
Transition
Transition Error
Determine BO
Valid Values:
Validation
Pre Processing
Post Processing
Audit
Info
some designs
introduce these
Valid Values:
Enter
Exit
Monitor
In
vo
BO k e
1. Pre-processing rules
Exit
Person MO
3. MO Processing
4. Determine BO (MO)
7 - 54
Review Questions
7 - 55
7 - 56