Develoment/Test SharedNodes

Hello,

I have a question regarding knime server and SharedNodes.

I have two different Workflow Groups (one for development and another for aktive workflows).

The users develop and test there workflows in the development group and later copy them in the active group in order to provide the workflows to other people.

If shared nodes are used now, it can happen that the shared nodes within workflows located in the active group are updated but have never been tested before.

Can I somehow “publish” the shared nodes with some kind of status that they are only available for testing in the develoment workflow group? Or do I have to structure the groups differently? Or is the only way to use a second server instance with a mirrored structure?
image
Thanks for help.

Hey @Tim8200, here’s a couple simple solutions that might work for you:

  • You could add the “environment name” to your component names so that they are distinct and clearly recognizable from each other. For example, “Component” would be “Component (Dev)” and “Component (Prod)”.
  • You could also create workflow groups underneath your SharedNodes workflow group to indicate the environment.
  • If you create workflow groups for each environment, you can restrict publishing rights to certain user(s) to keep the production components safe from editing.

It might look something like this:

image

Hope this helps!

1 Like

Hi @sjporter,
Thanks for the quick reply. That would be a solution. but: all users have to switch the shared nodes in all of their workflows every time. Is it possible to “control” the link of the sahredNodes by using flow variables or somethink like that, so that the user can define the environment (dev, prod etc) at the beginning of the workflow?

Based on your problem description, I believe users would only need to point their workflows to the “Dev” version of a component if they’re making changes to the component or need a feature from it that isn’t available in the “Prod” version yet.

As in, a brand new workflow in the development group could still use “Prod” components.

exactly, so they have to replace the SharedNode (Prod => DEV, do some testing, and then undo the replacement)
but these are lage workflows and e.g. the shared node “document scrubber” is used 15 times in one workflow. so my thought was to control the pointing by using a variable …

What I often do is create a workflow specifically for editing one component in particular. It’ll have the component itself as well as a set of “unit tests”, or various scenarios I can imagine the component being used for. By editing and testing components in this manner, I can typically ensure that any workflow(s) which use my component will still work after the update. It helps keep the functionality of my components independent from the workflow(s) that use them.

In any case, I’m not aware of a way to dynamically switch out components with a flow variable. It’s possible to use a config node such as Boolean Configuration with an If Switch to make a component or workflow traverse one path vs. another based on a user’s selection, which might be closer to what you’re looking for.

Hopefully this helps!

okay… i’ll try it… thanks for the suggestions

1 Like