Hi Team,
Is there a way to get the ‘Edit Meta Information…’ -> ‘Comments’ data of the workflow from a node’s model code in which it is part of?
Thanks
Ravikiran
Hi Team,
Is there a way to get the ‘Edit Meta Information…’ -> ‘Comments’ data of the workflow from a node’s model code in which it is part of?
Thanks
Ravikiran
It looks like the information you want can probably be accessed through the org.knime.core.util.workflowalizer.WorkflowMetadata
class. I think you need to get to that via the static reader method org.knime.core.util.workflowalizer.Workflowalizer#readWorkflow(Path)
.
You can get to the path of the workflow from its WorkflowContext
- within the NodeModel
implementation, something like:
NodeContext nodeCtx = NodeContect.getContext();
WorkflowManager wfm = nodeCtx.getWorkflowManager();
WorkflowContext wfCtx = wfm.getContext();
Things to note:
WorkflowManager
for the containing workflow, for example if the node instance is in a metanode, subnode, wrapped metanode etc.Steve
Hi Steve,
Thanks a lot for the pointers.
Ravikiran