Note that there are some explanatory texts on larger screens.

plurals
  1. POShow a popup message after completion of WorkFlow 4 from the controller MVC
    primarykey
    data
    text
    <p>I am a beginner in WorkFlow 4 (WF 4), I am running through a serious issue using it in MVC 3, I couldn't find the answer online.</p> <p>I need to show a popup message if an exception occurred in the workFlow or anything returned in the outpput arguments, I have a page that the user would edit and at the end he will click Save button.</p> <p>Clicking the Save button will submit the form to the controller and run a workflow, when the workflow completed, I got an output explaining if updating the data through the workflow succeeded or not, then I need to show this status on completed action, but I am unable to since I run it asynchronously which means the method will return to the user and in parallel the workflow is invoking the event.</p> <p>Here is my code in the controller:</p> <pre><code>[HttpPost()] public ActionResult SaveVehicles(vehiclesData model) { Services.VehiclesDataUpdate vehiclesDataUpdate = new Services.VehiclesDataUpdate(this.SessionData.DealerLotKey, null, null); IDictionary&lt;string, object&gt; parameters = new Dictionary&lt;string, object&gt;(); parameters.Add("VehiclesDataUpdate", vehiclesDataUpdate); parameters.Add("UnionVehicles", unionVehicles); parameters.Add("SolrVehicles", solrVehicles); IDictionary&lt;string, object&gt; outputs = new Dictionary&lt;string, object&gt;(); AutoResetEvent syncEvent = new AutoResetEvent(false); WorkflowApplication wfApp = new WorkflowApplication(new VehiclesUpdate(), parameters); wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e) { outputs = e.Outputs; syncEvent.Set(); if (!errorExceptions.IsNullOrEmpty()) { //TODO: Render a parital view to display an error message or the result of the workflow in the ouptput //TODO: Logging. } }; wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e) { syncEvent.Set(); }; wfApp.Run(); return View(model); } </code></pre> <p>How can I send something back to the user when workflow completion?</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload