You are here:
InsClaimService:getRuleLogs
Use this service to retrieve rule logs for a claim, sorted by execution date in ascending order.
Method: InsClaimService
Class: getRuleLogs
How It Works
-
This service retrieves logs by querying the ObjectAppliedResult__c table to see if there are any rows with a RecordId__c corresponding to the target object.
-
If such rows exists, the service transforms the rows and returns to the caller in ascending order according to the AppliedDateTime_c field.
Output JSON
See the following sample of output JSON.
{
"result": [{
"id": "a1a6g00000087E9AAI",
"objectId": "02i6g000000I21EAAS",
"stateTransitionId": "a1Z6g000000HzX1EAK",
"stateTransitionName": "Draft to Submit",
"executionDate": "2020-01-01T00:00:00.000Z",
"results": [{
"id": "a5Q6g0000005vSPEAY",
"name": "Check Auto Year",
"condition": "Auto.Year > 1990",
"message": "Auto year is greater than 1990",
"action": null,
"result": true,
"details": {
"instanceKey": "2002 Toyota Camry"
}
}]
}, {
"id": "a1a6g00000087E9AAL",
"objectId": "02i6g000000I21EAAS",
"stateTransitionId": "a1Z6g000000HzX1EAP",
"stateTransitionName": "Submit to Underwriting",
"executionDate": "2020-01-05T00:00:00.000Z",
"results": [{
"id": "a5Q6g0000005vSPEAZ",
"name": "Check Auto Make",
"condition": "Auto.Make == 'Lexus'",
"message": "Auto is a Lexus",
"action": "Move to Underwriting",
"result": false,
"details": {
"instanceKey": "2002 Toyota Camry"
}
}]
}]
}Rules Description
This JSON includes the following key/value pairs.
Key |
Values |
|---|---|
id |
Id of rule |
name |
Name of rule |
condition |
Rule condition |
message |
Success message if rule condition evaluated true against target object Failure message if rule condition evaluated false against target object |
action |
Name of action executed if rule condition evaluated true |
result |
Result of rule condition evaluation against target object |
details |
Map of information associated with the target object |

