Digital Exchange

Expand all | Collapse all

Getting Object reference not set to an instance of an object when we invoke http request from BluePrism tool

  • 1.  Getting Object reference not set to an instance of an object when we invoke http request from BluePrism tool

    Posted 08-22-2019 12:01

    I have done configuration in Blueprism RPA tool to invoke REST POST Call.

    I am getting following error when I ran it .

    'Could not execute code stage because exception thrown by code stage: Object reference not set to an instance of an object.'.

    Please let me know why we get this error and let me know if you need more information about the issue.

    --------------------------------------------------
    Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by manzur.


  • 2.  RE: Getting Object reference not set to an instance of an object when we invoke http request from BluePrism tool

    Posted 09-18-2019 18:39
    The most likely reason for the exception is that something in your code stage is null. Without seeing the code itself, it is hard to know where the issue would be.

    I would suggest executing the API call with a tool like Postman (https://www.getpostman.com/) first to make sure the API call you are creating works properly. Then try running the code you have written in Visual Studio. It is likely that Visual Studio will point out the same error and will reveal which line or object is the issue. When the code works in Visual Studio, you should be able to move it over to your Blue Prism Code Stage.

    Alternatively, depending on which version of Blue Prism you are using, you can use the Web API function to configure your REST API call (System > Objects > Web API Services). This would remove the need to use a code stage to execute API calls.

    Cheers. 

    ------------------------------
    Charles Kovacs
    Developer Consultant
    Blue Prism
    America/Chicago
    ------------------------------