How can I use Windows Workflow for validation of a Silverlight application?

Posted by Josh C. on Programmers See other posts from Programmers or by Josh C.
Published on 2011-09-01T13:31:02Z Indexed on 2012/03/24 11:38 UTC
Read the original article Hit count: 574

Filed under:
|
|
|

I want to use Windows Workflow to provide a validation service. The validation that will be provided may have multiple tiers with chaining and redirecting to other stages of validation. The application that will generate the data for validation is a Silverlight app.

I imagine the validation will take longer than the blink of an eye, so I don't want to tie the user up. Instead, I would like the user to submit the current data for validation. If the validation happens quickly, the service will perform an asynchronous callback to the app. The viewmodel that made the call would receive the validation output and post into the view.

If the validation takes a long time, the user can move forward in the Silverlight app, disregarding the potential output of the validation. The viewmodel that made the call would be gone. I expect there would be another viewmodel that would contain the current validation output in its model. The validation value would change causing the user to get a notification in smaller notifcation area.

I can see how the current view's viewmodel would call the validation through the viewmodel that is containing the validation output, but I am concerned that the service call will timeout. Also, I think the user may have already changed the values from the original validation, invalidating the feedback.

I am sure asynchronous validation is a problem solved many times over, I am looking to glean from your experience in solving this kind of problem.

Is this the right approach to the problem, or is there a better way to approach this?

© Programmers or respective owner

Related posts about Silverlight

Related posts about Workflow