Lookup Function in Dataweave
Success Response:?
?Step 1: ?Here we define the main flow with set payload which has payload ‘ Muleys’.
Step 2:? Define lookup function in? ‘Calling TargetFlow’ as below:
Step 3: ?Create a targetFlow where we concate upcoming payload (Muleys) with ‘Hello’ payload.
Step 4: After execution, we get success response as? below:
Error Response:
Step 1: For error, here we added wait for 2 seconds to stop execution of flow(targetFlow) as default timeout is 2 seconds.
Step 2: After execution,getting timeout as below:
Step 3:? To increase the execution time of targetFlow, here we define timeout to 3 seconds using the third parameter of the lookup function and get a successful response.