Service Scripts
Check Point
You know how to:
10 - 2
10
What Is A Service Script?
Problem Statement
What if there exists common logic that needs to be
invoked by many BO's
For example:
Many BO's may share common validation logic
Many BO's may share common post processing logic
10 - 5
Step
10 - 6
Step Type
Conditional branch
Edit data
Go to a step
Invoke business object
Invoke business service
Invoke service script
Label
Move data
Terminate
10
Plug-In
10 - 8
Service
Algorithm
Entity
A plug-in scripts input and
output is defined by its
plug-in spot and that's why
no schema is allowed for
these types of scripts
10 - 9
Plug-In
Service
<input type="group">
<driversLicenseNo />
</input>
<output type="group">
<customerId />
</output>
Plug-In
Service
GetPersonAndPremInfo Service Script Schema
<personId required="true" fkRef="PER" />
<premiseId required="true" fkRef="PREM" />
<effectiveDate required="true" dataType="date" />
<reasonCode required="true" dataType="lookup" lookup="REAS_FLG" />
...
10 - 10
Step
Step Type
10 - 11
Conditional branch
Edit data
Go to a step
Invoke business object
Invoke business service
Invoke service script
Label
Move data
Terminate
Data Area
10 - 12
BO
Standalone
Service
Script
Business
Service
10
Access Rights
Script
Plug-In
10 - 14
Application
Service
Service
This is optional
This type of
service has a
single valid action
- Execute
Web
Server
Application
Server
10 - 15
DB
Script
Plug-In
10 - 16
Service
10
Transaction Globals
10 - 18
10 - 19
Initiating A Global
To create a global variable, you just have to move
something to an element prefixed with $$
For example, the following Edit Data statement would
create a global and populate it with a value of true
move 'true' to $$skipValidation;
10 - 20
Using A Global
Once a global is populated, it can be interrogated in any
plug-in or service script that's invoked
if ($$skipValidation = 'yes')
terminate;
end-if;
10 - 21
10 - 22
10 - 23
10 - 24
Review Questions
10 - 25
10 - 26