Wednesday, July 16, 2008

Business Rules

Business Rules How to

Websphere Integration Developer v612

Contact us...

How to create business rule groups

How to generate business rule group implementation

How to create a Ruleset

How to add If-Then Rule

Related links

Building business rules
Becoming more on-demand using dynamic business rules

How to Create business rule groups

Related links Creating a rule group
Rule group editor

Business Rule Group example

Here's a rule group editor with a business rule group/rules defined (CustomerCheck/checkCustomer).

To create a business rule group, proceed as follows:

  1. generate business rule group implementation
  2. Create a ruleset or a decision table

How to generate business rule group implementation

Generate rule group implementation

In the assembly editor, right-click on the component (i.e CustomerCheck) that you want to generate and select Generate Implementation > Rule Group.

Select the Folder

Select the folder where the Rule Group implementation will be generated and click OK button.

Rule Group Created

A new rule group is created.

How to create a Ruleset

Create a Ruleset

  1. Click CustomerCheck.
  2. Click Enter Destination (right of Default Destinatiion) and select New Ruleset...

Specify the name and location

  1. Specify a name (i.e checkCustomer)
  2. Click Finish.

Rule Set created

A new rule set is created.

How to add If-Then Rule

Add If-Then Rule

Click the Add If-Then Rule icon.

A Rule is added

Populate If (Condition) and Then (Action)

If: (Condition)

customerID.startsWith("gold") ==false

You can cut/paste the Condition or build it using the following steps:

Build the If Condition

Add customerID

Click on the Condition and select customerID.

Append dot (.)

Append dot(.) to customerID.

Click just after customerID and select the dot (.) icon.

Append startsWith

Click the second startsWith

Append search parameter

  1. Select String
  2. Enter search parameter (i.e "gold") including the quote.
  3. Hit enter key.

Append == sign

Select the == sign icon

Append false

Select false

Completed If rule

Build the If Condition

Add Invoke

Click Action and select Invoke.

Add Partner

Click Select Partner Link and select CustomerCheckPartner

Add Operation

Click Select Operation and select checkCustomer

Add Input/Output

  1. Click Enter Value (customerID) and select customerID.
  2. Click Enter Value (customerOK) and select customerOK.

Done

Congratulations!! You have successfully completed this Rule set.

No comments: