SAS Decision Builder brings SAS Decision Manager rule flows and predictive models together with conditional logic to build "Decision" services. For example, a Used Car Auction "Decision" might combine a car valuation model with an auto auction rule-flow to create a decision service that looks something like this:
The idea being that a bid decision is governed differently for automatic versus manual transmission cars. For manual cars, the bid decision is generated using a predictive model (DecisionTree) and for automatics, the decision is generated by a rule flow (AutoRuleFlow).
Decision Builder services can be deployed for batch execution but, often, work best as real time services. For example, in the auction setting proposed above, you would need to rapidly generate new bid decisions as bidding escalates. When published for real-time, decisions are deployed to the SAS MicroAnalytic Service as modules. Deployment is performed in the Decision Builder Web Application simply by pushing the "Publish" button.
MAS modules are meant to be integrated into web applications and can easily be called via REST (simple HTTP commands). I can approximate this scenario using curl. A curl command calling one of the deployed services would look like this:
This command is performing an HTTP POST method on the http://localhost/SASMicroAnalyticService/rest/modules/b45092bd-edd9-4c70-bea2-5bd725271fe6/steps/execute MAS module step using the local sasdemo user. The posted data comes from a local file, input.json which contains the following JSON. Each variable required for the conditional logic, predictive models, and rule flows must be included.
The response is directed to a file named output.json which, after successful completion, contains the following JSON. The response will contain all the variables returned by the decision service. Most notably here, the field, ISBADBUY = 0 so our bidder is free to bid:
In order to see what MAS modules are available along with their input and output message structure, simply query the MAS with the following REST GET query, http://localhost/SASMicroAnalyticService/rest/modules/. It can be issued in any web browser.
When prototyping with test data, JSONLint or another JSON validator can help quickly format the returned JSON so it's easier to read.
This post was designed to convey understanding of Decision Builder services as quickly as possible. To that end it sacrificed best practices and security at the expense of brevity, convenience, and simplicity. However, if working with Decision Builder at a customer site, you should consider the following: