I made a very simple custom function that calculates a result based on a single input value.
When I call this function twice in a row and then try to access both results (single result from each invocation) then both results are the same, even though they definitely should not be.
Illustrative screenshot attached.
EDIT: There are two workarounds for now:
– Remove the custom function and just use it’s original child nodes everywhere instead
– Put Cache node in between the two invocations and cache the first result. This will effectively save two different results as expected instead of getting last invocation result everywhere.
Yes I am certain. By multiple manual validations, debugging and especially after adding simple cache in-between the two invocations to hold the result of the first one fixed the problem.
You can find the custom function code in the attached screenshot.
Repro steps should be:
Create custom function that takes one argument (to vary the result by) and returns a value based on the argument
Insert new invocation node for said function in your graph
Repeat the previous step (2)
Make sure both calls get a different input value
Lead a flow from first node to the second and then log the results taken directly from both nodes into a console
Observe that both results are the same. Even though they should not be.