Automations
All questions related to Workflow Automation, AutomationEngine, and EdgeConnect, as well as integrations with various tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Resolve undefined variables error when evaluating loop expression in workflows

p_devulapalli
Leader

I am trying to create a workflow using a loop task which has a input from a DQL query. The loop task is referenced inside a HTTP request task . I keep getting the below error, looking for advice on what is that I am missing here please

 

Loop task 

 

p_devulapalli_3-1753848548916.png

p_devulapalli_1-1753848424945.png

Error

p_devulapalli_0-1753848342662.png

Unhandled failed task(s) during workflow execution:

monitoringmode_update:
Error evaluating loop expression. Undefined variables: records.

p_devulapalli_2-1753848525974.png

 

 

Phani Devulapalli
2 REPLIES 2

IzabelaRokita
Community Team
Community Team

Hey @p_devulapalli ,

I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you! 😊
Please let me know what works best for you.

gdalessandro
Contributor

I am still having the same issue with my workflow.  I have a json response from a 3rd party api that has a listagent states. I am looping through the agentStates section of the json response and attempting to use a "Ingest Business Event" step to ingest each item in the list as its own event. 

This is the input for the list: {{result("get_nice_agents")["agentStates"]}}
- Dynatrace validates this is a list

The variable name I am setting for each iteration is agentState.  In my "Ingest Business Event" step I am using

{{ _.agentState }} | to_json

To reference the variable value of each iteration. 

I get the following error:

Unhandled failed task(s) during workflow execution:

ingest_business_event_2:
Error evaluating loop expression. Undefined variables: agentStates.


The only place I am referencing "agentStates" is in the loop list definition. 



Featured Posts