-1

I have a JavaComputeNode with java class that i use in other subflows. So for me is interesting if it is right to wrap this node in one subflow instead of creating it separately in each place and connect with same java class. Is it right to create a subflow with only one node?

JoshMc
  • 10,239
  • 2
  • 19
  • 38

1 Answers1

2

If the subflow is in the same application and only has that one node with the terminals of the node wired to the subflow input and outputs directly, than I wouldn't create a subflow, because it is not adding anything.

To justify a subflow, it would need to have something, that it adds to the node, like error handling logic or logging, or even just rewiring terminals.

It might also make sense to put the node in a subflow, if you plan to put that subflow in a library, for example because you want to version it separately, and especially if you plan to put your subflow in a shared library.

Attila Repasi
  • 1,803
  • 10
  • 11
  • if i decide to change something like name of node or even replace javacomputeNode to other node which will give me same logic - isn't it better to make this change only in one subflow instead of several places where i used this javacomputenode. i am new to ibm so maybe i feel wrong about right coding in ibm. – Isa Verdiyev Aug 11 '20 at 20:22
  • I guess you are right, but I don't see such changes needed a lot. – Attila Repasi Aug 13 '20 at 10:42
  • It is definitely a better solution to put it in a subflow. Later on, you might want to add some user defined properties, and this would be a lot easier and cleaner with a subflow. Of course, if you don't use it at multiple place, it is pointless. Do it only if it's part of a library. – jdel Aug 18 '20 at 12:46