Documente Academic
Documente Profesional
Documente Cultură
<birthDate mdField="BIRTH_DT" …> validates the element is formatted as per the field's meta-
data
<propertyManager fkRef="SA" …> validates the element is a foreign key to the reference
table
<birthDate required="true" …> validates the element is specified
BO /
Algorithm
Algorithm
Individual Taxpayer
Enter Exit
M oke
v
O
Person MO
In
3. Validation algorithms
2. MO Processing (Service)
Individual Taxpayer
or delete anything in a
Enter Exit validation algorithm
M oke
v
O
Person MO
In
3. Validation algorithms
2. MO Processing (Service)
Program- 1
ming
Business
Language
Object
3 2
Algorithm
4 Algorithm
BO Type
Algorithm
Fundamentals
Plug-In
Script
The script's steps contain the
algorithm's logic; we'll discuss
steps in a few slides
Step
• When you create a plug-in script to validate a BO, you must reference the BO on
the script
• This is because when you write a plug-in script, you'll typically reference
elements in this BO and the script validation logic ensures that your references
are valid (if you didn't have this BO on the script, it couldn't validate references
to the elements)
MO
Program- 1
ming Plug-In
Business
Language Script
Object
3 2
Algorithm
4 Algorithm
BO Type
Step
Algorithm
• A plug-in script is similar to other programming languages in that it has a data area that holds the
data used in its logic
• This data area is actually an XML document
• This XML document is simply an aggregation of the various objects referenced in the script
• Let's assume you have a "validation" plug-in script that needs to retrieve information about the customer
and its account; this script's data area would be an XML document that contains the elements for the
customer and the account business objects
<customer>
<lastName mapField= ... />
<homePhone ... /> This XML document
<mobilePhone ... /> represent a script's
<driversLicense ... />
...
data area
</customer>
<account>
<creditLimit mapField= ... />
<preferredDueDay ... />
<customerClass ... />
...
</account>
Plug-in
Jump to another step if a condition is true or false
Script
• Conditional branch Jump to another step
• Go to a step
Read, add, change, delete a business object
• Invoke business object
• Invoke business service Invoke a Java or Cobol program
Step • Invoke service script
• Label Invoke a subroutine written in the scripting language
• Move data Declare a "go to" location
• Terminate
• Edit data Move data in the script data area
Step Type Exit the script (with or without an error)
object page
• These tips provide a list of all valid edit
data syntax along with many cut and
paste examples
Debugging
This area appears when you enter the system in debug=true mode. You must
turn on the Global debug checkbox if you want to turn on server logging
Valid Values:
• Validation
BO / System • Pre-processing
Algorithm Event • Post-processing
• Audit
• Information
When you link an algorithm to a BO,
you must also declare the system event
(i.e., the type of algorithm)
Individual Taxpayer
1. Pre-processing rules Enter Exit
M oke
v
O
Person MO
In
Individual Taxpayer
1. Pre-processing rules Enter Exit
M oke
4. Post-processing rules
v
O
Person MO
In
Individual Taxpayer
1. Pre-processing rules Enter Exit
5. Audit processing
M oke
4. Post-processing rules
v
O
Person MO
In
Individual Taxpayer
5. Audit processing
1. Pre-processing rules Enter Exit (updates allowed)
(updates allowed)
4. Post-processing rules
M oke
(updates allowed)
v
O
Person MO
In
</hard>
</parm>
• Recall that you must define the algorithm's system event when you plug it in
on a BO so the framework knows what the algorithm is used for
• There are a limited number of system events (e.g., validation, audit, …)
• You also learned that when you create a plug-in script / algorithm type, you
must define their algorithm entity so the system can construct's the program's
API
• There are 100's of algorithm entities – you've only learned those that are used on
BO's (the others are used on other objects that you don't know about yet)
Maint.
Algorithm
Object
Valid Values:
MO / System • Determine BO
Algorithm Event • Information
•…
6. Audit rules
v
O
Person MO
In
4. Validation rules
2. MO Processing
3. Determine BO
BO k e
vo
In
For non-add calls, after the pre-processing
rules have been executed for the invoked Individual Taxpayer
BO, the FW determines the BO prior to 1. Pre-processing rules
invoking the MO. It does this for two
reasons: 2. Determine BO
1) to take a snapshot of the BO prior to it
being changed (for audit purposes), M oke
2) to check if the user has security access to
v
O
Person MO
In
MO: Person
Logic:
System Event: Determine BO - Return the value of the "person
Algorithm: Use Person Flag flag" (e.g., Human or Business)