I'm working with a state machine workflow and using the ExternalDataExchange service to handle events in the host and get data into the workflow via eventargs.
However, now I need to get data out of the workflow and I'm having difficulties.
The outputparameters are only available in the workflow completed event, but my workflow isn't complete. The host fires an event with some data and is basically waiting for the workflow to finish processing the event (manual scheduler). In my particular handling of the event in the workflow, it's doing some validation and should that validation fail, it does NOT move to the next state but I need to be able to send the validation results back to the host application.
An example of what I'm trying to accomplish would look like this:
OrderWorkflow
PendingOrderState
ImportOrderEvent
- If the order passes validation move to CompletedState
- Else return the validation results to the host (how?)
CompletedState
It should also be noted that my host is in fact an ASP.NET MVC application, so I'm trying to avoid wiring up events on my controller/page directly to handle local services from the workflow calling out but am not totally opposed to it if that's the way it needs to be done.