cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WorkFlow - stop if no data was retrivied from the API

Good morning community,

 

I'm using workflow to retrieve data from D365 and then push it to Dynatrace.
Sometimes the call to the api doesn't provide any data and push_log_to_dynatrace step will fail. (see image)

y_buccellato_0-1732782164819.png

I was wondering: how can I put a condition that stop the flow if no data was retrieved from the API?

Regards

 

4 REPLIES 4

Peter_Youssef
Leader

Hello @y_buccellato 

PFA resource for further details:

Hoping it helps.

BR,

Peter

Unfortunately no, but I appreciate your help.

Condition should be "if you have no value in the array then gracefully stop the execution" and I don't find a practical reference to do that.

I revert back to using Power Automate which has an extensive documentation and use case already covred.

Thank you 

 

christian_kreuz
Dynatrace Advisor
Dynatrace Advisor

You can use Task Conditions to enable/disable a Task based on a previous task. In this particular case, you can use the length filter.

For example, on the task post_log_into_dynatrace, switch to Conditions, and try out the following expression in the "And custom condition was met" field:

{{ result("d365_masterdata_intmat").json.value | length > 0 }}

christian_kreuz_0-1733482885708.png

This should lead to this specific task not being executed when the result is an empty list.

christian_kreuz_1-1733482920111.png

 

 Hope this helps!

Hi @christian_kreuz 

Appreciated attempt.

BR,

Peter

Featured Posts