For the ride bookin app i need to stop the execution of 'End Ride' api once i receive the status as 'COMPLETED' in response.Currently I am using while controller but that enters infinite loop. API Response: {"id":3820,"status":"COMPLETED","rider":{"id":2019,"firstname":"test","lastname":"rider","phoneNumber":"9000000124","email":"Test_rider_10002@popp1.com","rating":5.0,"user":{},"fullName":"test rider"},"startLocationLat":36.10805389068134,"startLocationLong":-115.16570490025539,"endLocationLat":36.10805389068134,"endLocationLong":-115.16570490025539,"startAddress":"73 South Martin Luther King Boulevard","endAddress":"920 West Bonanza Road","start":{"address":"73 South Martin Luther King Boulevard","zipCode":"89106"},"end":{"address":"920 West Bonanza Road"},"surgeFactor":1.00,"driverPayment":"4.00","requestedCarType":{"title":"STANDARD","carCategory":"REGULAR","plainIconUrl":"https://media.ride-vegas.com/regular.png","configuration":"{"skipRideAuthorization": false}"},"requestedDriverTypes":[],"freeCreditCharged":"0.00"}
This is the JSON and it is validated correctly over https://jsonlint.com/ . I need to execute the END RIDE API only once when the status is COMPLETED .Is there any way wherein i can do so?
1条答案
按热度按时间f87krz0w1#
1.将返回此JSON的请求放在While控制器下
1.添加JSON Extractor作为请求的子项,并按如下所示进行配置:
1.使用以下__jexl3()函数作为While控制器的条件:
1.就是这样,While Controller将运行它的子变量(ren),直到
status
变量不会变为COMPLETED