Question

Variable setter value not found in custom transformer


Badge +10
  • Contributor
  • 28 replies

I'm setting a variable via a variable setter as one of the first transformers in my workspace (after an sql creator) so I'm sure the variable is set.

However when fetching that same variable downstream in the workspace in a custom transformer (or a custom transformer in a custom transformer).

The value is empty. I'm pretty sure that the variable name in setter & retriever is exactly the same (see screenshots). I've tested it by setting the first transformer in my custom transformer to be the VariableRetriever, but the output is empty.

I don't cache the data so it's not related with data caching. If I do a VariableRetriever in the main it finds the variable. When I do it in a custom transformer it doesn't find it. What am I overlooking? In other workspaces this works without an issue

VariableRetrieverVariableSetter


3 replies

Badge +9

Have you tried putting a VariableRetriever outside your custom transformer? I have had instances that the connection between variables has been broken which resulted in irretrievable values. If the VariableRetriever outside the custom transformer is also unable to get the value then you need to delete both the VariableSetter and the Retreiver, insert them again and then choose a different variable name.

Badge +10

Have you tried putting a VariableRetriever outside your custom transformer? I have had instances that the connection between variables has been broken which resulted in irretrievable values. If the VariableRetriever outside the custom transformer is also unable to get the value then you need to delete both the VariableSetter and the Retreiver, insert them again and then choose a different variable name.

When the retriever is outside the custom transformer it does find the variable and corresponding value.

Tried your workaround deleted both Setter and retriever but no solution

Badge +2

@tva​ Try starting with a small example like the one attached (FME 2022.2) and see what you have to do to break it (or alternatively simplify your existing workflow.) But I think you might need to file a support case with your local FME provider and have then walk through your workflow.

Reply