Java Snippet - bug or user error?

Hello fellow KNIMErs

I hope you have all had a good summer break / holiday.

It is going to be a user error!

I have found a different node (Math Formula (Variable)) to do the job I want. This is not a request to help me solve a problem. This is a request to help me understand why the Java Snippet node is doing what it is doing.

Details

I am on KNIME AP 5.3.2.

Here is a sample of my flow:

hub.knime.com

As you can see, I have a Counting Loop Start node and I have configured it to three loops. In the Java Snippet I created a flow variable that took the currentIteration flow variable and added 12 and created a new flow variable.

When I execute the node i get -1 as the output:

If I change the Java Snippet code to

out_SheetIndex = 120000 + v_currentIteration;

I also get an output of -1. I have tried these code snippets too:

out_SheetIndex = (int)12 + v_currentIteration;
out_SheetIndex = v_currentIteration + (int)12;

My question is why does this happen?

Frank