Question

Is there a backdoor way of getting my attributes into a custom transformer?

Answer

Description
 


The proper way to use your attributes within a custom transformer is to publish them so a user can set them outside of the custom transformer. See the Published Parameters(Article#: 000001658) article .


However - within the custom transformer definition we're not removing the attributes, just hiding them; so put an AttributeExposer inside a custom transformer and you can expose any attributes you like. Our Workbench developer calls this a 'hack' - if you do this your custom transformer is no longer a generic tool and must only be used in locations where the attributes you are exposing are guaranteed to already exist.


For safety's sake you could also add a NullAttributeReplacer inside the custom transformer to make sure that any attributes you do expose have a valid value (ie it would catch occasions on which the exposed attribute didn't exist inside the main canvas).