I am having an issue using the node Call Workflow Service with DB Session port.
To try the node, I made a workflow (the callee) that simply opens a connection to a DB.
There is another workflow, the caller workflow, that uses a Call Workflow Service node, takes in input the callee path and it is connected to a DB Table Selector.
If I call the workflow service referring to a workflow on the local repository it works fine, but if I refer to a workflow that is on server, the DB Table Selector gives us the following error: “Database connection does not exist. Please reset the corresponding connector node” and it does not allow to select any table.
It seems that the DB session is closed as soon as the callee workflow ends.
Is there a reason for this behaviour?
The DB (and other) authentication connections only pass a reference to the actual connection(/credentials) used. Therefore, if you authenticate on machine 1, and pass this reference to another machine (e.g. an executor), it will not be able to resolve the connection reference and fail.
I’m afraid this is a technical limitation of the call workflow services.
Hi,
thank you for your reply.
When we execute the call workflow service, we do it through the local copy the server makes to execute jobs or through the executor (we do not switch from a machine to another). Plus the callee workflow is located in the server as well, and we call the instance in the current moutpoint of the caller (so both are located in the server).
the local copy (with a yellow bar at the top of the editor) resides in a temporary location on the local client. Therefore, it is on a separate machine as any workflow on the server. You could install the KNIME Remote Workflow Editor extension and then instead of opening a local copy, right-clicking the workflow and select Open > as new Job on Server, but the remote workflow editor is mostly intended to debug workflows running on the server. It may make sense to change the workflow architecture.
I’m afraid there was a misunderstanding: the issue presents itself also if we run the “caller” workflow directly on the executor (by right-clicking it and select “Run on server”).
For more details, please find a screeshot below and the workflow group where we are trying to make the workflow interaction work.
I see, now I fully get you. We have discussed this with our product and development team. While it is possible to connect database port types, these (and e.g. Spark and authentication port types) are not expected to be passed on this way and will fail. I have forwarded the feedback about the use-case, as well as the UX (nothing stopping you from using these port types) internally for consideration.
I’m afraid for now, a different approach is needed. Maybe a sharable component could be considered as workaround? If credential handling is the issue at hand: this is receiving a large overhaul and improvement with KNIME Business Hub.