Capture Web Api Response as process variable for process exposed as a Web Api

Hi All,

I have a created a Process model which writes data into DB and  this is exposed as Web Api. This Web Api is consumed by external system, which sends data to Appian.

The problem is whenever their is error in data, the Api is throwing 500 error to the external system, but when the process model is monitored, the erroneous data which was sent is getting persisted into DB.

Now, my requirement is to capture the response of the Web Api and use it for DB persistence, like if the response status code of the web api is 200 then the DB persistence will happen else process model has to terminate without any data persistence.

Please suggest me a way to capture the web api response in a process variable.

Thanks in advance,

 

Regards,

Someshwar

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer
    If i'm not mistaking your requirement then you probably need to capture the Web Api response which consists of all the data from external application in the form of web api? If that is the case then you can create a process variable with the data type as text and use that variable in the output Result section of x3 node. In such a way that it will hold the value of Request Response.
Reply
  • 0
    Certified Associate Developer
    If i'm not mistaking your requirement then you probably need to capture the Web Api response which consists of all the data from external application in the form of web api? If that is the case then you can create a process variable with the data type as text and use that variable in the output Result section of x3 node. In such a way that it will hold the value of Request Response.
Children