Functionality to create rules that are function of order weight.