Databases Reference
In-Depth Information
This will execute the function and open a window displaying the result of the
function and any output as shown in the following screenshot:
Testing decision service functions
We can also use this approach to test our decision service. The body for this test
function appears as shown in the following screenshot:
A couple of interesting points to note about this: the statement call RL.watch.all()
will cause the function to output details about how the facts are being processed
and which rules are being activated. This is something we cover in more detail in
Chapter 18 , Using Business Rules to Implement Services .
The other point to note is that the decision service return type is a result List , so we
need to extract our fact from this list and cast it to the appropriate fact type in order
to examine its content. We do this with the statement:
assignleaveRequest=(TLeaveRequest)resultList.get(0)
 
Search WWH ::




Custom Search