ExtractVariables hides existing variables in tracetool

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 Solved
0 5 171
1 ACCEPTED 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.

View solution in original post

5 REPLIES 5

Not applicable

This is an inbuilt behavior. You will notice all the flow variables will not be shown throughout the trace flow but those will be available. You can see the headers in the trace flow. There are multiple flow variables are available, the one which you will use in policies those will show in the rtace.

Thanks for the quick reply. I don't understand "all the flow variables will not be shown throughout the trace flow".

The variables I'm referring to do show in the trace tool, but then they disappear when ExtractVariables is used. In the following screen shot we're using an ExtractVariables policy to create a couple new variables, but in the process the existing ones don't show anymore.

10255-2020-08-25-extractvariables-hiding-existing-variab.png

Are you saying it is inbuilt behavior for ExtractVariables to hide existing variables?

If a variable is not used in your policy then appearing of that in the trace for each policy is not mandatory. But if you use it , it will be available. But you can access that even if its not showing there.

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.

I walked through a trace session paying close attention to the variables and I see what you mean now. Thanks for clarifying.