Which method should call to open the specified workflow ?

I want to design a node, it has the following features:

When I excute to this node, it will automatically jump to a specified workflow .

Who can provide some hints? Which method should call to open the specified workflow ?


You should really think carefully if you want to have a node open a workflow upon execution. Ideally a node just processes some data but doesn't do anything to the workbench itself. Also, the Node API was designed to disallow access to the workflow or the entire application.

Having put up the disclaimer: If you wanted to hijack our node API and do crazy stuff you should look at

  • org.knime.core.node.workflow.NodeContext.getContext() - a static method that will tell you what workflow the currently executing node is part of. It will also link up the workflow itself (+ its location)
  • org.knime.workbench.explorer.view.ExplorerView.openEditor(ContentObject)
    (part of bundle org.knime.workbench.explorer.view)
    You can still code from it that shows you how to programmatically open a workflow given its location on the (explorer) file system.

Good luck!