The Booking Rule Validator tab of the Booking Rule Editor provides a means of testing any user created Booking Rules. In particular, please note that when a Booking Rule is edited, it can be tested before it is saved, so that its behaviour can be tested to make sure it works as expected.

 

Click to expand

 

The way the Booking Rule Validator works, is to simulate creating a booking or updating a booking by changing the Booking change type. The Booking tab is where the values of the booking being created is specified, or, when simulating an update, this is replaced by two tabs Old Booking and New Booking where the old and new values for the simulated booking can be specified. Then decide which user the test is being run as. Running the test while pretending to be another user is a way to see how the Booking Rule would behave when a booking is created or update by somebody else.

 

Click to expand

 

Finally, the Test Rule button runs the test. The text area at the very bottom of the tab shows the output and the rejection level returned from the Booking Rule with information about what happened. If there's a message that would be presented to the user, or the Booking Rule provided some other output by calling RulesResult.setOutput(String), then it will be shown in the Message to show user area.