Failure in inactive branch

I have a workflow with an empty table switch. From my understanding, nothing which follows the inactive branche of the switch should be executed. But when usind the XLSX Simple component from @takbb in the active branche, it still fails. Here is a minimal example:

grafik
XLSX Failure.knwf (649.7 KB)

If I connect the table with the data, everything works fine.
If I connect the empty table, the switch disables the upper branch (as expected) but the workflow as a whole fails. Something within the component fails. But why is anything executed in this branch?

Hi @masgo ,

As a writer and user of a lot of components, this bug is very frustrating.
I have raised it as an issue. Details below, where @armingrudd kindly responded and raised ticket AP-21669,

I will take a look at my “XLSX Simple Excel Format Apply” component, and see if I can produce a “branch safe” version, which may mean it has slightly reduced functionality.

As you will see from the above post, I discovered that it is specific functionality (directly referencing flow variables in the Component Output node of the component ) that results in this problem. If I can remove/change that then it can be made to work for you.

btw, thank you for trying out the component, and reporting the problem! :slight_smile:

Hi @takbb ,
and thank you for the quick reply. I had a hunch that it might be a Knime bug, since I could not see anything suspicious/obvious within your component.

btw: one improvement to the node, is to add a variable output containing the path varibale of the new file. One can then use this to send the formatted file via mail.

Would it be okay if I copied your component and publish it just with small changes? For me, it would be better to just input the color-codes directly as #123456 instead of using the dropdown. This would also enable to set the colors via a variable.

1 Like

Hi @masgo, feel free to adjust the component as you wish, and of course publish it yourself. Please publish it though with a slightly different name to avoid confusion :slight_smile:

Here is a (beta) Branch safe version

I have also added the flow variable output of the path as the variable “xlsx-out-formatted”

Let me know how you get on with it. I didn’t want to modify the original at the moment without additional testing in case I broke something!

2 Likes

Oh, that was quick. Thank you. Works for my minimal example as well as for my real-world workflow. I will have a look if I encounter any more errors. My flow runs daily but an empty table (which would deactivate the branch) happens only like 1x per week.

1 Like

@masgo I added a +1 to the ticket.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.