Multiple Custom Function invocations in a row all return the same result

Forums 💬 FlowCanvas ⚙️ Support Multiple Custom Function invocations in a row all return the same result

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12103
    goor
    Participant

      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.

      #12107
      Gavalakis
      Keymaster

        Hello,

        Hmm. Are you certain that the two HitInfo provided in the nodes input are not the same HitInfo? (I can’t really see that from the screenshot)

        Can you also post the code of your node here please?

        Thanks!

        #12106
        goor
        Participant

          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:

          1. Create custom function that takes one argument (to vary the result by) and returns a value based on the argument
          2. Insert new invocation node for said function in your graph
          3. Repeat the previous step (2)
          4. Make sure both calls get a different input value
          5. Lead a flow from first node to the second and then log the results taken directly from both nodes into a console
          6. Observe that both results are the same. Even though they should not be.
          #12105
          goor
          Participant

            Here is a very simple repro graph

            #12104
            Gavalakis
            Keymaster

              Hello and sorry for the late reply.

              I just want to let you know that this is now fixed and the fix will be there in the next version update 🙂

              Thank you!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.