We're using an ExtractVariables to set some variables, which works fine. However any existing variables are being hidden in the trace tool, although I can still reference them in later policies. I also noticed that if I try to extract an existing variable to create a new variable, then the existing variable will show in the trace tool.
Anybody know what's going on here?
Solved! Go to Solution.
We're using an ExtractVariables to set some variables, which works fine. However any existing variables are being hidden in the trace tool, although I can still reference them in later policies.
Let's separate the two issues here - issue 1: reading and writing (setting) variables, issue 2: seeing variable values in the Trace UI.
Regarding issue 2: The Trace UI works by displaying a list of variables that have been read or written during the given step. You should not expect to see displayed in the Trace tool, every variable that is available in the message context. There are lots of variables. Only the ones the selected policy READS or WRITES will appear in the Trace UI. If you select the next policy, the Trace will show only those variables that the new policy reads or writes. This will be a different set of variables.
Regarding issue 1: If you use ExtractVariables to extract something out of a payload, the policy will READ the payload and then WRITE the variables it successfully extracts.
Combining streams: if you use ExtractVariables, then the Trace ui will show a READ of the existing variable you used as a source (maybe message.content, maybe something else) , and a WRITE of any variables extracted from that source.
Do take note that the WRITE operation in Trace will show a = sign to the left of the value, while a READ operation will not.
This behavior in trace (showing only READ or WRITE , and using the = character to indicate writes) is not special to ExtractVariables. It applies to all policies.