Custom PortObjects without Serialization


#1

Hi all,

I noticed some similar question on the forum, yet couldn’t find a complete answer.

I am porting some process mining code to KNIME (similar to the work of the RapidProM framework http://rapidprom.org).
I noticed that each port object needs serialization functionality.
In general, this would hamper the applicability of using KNIME for process mining experiments as the data we use is typically large and takes a while to (de)serialize, however, this is not a huge problem and some solutions seem to exist.
When porting the code however, I am also in need of using various objects which I am inherently unable to serialize (due to all kinds of dependencies etc.).

It seems however that each custom PortObject that I am building needs to be serializable/deserializable by default, and furthermore, when executing the nodes it seems that the PortObjects are in fact serialized.
Is there any way to overcome this, i.e. any base class that I can use that prevents this serialization? i.e. at least when running the workflow itself.

kind regards,

Sebastiaan.


#2

Hi @s_j_v_zelst,
you can configure the classes used for serialization when you register your PortType extension.

. There you need to provide custom serializer implementations for both the PortObjectSpec as well as the PortObject itself. You could add a no-op serializer that does not actually save the PortObject here. This might lead to unexpected behavior when saving and later reopening a workflow though.
best,
Gabriel