Creating the Rule Flow
Use
You use the rule flow editor to sequence the steps to determine the eligibility of an applicant for the credit card he/she applied for.
Procedure
-
In the Project Explorer view, expand the creditcard_rules node, the Rules Modeling node, the Check_CreditCard_Eligibility node, the Rule Flows folder and double-click the Main Flow node.
In the Rule Flow editor that appears, you should see the Start and End points by default.
-
Delete the connector connecting the Start and End points.
-
In the Palette , choose the following flow elements and drag and drop them in the Rule Flow editor:
-
Exclusive Choice Gateway
-
2 Decision Tables
-
3 Rule Scripts
-
-
Choose the decision table element and in the Properties view, in the drop down menu, choose Standard Card Eligibility Table .
-
Choose the second Decision Table element and in the Properties view, in the drop down menu, choose Gold Card Eligibility Table .
-
Save the changes.
-
Choose a rule script and in the Properties view, in the drop down menu choose Check Platinum Card Eligibility .
-
Choose the second rule script and in the Properties view, in the drop down menu choose Check Standard Card Eligibility.
-
Choose the third rule script and in the Properties view, in the drop down menu choose Check Gold Card Eligibility .
-
Save the changes.
-
Choose the exclusive choice gateway and in the menu that appears, choose the Create Connection icon and drag and drop the connection into the Standard Card Eligibility Table element.
-
Create connections from the exclusive choice gateway to the Gold Card Eligibility Table element and Check Platinum Card Eligibility element
-
Create connection from Standard Card Eligibility Table to Check Standard Card Eligibility
-
Create connection from Gold Card Eligibility Table to Check Gold Card Eligibility
-
Create connections from Check Standard Card Eligibility , Check Gold Card Eligibility and Check Platinum Card Eligibility to End point.
The result must be as follows:
-
Choose the exclusive choice gateway and in the Properties view and choose the Conditions tab.
-
In the table that appears, double-click the first cell in the Name column and enter Standard Type .
-
In the Condition column, double-click the first cell and edit the default rule condition:
-
Choose the LHS value and in the drop down menu, expand the CreditCard node and choose CardType .
-
Leave the comparator: Equals as it is.
-
Choose Default after the comparator and in the drop down menu expand the CardType node and choose Standard .
-
Press Alt + Enter to close the editor.
-
Save the changes.
-
-
In the table, double-click the second cell in the Name column and enter Gold Type
-
In the Condition column, double-click the second cell and edit the default rule condition:
-
Choose the LHS value and in the drop down menu expand the CreditCard node and choose CardType .
-
Leave the comparator: Equals as it is.
-
Leave the value: Gold after the comparator as it is.
-
Press Alt + Enter to close the editor.
-
Save the changes.
-
-
In the table, double-click the third cell in the Name column and enter Platinum Type
-
In the Condition column, double-click the third cell and edit the default rule condition:
-
Choose the LHS value and in the drop down menu expand the CreditCard node and choose CardType .
-
Leave the comparator: Equals as it is.
-
Choose Gold after the comparator and in the drop down menu expand the CardType node and choose Platinum .
-
Press Alt + Enter to close the editor.
-
Save the changes.
-
The result must be as follows:
The rule flow must be as shown below:
Next Step