You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using WorkflowCore in an ASP.NET Core Web API backend and calling publishEvent from a controller. Since the event is processed by the workflow as a background task, I'm unsure what response to return from the controller.
All our steps are short and should finish quickly, so I'm considering whether solutions like polling, long polling, or WebSockets are necessary.
If I send a generic 200 OK response after publishing the event and an error occurs during the execution of a step, how can I inform the front end about this issue? I'm using Angular on the front end and would like to handle this scenario effectively.
The text was updated successfully, but these errors were encountered:
santhanuv
changed the title
Best practices for handling events and error reporting in ASP.NET Core Web API
[Question] Best practices for handling events and error reporting in ASP.NET Core Web API
Jun 24, 2024
I'd definitely return a 200 from that controller if the event published successfully. For dealing with step errors you can either query the status using the DbContext or use WFC's lifecycle events to handle errors more reactively.
Thank you for your response, and I apologize for the long delay in getting back to you. Just to update you, we're currently sending a 200 OK status from the controller.
Hi,
I'm using WorkflowCore in an ASP.NET Core Web API backend and calling publishEvent from a controller. Since the event is processed by the workflow as a background task, I'm unsure what response to return from the controller.
All our steps are short and should finish quickly, so I'm considering whether solutions like polling, long polling, or WebSockets are necessary.
If I send a generic 200 OK response after publishing the event and an error occurs during the execution of a step, how can I inform the front end about this issue? I'm using Angular on the front end and would like to handle this scenario effectively.
Thanks!
The text was updated successfully, but these errors were encountered: