In a service request that is created to report a pipeline
leak, an operator specifies the appropriate classification for the
pipeline based on attributes such as diameter and length. When a business
rule is implemented using automation scripts, if the volume of the
pipeline is less than 1000 cubic feet, the service request is assigned
to service group A. If the volume is greater than 1000 cubic feet,
the service request is assigned to service group B and a work log
entry is created.
The rule is implemented in an automation script. Upon implementation,
an escalation definition created by the development team enables the
script and its associated launch point.
By defining an escalation, the team ensures that service requests
are automatically examined by the script. New service requests that
meet the pipeline leakage criteria are automatically assigned to the
appropriate service group.
When the development team create the automation script, the business
rule is implemented with the following components:
- The escalation runs automatically and periodically in the application
server.
- When the escalation finds service request records that match the
criteria, an action starts.
- The action launch point is the entry point into the business rule
implementation. The action starts the launch point.
- The script implements the business rule to identify and assign
the correct service group. If required a work log is generated.
The script code has two parts:
- The first part is written in the Jython scripting language and
identifies the service group.
- The second part uses MBO API invocations to create a work log
record and to set values. You can express business rules in the flow
control constructs of the scripting language. However, certain tasks
require Java™ or MBO API invocations
to be called. Specifically, the creation of a new record from within
the script requires the use of the Java MBO add() method.