Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

async call using InvokeHTTP


I have an InvokeHTTP processor that calls a long running process.


The long running returns an id when called. to check if the long running process ends, I have to call another API with the returned id as argument. If the returned json contains a keyword "completed", I can call another API to get results. 


I would like to know how to manage this?




I found this little trick but i need some help to understand why it does not work good.

I have a json coming as response from an InvokeHTTP like this:

   "id": "1234567890",
   "status": "completed",
   "others": "abc",
   "field": "1"

I would like to use a processor (maybe RouteOnAttribute??) that checks if the status of the response is completed and in case of un-match, it goes back to the invokeHttp to check status again.

I tried this thing: EvaluateJsonPath(to extract id from json) -> InvokeHTTP(to get status) -> RouteOnAttribute(to check status if completed)

  • -> match goes to a funnel
  • -> unmatch goes to EvaluateJsonPath again (to create a loop)

For the InvokeHTTP I need the original json file since I have to get the request id.

I used Route to property name with the following attribute: status - ${status:equals('completed')}

unfortunately, I always receive an un-match even if the status is completed.

Where is the issue?


It seems that you were able to split the problem in the two key steps:

1. Define the attribute

2. Route on the attribute


First question: Is defining the attribute succesful? Please check your message in the queue directly after doing this evaluatejsonpath. Look carefully (not sure if it is case sensitive/what it does with quotes).


Second question: Are you able to make any attribute based routing work? Perhaps just try some things till anything works and see what the difference is with your flow. The only thing I could think of are trivial points such as case sentivity (maybe), or extra quotes/spaces. You may try something even simpler like route if it contains the letter c, for your first test.

- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.