...
A rules service can be created through the rule service wizard of the WSO2 BRS management console, as follows:1.
- Log in to the WSO2 BRS management console and click Create under Rules Service in the Main page.
...
- The Service Information
...
- window opens. Enter the required information and
...
- click Next. The service name has to be unique.
...
...
- The Rule Set Information
...
- window appears. There are four ways to specify a rule set or a rule script.
- In-lined : Script is provided in the window itself
- Registry Key: Include the rule script in the system's governance registry. (Multiple scripts can be added here).
- Rule File: Upload a Drools rules file from a folder.
- URL: Upload from a url
...
- Once the rule is uploaded
...
- click Next.
...
- The Facts Upload
...
- window appears to upload facts and results that are used in the rule script. It should be a valid jar file. Multiple jar files can be uploaded. For example, create a jar file from the facts and results defined
...
...
- The Operations Summary
...
- window appears, displaying any operations available in the service. You can also use
...
- the Add New Operation
...
- link to create a new operation.
...
- The Add Operation
...
- window appears. Fill in the fields appropriately.
- Name: Operation name which is mandatory.
- Input and output facts: You can use fact "selector" to select a type, which you have already uploaded in the input fact upload step. In this example, one fact is added with the type
...
- as
samples.userguide.PlaceOrder
- as
...
- and two outputs with types
...
- as
samples.userguide.OrderReject
- as
...
- and
samples.userguide.OrderAccept
. Note
- and
...
- that
Type
- that
...
- is the only mandatory attribute in both input and output facts.
...
- Click the Add button once done. This will bring you to the
...
- previous Operations Summary
...
- window.
...
- Click Finish
...
- to create and deploy the rule service.