Web API - asynchronous processing
Posted: Wed Aug 10, 2022 5:40 pm
Hi again,
I have to create a WEB-API for a customer, which is called from an external webshop to get prices and item availability. So far this works already quite well.
But now there is a special requirement to send a mail automatically if there are any inconsistencies in the determination of the values.
I have learnt from supoort that when the store makes the request, LANSA automatically starts the server routine and sends the response when the server routine ends with ENDROUTINE.
I already made the experience that if I add more instructions after this command (e.g. mail an error message), this leads to a very very noticeable delay in the response.
Can I somehow programmatically trigger the response myself immediately or can I call routines within the Web API server that are executed in parallel?
How can it be feasible with this processing that after the sender of the response - i.e. after the server routine has ended - another function / mthroutine / Reusable Part can be called / started to send mails? I tried to create a server module for this but when I try to use this VL says: the server module is only supported on the web. I thought this is Web...
Does anybody know a way to realize these requirements?
Many thanks in advance,
Jörg
I have to create a WEB-API for a customer, which is called from an external webshop to get prices and item availability. So far this works already quite well.
But now there is a special requirement to send a mail automatically if there are any inconsistencies in the determination of the values.
I have learnt from supoort that when the store makes the request, LANSA automatically starts the server routine and sends the response when the server routine ends with ENDROUTINE.
I already made the experience that if I add more instructions after this command (e.g. mail an error message), this leads to a very very noticeable delay in the response.
Can I somehow programmatically trigger the response myself immediately or can I call routines within the Web API server that are executed in parallel?
How can it be feasible with this processing that after the sender of the response - i.e. after the server routine has ended - another function / mthroutine / Reusable Part can be called / started to send mails? I tried to create a server module for this but when I try to use this VL says: the server module is only supported on the web. I thought this is Web...
Does anybody know a way to realize these requirements?
Many thanks in advance,
Jörg