โ05-10-2020 08:29 PM
I need to apply the routing conditions, and based on the matching criteria I have to call SOAP update, create methods:
Criteria 1: ($employee *.empId exists in $employees) && ($employee *.empId == $excelEmp *.empId)
then take $excelEmp and call Update SOAP
Criteria 2: ($excelEmp *.empId exists in $employees) && ($excelEmp *.empId != $excelEmp *.empId)
then take $excelEmp and call Create SOAP
Please help in writing the Router expressions for the above criteria
The below is the json:
[
{
โemployeeโ: {
โempIdโ: โ999โ,
โageโ: โ45โ,
โsalHikeโ: โ15โ,
โdepIdโ: โ285898โ,
โguidโ: โABCโ
}
},
{
โemployeeโ: {
โempIdโ: โ1000โ,
โageโ: โ45โ,
โsalHikeโ: โ15โ,
โdepIdโ: โ285898โ,
โguidโ: โPQRโ
}
},
{
โemployeeโ: {
โempIdโ: โ1001โ,
โageโ: โ45โ,
โsalHikeโ: โ10โ,
โdepIdโ: โ285898โ,
โguidโ: โXYZโ
}
},
{
โemployeesโ: [
โ1000โ,
โ1001โ,
โ1002โ,
โ1003โ,
โ1004โ,
โ1005โ,
โ1006โ
]
},
{
โexcelEmpโ: {
โempIdโ: โ1001โ,
โcurrencyโ: โINRโ,
โnewHikeโ: โ8โ,
โvarPayโ: โ90โ
}
},
{
โexcelEmpโ: {
โempIdโ: โ1002โ,
โcurrencyโ: โINRโ,
โnewHikeโ: โ5โ,
โvarPayโ: โ60โ
}
},
{
โexcelEmpโ: {
โempIdโ: โ1005โ,
โcurrencyโ: โINRโ,
โnewHikeโ: โ6โ,
โvarPayโ: โ90โ
}
},
{
โexcelEmpโ: {
โempIdโ: โ1006โ,
โcurrencyโ: โINRโ,
โnewHikeโ: โ6โ,
โvarPayโ: โ90โ
}
}
]
โ05-11-2020 02:20 AM
could you please attach the slp file having Json Generator, tried to copy the JSON but it fails while validating.
โ05-11-2020 03:43 AM
Hi Anubhav,
Please find the slp file attached
Router-conditions_2020_05_11.slp (15.0 KB)