< Previous | Next >

Task 4: Deploy a modified RuleApp using the console

You deploy a RuleApp update and confirm the ruleset update.

About this task

You deploy a RuleApp archive, set up a managed URI, and test the modified ruleset.

Step 1: Deploying a RuleApp archive

About this task

You use the Deploy RuleApp Archive function that is available on the RuleApp view to deploy a new or updated RuleApp archive.

Procedure

  1. In the RuleApps view, click Deploy RuleApp Archive.
  2. Browse to /data/loanvalidation_for_resruleappmngt_modified.jar. The checkAmount rule is updated to check that loan amounts are between 1,000 and 1,000,000.
  3. Because this is an update, click Increment Ruleset minor version.
  4. Click Deploy.

    The deployment report shows that the ruleset version is updated.

Step 2: Setting up a managed URI with XOM resource using the console

About this task

You add a managed URI from the Ruleset view menu bar.

Procedure

  1. Open the Ruleset view of loan_validation_with_score_and_grade/1.1.
  2. Click Add Managed URI.
  3. Select Internal Resource as the URI type , select loan-validation-xom.zip as the resource, and click Add.

Step 3: Testing the modified ruleset

About this task

You use the same test data to verify the updated ruleset.

Procedure

  1. In the Ruleset view, click Retrieve HTDS Description File.
  2. Chose REST as the service protocol type, and OpenAPI-JSON as the format. Select the decision trace information to get more information on the execution.
  3. Click Test.
  4. On the REST Service page, replace the code in order to request a loan for the amount of 999, and to see which tasks are run:
    {  
    "loan": {    
    "numberOfMonthlyPayments": 180,
    "startDate": "2016-10-19T17:27:14.000+0000",    
    "amount": 999,
    "loanToValue": 0.9  },   
    "borrower": {    
    "firstName": "Joe",
    "lastName": "Doe",    
    "birth": "1987-09-29T01:49:45.000+0000",    
    "SSN": {      
    "areaNumber": "424",      
    "groupCode": "56",
    "serialNumber": "7942"    
    },    
    "yearlyIncome": 50000,    
    "zipCode":
    "95372",    
    "creditScore": 6000,    
    "latestBankruptcy": {      
    "date": "2014-09-18T23:18:33.000+0000",      
    "chapter": 3,      
    "reason": "Summer loss"    
    }  
    },  
    "__TraceFilter__": {    
    "infoRulesetProperties": false,    
    "infoOutputString": false,    
    "infoInputParameters": false,
    "infoOutputParameters": false,    
    "none": false,
    "infoExecutionEventsAsked": false,    
    "workingMemoryFilter": "string",
    "infoBoundObjectByRule": false,    
    "infoExecutionDuration": false,
    "infoExecutionDate": false,    
    "infoExecutionEvents": false,
    "infoInetAddress": false,    
    "infoRules": false,    
    "infoRulesNotFired": false,    
    "infoSystemProperties": false,    
    "infoTasks": false,
    "infoTasksNotExecuted": false,   
    "infoTotalRulesFired": false,
    "infoTotalRulesNotFired": false,   
    "infoTotalTasksExecuted": true,
    "infoTotalTasksNotExecuted": false,    
    "infoWorkingMemory": false,
    "infoRulesFired": false,    
    "infoTasksExecuted": true,
    "infoBoundObjectSerializationType": "ClassName"  
    }
    }
  5. Click Execute Request.
  6. Check the Server Response:
    • In the decision trace, you see that three tasks were run: Information, initResult, and validation. The execution stopped after the validation task.
    • In the report, you see that the loan was not approved, and the message [ "The loan cannot exceed 1000000 and cannot be less than 1000" ].

What to do next

In the next task, you use an Ant task to deploy and fetch a RuleApp archive.
< Previous | Next >