Using the wRules sample

You can use the wRules sample to setup a Model and vocabulary by importing a schema and defining a parameter to the ruleset. You use this model (or you import a complete project from the build tab) to investigate the rule authoring, building, deployment and execution facilities of Business Rules Embedded. For more information on the wRules tabs and an explanation of how the sample works, see the appropriate tab section in wRules sample details.

To work with a new project

Procedure

  1. Header: Click Create Project and create a new project called MyProject.
  2. Model Tab: Import the <ER_HOME>/samples/data/customer.xsd schema file.
  3. Model Tab: Enter the following parameter information:
    • Ruleset parameter name: customer
    • BOM type: com.ilog.rules.customer.Customer
    • Verbalization: the customer
  4. Rule Tab: Write a simple rule, for example: if the name of 'the customer' contains "Smith" then print "hello Mr Smith";
  5. Rule Tab: Save the rule.
  6. Build Tab: Click Validate to ensure that there are no errors in the rule.
  7. Deploy Tab: Click Deploy Ruleset and make a note of the deployment path.
  8. Execute Tab: Load the <ER_HOME>/samples/data/customer.xml file and click Execute to examine the result.
  9. Experiment with new rules and with modifying the customer.xml input parameter content.

To use the existing customer sample

Procedure

  1. Build tab: Import the <ER_HOME>/samples/data/CustomerSample.zip project file.
  2. Rule tab: Familiarize yourself, then modify the existing rules.
  3. Decision Table tab: Familiarize yourself with and then modify the existing decision table.
  4. Build Tab: Click Validate to ensure that there are no errors in the rules or decision tables.
  5. Deploy Tab: Click Deploy Ruleset and make a note of the deployment path.
  6. Execute Tab: Load the <ER_HOME>/samples/data/customer.xml file, and click Execute to examine the result.
  7. Experiment with new rules and modifying the customer.xml input parameter content.
  8. Build tab: Click Export Current Project to save your project to a .zip file to import again later.