Multiple WCF requests against single Workflow instance
I have a WCF Workflow Service that uses a handful of code activities to update a SQL Server CE database file from a SQL Server database. There are 4 Receive and Send Reply activities. The first one creates the workflow instance. The other 3 are contained in a Pick activity and each is triggered by in incoming request to add or remove data from the database. The service uses a QueryCorrelationInitializer to correlate the requests using a an element from the content of the request.
What is the behaviour if multiple requests arrive at the Pick activity more or less simultaneously. I know one of them will restart the workflow - what happens to the other requests? Do they wait for the first one to complete and then continue in FIFO order or will they just timeout if they don't get a turn at the workflow?
The first one will start processing and the others will be queued up for the workflow. Whenever the workflow is idle again the other will be attempted. If you are back in the original pick that should work just fine, provided you are there in the minute they have to execute with the default WCF timeout settings. If your workflow can't handle the other requests they will just time out and the client will receive a fault.
链接地址: http://www.djcxy.com/p/95850.html