Creating and maintaining stored procedure rules

Create Leave Type - A summary of the activity

Page Objective

What you can do in this page

Glossary

How to use the web page

Using online help

See page overview.

The “Maintain Stored Procedure" page appears. The system displays the following field.

Rule For

The name of the business process chain, in combination with the name of the pertinent business function.

Using the example above, this field will show “Leave Management - Prorata Rule”, where Leave Management is the business process chain and Prorata Rule is the business function.

The “Parameters” multiline displays the input and output parameters for the combination of business process chain and business function

The “Database Variables” multiline displays the variables specific to the business process cycle.

To define a new stored procedure rule

Rule ID

The identification number or code that uniquely identifies the stored procedure rule.

Rule Description

The description of the rule.

The system compiles the new stored procedure rule. If there are no syntax errors, this rule is written to the database. See Example.

To edit an existing stored procedure rule

The system displays the rule description, the existing code of the stored procedure, the parameters and the database variables specific to the business function.

If there are no syntax errors, the edited stored procedure rule overwrites the previous one, in the database.

 To delete an existing stored procedure rule

The stored procedure rule is deleted from the database.

To proceed

Go to top

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6      Hyperlinked topics below

Page Objective

Use this page to create, edit and delete stored procedure rules.

Go to top

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

What you can do in this page

To define a new stored procedure rule

To edit an existing stored procedure rule

To delete an existing stored procedure rule

To proceed

Go to top

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page Overview

Through this page, you can create one or more stored procedure rules for each combination of Business Process Chain and Business Function. For instance, you can create one for the Business Process Chain “Leave Management” and The Business Function “Entitlement”.

When you enter the “Maintain Stored Procedure” page by selecting a hyperlink from any other page, the “Rule For” drop-down list box inherits the pertinent business function from the calling page. For example, you may choose “Rule” from the “Entitlement” drop-down list box of the “Create Leave Type” page; when you do, the system activates the “Define Rule Entitlement” hyperlink that is alongside. Once you select this hyperlink, the “Maintain Stored Procedure” page appears, with the “Rule For” drop-down list box showing the following: Leave Management – Entitlement Rule. Tell me more.

The system also shows the entire list of parameters predefined for the combination of Business Process Chain and Business Function. You can view whether each parameter is an input or output, and the parameter type and length. Additionally, the system shows the exhaustive list of database variables under the business process chain.

You can now carry out one of the following:

After creating or editing the rule, you are to compile it. If there are no syntax errors, the rule is written into the database.

Go to top

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example

Given below is the example of a rule to define an employee’s entitlement for a leave type.  The input parameter is the employee code, and the output parameter is the number of units of leave to which the employee is entitled.

The database variables of Job, Department, Grade etc. will be used to calculate the eligibility of the employee, as follows:

Rulefor: Leave Entitlement

RuleID: Ent_CL1

Rule Name: Entitlement rule for Casual Leave

Input Parameter: @Employee_code (Employee code)

Output Parameter: @Days (Entitlement Days)

Database variable: @Dept (Employee’s Department)

If the entitlement units depended on the employee’s department, the rule will be written as shown below:

If @dept=’DEPT1’

Select @days=10

ELSE if @dept=’DEPT2’

SELECT @days=12

This rule will be executed when the business function “Calculation of Leave Entitlement” calls it.

Go to top

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

“Parameters“ multiline

The “Parameters” multiline displays the following

Parameter Name

The name of each parameter applicable for the combination of business process chain and business function

Input/Output

Whether the parameter is an input or an output.

Type

The type of parameter, whether integer, character or date.

Length

The length of the parameter

Go to top

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

“Database Variables” multiline

The “Database Variables” multiline displays the following.

Database Variable

Each variable specific to the combination of business process chain and business function

Database Variable Details

The exact meaning of the variable.

Go to top