How to set a Configuration node

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?

What’s the best way to handle this?

Hello @kienerj,

Java nodes can check for flow variable existence. Check here for more:

Hope it help!

Br,
Ivan

1 Like

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.

image

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.