Work with government machine workflows in ASP.NET MVC

I have a workflow that contains several states. Each state has an event-driven activity that processes an external event. When this event fires, I would either redirect the request to another Controller Action, or View.

What is the best way to redirect to another view or controller action when an event is fired in a state machine workflow?

+3
source share
1 answer

You can simply use the RedirectToAction method:
http://msdn.microsoft.com/en-us/library/system.web.mvc.controller.redirecttoaction.aspx

As soon as your workflow determines what action needs to be performed, call this method and the browser will be redirected and control will move to this action. On the other hand, if you just need to present a specific view, you can just use the View method of the controller and pass in the name of the view you want to show:
http://msdn.microsoft.com/en-us/library/system.web.mvc. controller.view.aspx

+2
source

Source: https://habr.com/ru/post/1724406/


All Articles