Show TOC

Procedure documentationCreating the Rule Scripts Locate this document in the navigation structure

Procedure

  1. In the Project Explorer view, expand the creditcard_rules node and in the context menu of the Check_CreditCard_Eligibility node, choose New Rule Script.

  2. In the dialog box that appears, enter Check Standard Card Eligibility in the field and choose OK.

  3. Create two more rule scripts as follows:

    • Check Gold Card Eligibility

    • Check Platinum Card Eligibility

    In the Project Explorer view, when you expand the Check_CreditCard_Eligibility node and the Rule Scripts folder, you should see all the relevant rule script nodes.

  4. Save the changes.

Editing the Check Standard Card Eligibility Rule Script
  1. Double-click the Check Standard Card Eligibility node.

  2. In the rule script editor that appears in the Actions section, choose the Add icon and in the drop down menu choose If-else if

    The If-else if block appears.

  3. Edit the default condition: Operation.isSuccessful Equals true as follows:

    • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the CreditCard node and choose Applicant Age.

    • Choose the comparator: Equals and in the drop down menu choose Greater Than Equals.

    • Choose the RHS value: 0 and enter 21 in the inline text box.

Choose the Add icon and add another condition and edit as follows:

  • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the Definitions node and choose CreditScore.

  • Choose the comparator: Equals and in the drop down menu choose Greater Than Equals.

  • Choose the RHS value: 0 and in the inline text box enter 54.

  • Under the Then section, choose the Add icon and in the drop down menu that appears, expand the Execute node, the CreditCard node and choose Set Applicant Eligibility = {String}.

  • Choose {String} and in the inline text box enter Is Eligible for Standard Credit Card.

  • Choose <Add Else> and in the drop down menu expand the Execute node, the CreditCard node and choose Set Applicant Eligibility = {String}

  • Choose {String} and in the inline text box enter Is Not Eligible for Standard Credit Card.

Editing the Check Gold Card Eligibility Rule Script
  1. Double-click the Check Gold Card Eligibility node.

  2. In the rule script editor that appears in the Actions section, choose the Add icon and in the drop down menu choose If-else if

    The If-else if block appears.

  3. Edit the default condition: Operation.isSuccessful Equals true as follows:

    • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the CreditCard node and choose Applicant Age.

    • Leave the comparator: Equals as it is

    • Choose the RHS value: 0 and enter 25 in the inline text box.

Choose the Add icon and add another condition and edit as follows:

  • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the Definitions node and choose Credit Score.

  • Choose the comparator: Equals and in the drop down menu choose Greater Than Equals.

  • Choose the RHS value: 0 and in the inline text box enter 51.

  • Under the Then section, choose the Add icon and in the drop down menu that appears, expand the Execute node, the CreditCard node and choose Set Applicant Eligibility = {String}.

  • Choose {String} and in the inline text box enter Is Eligible for Gold Credit Card.

  • Choose <Add Else> and in the drop down menu expand the Execute node, the CreditCard node and choose Set Applicant Eligibility = {String}

  • Choose {String} and in the inline text box enter Is Not Eligible for Gold Credit Card.

Editing the Check Platinum Card Eligibility Rule Script
  1. Double-click the Check Platinum Card Eligibility node.

  2. In the rule script editor that appears in the Actions section, choose the Add icon and in the drop down menu choose If-else if

    The If-else if block appears.

  3. Edit the default condition: Operation.isSuccessful Equals true as follows:

    • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the CreditCard node and choose Applicant Age.

    • Choose the comparator: Equals and in the drop down menu choose Greater Than Equals.

    • Choose the RHS value: 0 and enter 25 in the inline text box.

  4. Choose the Add icon and add another condition and edit as follows:

    • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the CreditCard node and choose Total Assets of Applicant.

    • Choose the comparator: Equals and in the drop down menu choose Greater Than Equals.

    • Choose the RHS value: 0 and enter 1500000 in the inline text box.

  5. Add another condition and edit as follows:

    • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the CreditCard node and choose Credit History of Applicant.

    • Leave the comparator: Equals as it is.

    • Choose the RHS value: Default Value and enter GOOD in the inline text box.

  6. Add another condition and edit as follows:

    • Choose the LHS value: Operation.isSuccessful and in the drop down menu expand the CreditCard node and choose Annual Income of Applicant.

    • Choose the comparator: Equals and in the drop down menu choose Greater Than Equals.

    • Choose the RHS value: 0 and enter 250000 in the inline text box.

  7. Under the Then section, choose the Add icon and in the drop down menu that appears, expand the Execute node, the CreditCard node and choose Set Applicant Eligibility = {String}.

  8. Choose {String} and in the inline text box enter Is Eligible for Platinum Card.

  9. Choose <Add Else> and in the drop down menu expand the Execute node, the CreditCard node and choose Set Applicant Eligibility = {String}

  10. Choose {String} and in the inline text box enter Is Not Eligible for Platinum Credit Card.