This is a recurring problem I have. I’m creating a component with config options. one or more of the configurations might have already bean set in the containing workflow and should automatically be reused.
I can’t set the config node to a flow variable because if it doesn’t exist, the component will fail.
java snippet also forces me to check the “replace” option or not so I can’t set a default value that way either? How can one check for existence of a flow variable?
I finally came up with a simple solution for the problem. simply use Merge Variable and the top input comes from the component input node directly. So any value already set then takes precedence over what is configured on the component directly.