cancel
Showing results for 
Search instead for 
Did you mean: 

How to acknowldge for a web service response

DilipK
Level 3
Hi,

Blue prism object is exposed as a web service. Third party application consumes the web services and insert a  required data.

Example:

<s:element name="SourceSystem" type="s:string">
<s:element name="ServiceName" type="s:string"/>
<s:element name="ReferenceNo" type="s:string"/>

Lets assume it sends the above  information which is required  to process the bot . The requests are loaded to the queue and then processed on by one.

As soon as the item is loaded in to the queue , I have to sent the acknowldment  to source system( third  party application). This can be achieved by the sending the item id and sucess message in END stage as ouputs after ADD to Queue opearation.

My question: Do we have any other approach to send the acknowldgment  for the respectie cases? Please advise

Regards,
Dilip K
4 REPLIES 4

Hi Dilip,

Several considerations go into designing a http based service calls such as Blue Prism Web Services.
In your case it appears you have a synchronous design. This means the sender (Third party app) also requires a acknowledgement in the same http call. For this purpose the approach you have taken is perfect.
I would point out that a typical http response acknowledgement of 200 (http status code) is the industry standard way to confirm a success.

On the other hand, if you do a asynchronous operation the approach can be different.
Step 1: Process as a webservice Inserts input data into Queue. Process has no ouput parameter and only sends 200 OK
Step 2: Another process also hosted as a webservice queries the queue and tracks progress as well as processing status and responds with output.


------------------------------
Bimal Sebastian
Consultant
Blueprism
Asia/Kolkata
------------------------------

Hi Bimal,


Thanks for your inputs,


In my web service logic ,I would like to trigger the dynamic scheduler once after added to the queue(Add to Queue) and then send the resposne / ack  in the end stage as output parmaters. There is no way  to send a respsone/ack after added to the queue .


Well this is causing timeout error when you have mutiple requests , I am getting all the requests in BP WORK Q. While sending the response back as ack few are failing due to timeout error. The traget system(web serrvice callling source system) has only 2 mins as a resposne time. within that they have to get all the respsone or else they are getting the error.


Any advise on this part to overcome this?


Regards,

Dilip K





------Original Message------

Hi Dilip,

Several considerations go into designing a http based service calls such as Blue Prism Web Services.
In your case it appears you have a synchronous design. This means the sender (Third party app) also requires a acknowledgement in the same http call. For this purpose the approach you have taken is perfect.
I would point out that a typical http response acknowledgement of 200 (http status code) is the industry standard way to confirm a success.

On the other hand, if you do a asynchronous operation the approach can be different.
Step 1: Process as a webservice Inserts input data into Queue. Process has no ouput parameter and only sends 200 OK
Step 2: Another process also hosted as a webservice queries the queue and tracks progress as well as processing status and responds with output.


------------------------------
Bimal Sebastian
Consultant
Blueprism
Asia/Kolkata
------------------------------

Hi Dilip,

If you are having timeouts, it only means one of two things,
1. The process is too heavy. This means you are doing more than just insert into the queue. In this case, you will benefit from keeping this service as slim as possible so that it runs faster and runs for just one purpose. You will have to avoid data cleanup, validation and other time consuming tasks in this process.
2. Or the other possibility is you have not accounted for concurrency. A blue Prism web service will only honor one http request at a time. Hence if there are multiple requests coming concurrently the rest of the requests may not be honored. Basic rule would be if the process takes 3 secs to execute, then you can support upto 15-20 requests per minute provided the requests are sequentially, but still 1 only 1 request per second. (its all about granularity)

Thanks



------------------------------
Bimal Sebastian
Consultant
Blueprism
Asia/Kolkata
------------------------------

Hello Team,


yes I am almost there.


I have an object exposed as an web service. My object is heavy - once it is added to the queue , I am also triggering dynamic schduler  functionality  to run my main process to run in the same object which is exposed as a web serice . Investigation reports tell that, dynamic scheduler is causing the problem well we have tested it more than couple of times yesterday.

 

Test cases results:

 

Without dynmaic scheduler fucntion:

 

16 cases takes approximately 32 secs

8 cases takes approximately 20 secs

 

With dynamic scheduler fucntion:

 

16 cases takes approximately 8 mins and 34 sec.


However , Thanks for all your help.


Regards,

Dilip K



------Original Message------

Hi Dilip,

If you are having timeouts, it only means one of two things,
1. The process is too heavy. This means you are doing more than just insert into the queue. In this case, you will benefit from keeping this service as slim as possible so that it runs faster and runs for just one purpose. You will have to avoid data cleanup, validation and other time consuming tasks in this process.
2. Or the other possibility is you have not accounted for concurrency. A blue Prism web service will only honor one http request at a time. Hence if there are multiple requests coming concurrently the rest of the requests may not be honored. Basic rule would be if the process takes 3 secs to execute, then you can support upto 15-20 requests per minute provided the requests are sequentially, but still 1 only 1 request per second. (its all about granularity)

Thanks



------------------------------
Bimal Sebastian
Consultant
Blueprism
Asia/Kolkata
------------------------------