Skip to content
Mithun Satheesh edited this page Jan 17, 2015 · 4 revisions

This is an object injected into the condition and consequence functions defined by the user to make it easy for the user to define the Rule Engine flow.

If you look at the below rule example.

{
	"name": "transaction minimum",
	"priority": 3,
	"on" : true,
	"condition": function(R) {
		R.when(this && (this.transactionTotal < 500));
	},
	"consequence": function(R) {
		this.result = false;
		R.stop();
	}
}

The R object injected in both condition and consequence refers to the API we are talking about.

Clone this wiki locally