Connector call passed Null values even though parameters are set to ‘required’

  • Deniz
        8 months ago #44405

        Recently a connector call passed Null values to our database, which should not happen with this call.
        I have a script that runs before the call which checks if certain variables have a value. This script did not trigger an error, which leads me to believe that the values were lost after this script ran.
        As an additional preventive measure this connector call has it’s input parameters set up as ‘required’, but it did not prevent empty values from being passed on.
        The connector call configuration is attached to this post.

        empty parameters

        Attachments:
        You must be logged in to view attached files.
        Armin Winkler
            Has successfully completed the online course Introduction
            Has successfully completed the online course Intermediate (200)
            Has successfully completed the online course Advanced (300)
            Has successfully completed the online course Basics (100)
          8 months ago #44495
          Up
          1
          Down
          ::

          Hi Deniz,

           

          in the Monitoring of Simplifier parameters are shown as being ’empty’ if you either didn’t include them in your payload object at all (assuming you are executing the connector call from a server-side business object function), if you explicitly set the value for that parameter to undefined or if you set it to null instead. All of those cases would have been caught and prevented indeed by Simplifier’s built-in datatype validation, had you actually activated it. To do so, you need to activate the switch to the right of ‘Validate Parameters against Data Types’ in the connector call configuration dialog. Right now, in your configuration that validation is turned off, therefore it was possible for non-defined or null values to be passed through.

           

          I hope this solves your problem, please let us know!

           

          Kind regards,

           

          Armin

          Deniz
              8 months ago #44540
              Up
              0
              Down
              ::

              Thank you very much, I now enabled the datatype validation for this call.
              One question though: If datatype validation is enabled and a parameter is moved to optional, does that still trigger an error when this parameter is empty?

              Daniel Bieberstein
                  Has successfully completed the online course Introduction
                  Has successfully completed the online course Intermediate (200)
                  Has successfully completed the online course Advanced (300)
                  Has successfully completed the online course Basics (100)
                  Has successfully completed the online course Advanced (310)
                  Has successfully completed the online course Advanced (320)
                8 months ago #44672
                Up
                0
                Down
                ::

                Hi Deniz,

                once the parameter is marked as optional the connector call will still be executed if this parameter is empty, even when the validation is active.

                Best regards,
                Daniel

              Viewing 4 posts - 1 through 4 (of 4 total)

              You must be logged in to reply to this topic.