Hi, I'm developing with knime-2 api and derived my port object from AbstractPortObject:
public class SeesarPortObject extends AbstractPortObject { public static final PortType TYPE = new PortType(SeesarPortObject.class); public static final PortType TYPE_OPTIONAL = new PortType(SeesarPortObject.class, true); :
Everything works fine in knime-2.x, but in knime-3.1, when trying to save an executed workflow with a node that has such a port type as output, I get the following error in knime.log:
2016-06-22 09:32:18,384 : DEBUG : ModalContext : SaveWorkflowRunnable : : : Could not save workflow java.util.NoSuchElementException: No value present at java.util.Optional.get(Optional.java:135) at org.knime.core.node.FileNodePersistor.savePortObject(FileNodePersistor.java:1425) at org.knime.core.node.FileNodePersistor.savePort(FileNodePersistor.java:1389) :
I have seen that built-in port objects like ImagePortObject were updated for knime-3 api to use the PortTypeRegistry:
public static final PortType TYPE = PortTypeRegistry.getInstance().getPortType(ImagePortObject.class);
And, when looking into the PortTypeRegistry's method getObjectSerializer(), there is a special legacy handling to deal with knime-2 PortTypes, and there another special treatment of AbstractSimplePortObject, but no special handling of AbstractPortObject.
My question: Has anybody else got similar problems with nodes using AbstractPortObject developed in knime-2 and using in knime-3?
Best regards, Frank