Databases Reference
In-Depth Information
Due to the use of inference to simplify the rule condition and the use of functions to
manipulate the resultset, the final rule is very straightforward.
The only thing we need to take into account is the priority of the rule, which we have
set to medium . We need to ensure that the validation rules for a bid have a higher
priority to ensure that they are fired first.
Validating the next bid
For the above rule to be complete, we need to define the rules which validate the
next bid before we process it. The two conditions that we need to check are:
1.
The maximum bid amount is greater than or equal to the starting price of
the item.
2.
The maximum bid amount is greater than the current winning price plus one
bidding increment.
To validate that maximum bid amount is greater than or equal to the auction starting
price, we have defined the following rule:
We have also defined a similar rule, validateBidAgainstWinningPrice , to validate
that the maximum bid amount is greater than the current winning amount plus one
bidding increment.
Each of these rules has a priority of high , which is higher than the rules for
processing the next bid. This ensures that any invalid bids are retracted before
they can be processed.
 
Search WWH ::




Custom Search