Always default message is giving response

Hi Team,

I have created a Project and Data Model and configured two rows in learned data and default response. but when i am hitting the endpoint along with body always response is coming from Default rule.

I have attached a Project and please let me know where i am doing wrong here.

I have take sample request and response and trying to get some response where "socialSecurityNumber""1111112", "dateOfBirth": "23/05/1988",    "claimId": "222221",and other condition is "socialSecurityNumber": "1111111", "dateOfBirth": "23/05/1988",    "claimId": "222222",and other and fired a request as below:

But i got a response from default response whereas i have mentioned Unspecific11, as per my view it should come from learned data section as i have given is condition to above three fields and remaining fields i have set as ignore in the functions.

Note: This is for my learning purpose all values are dummy only. Please find attached screenshots and project let me know where i am doing wrong here and i have used HTTP Gateway as a agent here and used same port for real and virtual service. when i put in learning mode nothing got captured but when i put in to simulate mode after changing the rules messages count increased bit response came from the default response.

 

http://lp-5cd742bscv:7211/

Given Req1:

{
    "zip""60020",
    "firstName""Avin",
    "lastName""Kumar",
    "treatment""ECG",
    "gender""Male",
    "socialSecurityNumber""1111112",
    "dateOfBirth""23/05/1988",
    "claimId""222221",
    "claimedAmount""10000"
}

 

Expected response1

{
    "reportId""11111",
    "assignedGroupId""111111",
    "dueDate""23/08/2020",
    "fraudType""RepeatedOffender",
    "claimId""222221",
    "riskScore""80"
}
 

Given Req2:

{
    "zip""60020",
    "firstName""Avinash",
    "lastName""Kumar",
    "treatment""ECG",
    "gender""Male",
    "socialSecurityNumber""1111111",
    "dateOfBirth""23/05/1988",
    "claimId""222222",
    "claimedAmount""10000"
}

 

Expected response2

{
    "reportId""11111",
    "assignedGroupId""111111",
    "dueDate""23/08/2020",
    "fraudType""Unspecific",
    "claimId""222222",
    "riskScore""0"
}
 

Default Res:

{
    "reportId""11111",
    "assignedGroupId""111111",
    "dueDate""23/08/2020",
    "fraudType""Unspecific11",
    "claimId""11111",
    "riskScore""0"
}

 

 

MF_FraudDetectionRest.zip
  • Incoming request is not matching your conditions in Learned Data rule. Try to use Simulation Report to find fields, which differ. My guess is it will be something in your HTTPInputParameters, so you can try to ignore them first to see if that helped.