asp.net - WF4 WCF Send Message at wrong time -
asp.net - WF4 WCF Send Message at wrong time -
i hosting workflow service (xamlx) in iis. has receive activities, e.g. methoda , methodb. wrote mvc pplication client phone call these methods. in pagea, user submits form phone call methoda, workflow goes receive activity waiting methodb. in page b, user submits form phone call methodb. however, if user submits in pagea , go pagea , submit 1 time again same workflow instance, wait min , give timeout exception:
the request channel timed out while waiting reply after 00:01:00. increment timeout value passed phone call request or increment sendtimeout value on binding. time allotted operation may have been portion of longer timeout.
this error seems come wcf while suppose give next error:
the execution of instancepersistencecommand interrupted because instance key 'guid' not associated instance. can occur because instance or key has been cleaned up, or because key invalid. key may invalid if message generated sent @ wrong time or contained wrong correlation data.
i have few questions:
is there configuration can set exception can caught instead of waiting time until timeout exception can caught? know can set smaller timeout value in binding tag shouldn't solution.
is there way avoid pagea shown when workflow instance not in right state? (even done, need solve problem 1 user open pagea , idle time before submit)
thanks.
re: timeout exception.
this known bug in wf4. result fact wf/wcf infrastructure seek deliver message. means hang on message bit , see if workflow gets state can process message. infrastructure doesn't know construction of workflow. while aware workflow in state never able process message given current state infrastructure wait.
re: avoiding pagea beingness shown.
this ui layer , outside of scope of workflow. , pointed out not avoidable. have had success using bookmark info in persistence store. each receive activity creates bookmark known name , checked bookmarks in there. based on info enable/disable parts of ui. not solve problem of user opening page , leaving 15 minutes still need error handler when phone call service method. 1 way of improving on is, assuming html bases ui moment, utilize websockets, or signalr more practical, , force workflow state changes server client. still won't eliminate need error handling should create window ui in wrong state much smaller.
asp.net wcf iis workflow-foundation-4 workflowservice
Comments
Post a Comment