Databases Reference
In-Depth Information
You will see that, by default, JDeveloper has created a skeleton rules
dictionary-based on the inputs we just specified.
Select the
Facts
tab (as shown in the preceding screenshot). You will see that it
contains two XML facts (
TLeaveRequest
and
com.packtpub.schemas.leaverequest.
ObjectFactory
), which are based on the inputs/outputs we defined earlier as
well as a set of standard Java facts, which are automatically included within a
rules dictionary.
Next, select the
Decision Functions
tab. You will see that it contains a single decision
function
LeaveApprovalDecisonService
(that is, the name we specified on the
Advanced
tab when creating our business rule).
We will introduce some of the other tabs later in this chapter, but for the time being,
we will start by defining our first rule. By default, the rules editor will have created
a single ruleset with the name
Ruleset_1
. Click on the
Ruleset_1
tab
to open up the
ruleset within the editor.
Expand the ruleset to show its details by clicking on the plus symbol (circled in
the following screenshot). We can see that the ruleset has three properties:
Name
,
Description
, and
Effective Date
.
The
Effective Date
enables us to specify a period in time for which the ruleset will be
applied, allowing you to define multiple versions of the same ruleset. For example, a
current ruleset and a future version that we wish to come into effect at a defined time
in the future.
Rename the ruleset to something more meaningful, for example,
Employee Leave
Approval Policy
; add a description if you want and ensure that
Effective Date
is set
to
Always Valid
.