Skip to main content
April 3, 2023
Question

Is it possible to make a synchronous WebAPI ?

  • April 3, 2023
  • 3 replies
  • 2 views

Hello,

I'm trying to create a POST method WebAPI that waits for its process model to end.

I need to receive a JSON data type, process this data, and return an XML generated with the process model as the WebAPI response, is it possible to process the JSON information received and make the WebAPI wait for the process model to end ?

I know that by the own definition of this method, the process model runs asynchronously, but I don't know any other way of approaching this case.

Any idea will be welcome.
Thanks in advance !

3 replies

stefanhelzle0001
Brainy
April 3, 2023

You can use process chaining to make the process wait to the end of the chain before returning.

abhayd3663
April 3, 2023

As mentioned by Stefen, you can have the activity chaining all the way to your PM and the OnSuccess/OnFailure will wait until the process gets completed. You can also have PV as a flag to get the status etc and can be retrieved within the OnSuccess/OnFailure using fv!provessInfo.

April 17, 2023

Using process chaining, you can make the process wait until the chain is done before returning.

phrazle