Unlinked shared component won't get shared again

Hi

I have created a component. After sharing it (locally for now), I figured, it would be good to have an additional out port. As this is not possible for what ever reason, I followed a forum recommendation to unlink, make my changes and share again. But it won’t let my share it. I attached a clip on the sharing steps I take. What am I doing wrong?
2023-10-20 22-41-56.log (2.1 MB)

Well, the uploaded file is NOT a log file. You might have to change its suffix back to mkv to make it play. I had to do this, as mkvs (or any video formats) are not supported in the upload dialogue, for what ever reason.

I think about fiddling with the export source. I did that successfully for changing the type of an import port, but :shushing_face: don’t tell anyone.

1 Like

Hi @Thiemo.Kellner ,
Thanks for posting!
we are looking into it.
For now, I will link here another thread from you with the solution you have found: Adding ports to shared components the wicked way
Best,
Daria

Hi @darspir
Thanks for taking this on.
Kind regards
Thiemo

In relation to post like Unlinked shared component won't get shared again , I coughed up this solution.

Disclaimer: You will follow these line at your own risk!

  1. Find a sample of an input port in your preferred editor, e.g. exporting a dummy component with an out port of desired type, unpack the knar (should be an ordinary zip file), e.g.
     <config key="factory_settings">
         <config key="port_0">
             <entry key="index" type="xint" value="0"/>
             <config key="type">
                 <entry key="object_class" type="xstring" value="org.knime.core.node.BufferedDataTable"/>
             </config>
         </config>
     </config>
    
  2. Export the shared component to get fiddled with. If you do not take precautions by backing up, do not hold me responsible for losses.
  3. Uncompress the knar and find the setting.xml of your component output.
    grafik
  4. Locate the model config element. Increment the value attribute of the array-size entry element of the port-names and port-descriptions element and add a new entry in both.
    grafik
  5. Locate the factory_settings element, e.g.
     <config key="factory_settings">
         <config key="port_0">
             <entry key="index" type="xint" value="0"/>
             <config key="type">
                 <entry key="object_class" type="xstring" value="org.knime.core.node.port.flowvariable.FlowVariablePortObject"/>
             </config>
         </config>
     </config>
    
  6. Duplicate an existing port element and adapt the port and index number
     <config key="factory_settings">
         <config key="port_0">
             <entry key="index" type="xint" value="0"/>
             <config key="type">
                 <entry key="object_class" type="xstring" value="org.knime.core.node.port.flowvariable.FlowVariablePortObject"/>
             </config>
         </config>
         <config key="port_1">
             <entry key="index" type="xint" value="1"/>
             <config key="type">
                 <entry key="object_class" type="xstring" value="org.knime.core.node.port.flowvariable.FlowVariablePortObject"/>
             </config>
         </config>
     </config>
    
  7. In your new port element, adapt the value attribute of the object_class entry element of the type config element of your new port element with the one in your sample of step 1, e.g.
     <config key="factory_settings">
         <config key="port_0">
             <entry key="index" type="xint" value="0"/>
             <config key="type">
                 <entry key="object_class" type="xstring" value="org.knime.core.node.port.flowvariable.FlowVariablePortObject"/>
             </config>
         </config>
         <config key="port_1">
             <entry key="index" type="xint" value="1"/>
             <config key="type">
                 <entry key="object_class" type="xstring" value="org.knime.core.node.BufferedDataTable"/>
             </config>
         </config>
     </config>
    
    grafik
  8. Compress the whole export folder, zip or tar.gz will do as of writing - you should not have to rename to knar suffix
  9. Import the new archive into the correct workflow group. You might need to rename or delete the original one.
  10. At least for me, I had to open the shared component from its workflow group (not from the links in the workflows, those are old ones still) to be able to update the link instances. Well, unless you want an unused port, you will to connect it anyway.
    grafik
  11. Update all linked instances in the workflow.

As soon as the data format of KNIME gets changed for this specific sections, you have to adapt the procedure accordingly.

If you find errors or if I did explain poorly, let me know. Or write an addendum.

Cheers and have fun

Thiemo

5 Likes

Hi @Thiemo.Kellner ,
apologies for a late return to this discussion.
I have been testing the following scenario in various versions of KNIME, and I was not able to reproduce the issue. Could you please tell me in which version did you encounter this issue?
What I was doing is: create a component in some wf → share it → unlink it → add extra ports → link it again.

I have also rewatched the video, and, I might be mistaken, but it seems to me that you are inside of the Component “Register UUIDv4… TableIn” and you make changes to this, same, component inserted inside of it. Could it be the case? I tried it in my KAP and it, indeed, did not get shared. I think it is an anticipated behavior, since you are making changes to a component inserted into a component itself (again, if my understanding from the video is correct).

Please, if that is the case, try creating a new WF or using any other WF you have to make edits to a component, i.e.: insert the component → unlink it → make changes → share.
Let me know if that works!
It is an interesting catch I have not seen before :slight_smile:
Have a nice weekend!
Best,
Daria

1 Like

Hi @darspir

Thanks for tackling it. Do not worry about the time passed. I did not need to do it again yet and hope you had I splendid weekend.

I am afraid that I do not know which version it was, as I had an update in the meantime. Is there a support functionality in KNIME like it is in DbVisualizer that gather information about the installation, maybe even runtime specifics in case of a problem?

Be it as it may, yes, I was in mentioned component. However, I cannot follow your concerns. In which other way could I make an unshared component shared if not using the context menu within the containing component (be it wf, be it another component)? To my understanding, a component starts to exist outside the original contain only after being made shared - or whatever the correct English construct is for what I want to express. :wink: The procedure you provided I should try seems to me the one I did from the start. If you provided a clip, I might be able to see where it is different from what I did.

Oh, maybe I see now, what you are refering to. The components are very similarly named. The container’s name ends in TableIn whereas the name of the changed component to be shared ends in VariableIn. Is it possible to recursively nest components, one in itself?

Kind regards

Thiemo

Hi @Thiemo.Kellner ,
thank you for the kind words, same goes to you!
sadly I am personally not aware of the functionality to gather information about installation :frowning: I usually just look the version up in the moment it happens :grin:

Regarding the component yes, you are completely right, you need to use the context menu. I think I was indeed confused by the names of component which are very similar and I assumed that you open the component → and then inside of the opened component insert the same component and make changes inside of the latter one. But the fact that your names are different eliminates that all.

Regarding nesting of components - should not be a problem, at least in my opinion!
We will discuss this all again internally and get back to you.
Have a nice weekend!
Best,
Daria

2 Likes

Hi @darspir

With respect to the support functionality collection installation details, I was thinking about side effects plugins/extensions or the used Java Vm (Python?) can have. I believe this the intension behind the functionality of DbVis. However, I am not at all aware who often side effects are actually the cause of problems.

Kind regards

Thiemo

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