index > Windows Workflow Foundation > Using HandleExternalEventActivity to communicate from state machi...

Using HandleExternalEventActivity to communicate from state machi...

Dear all,

I have a state machine workflow hosted under asp.net 2.0, using SimpleReadWriteActivities and LocalServiceContract from the HelpDeskSupport sample app. This uses static lists to keep track of data pipes, but has no mechanism for cleaning these up. I have added this capability, in order to get consistent behaviour after a re-start of the host web site.

Everything works fine unless I return to a state which has already been executed once, and execute it again. The state concerned has an EventDrivenActivity which contains a ReceiveDataFromHost activity, derived from HandleExternalEventActivity.

When the ReceiveDataFromHost activity gets called the second time, I get an exception with message:

Correlation value on declaration "ReminderData" is already initialized.

Trevor E Hilder

Dear all,

Having had no response concerning this issue, I have gone through the code of the SimpleReadWriteActivities and LocalServiceContract in the sample app and modified them to work reliably with a state machine workflow which loops back to previousd states.

I solved the problem by adding a mechanism for removing datapipes when I have finished with them and removing the use of correlation tokens.

If anyone else needs it, I could upload the modified classes to this forum.




Trevor
Trevor E Hilder
reply 2

You can use google to search for other answers

 

More Articles

• Error in running Windows Workflow Monitor
• WF flows wrong with *.rules
• Issue when removing an activity
• XAML to IL not via C#
• Some Workflow classes use wrong casing of Id
• DependencyProperty
• Building a "long process" WF runtime
• How to update the rules without recompiling or redeploying an app...
• SqlBulkCopy?
• own Attributes on Interfaces
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Workflow Communicating back to a particu
• Add namespace to a web service
• Raising an Event from a Workflow
• Beta 1.2 install on VS RTM causes error
• State Machine Design Question
• Determine correct activity instance duri
• Service events missing event handlers? -
• ASP.NET sample with WWF Beta 2?
• How to pass parameters from workflow to
• DependencyProperties backed by another p
• Starting workflow instance synchronously
• EventSinkActivity Parameters
• How to NOT persist a workflow instance w
• Problem with HandleExternalEvent on a we
• Question about performance overhead

Hot Articles

• How to use ValidationOption
• Some Workflow classes use wrong casing o
• Visual Studio 2005 Extension in German S
• ActivityDesignerTheme and VS restart
• Get Workflow Runtime
• WWF Release Date
• Nested workflows and parameters
• About the SqlStatePersistenceService?
• State machine usage
• In the runtime is running, can add the o
• Rule Conditions against custom activitie
• WF custom persistence once again
• MS-WORD AUTOMATION ERROR : "The mes
• Durable and non-Durable Workflows in sam
• Semantics of Status.Cancel?

Recommend Articles

• WF Virgin
• view Cancel handler / faults cause code-
• Restarting persistent worklow throws a m
• Creating ActivityExecutionContext
• What is the latest version of WWF?
• Important, working with workflow runtime
• XPDL
• Validate control entrys like TextBox.Tex
• WebService Host example for State Based
• Workflow Hosting:WCF NT-Service or WEBSe
• how to using different designer for resp
• Tutorial - Lab 5 Ex 1 - votingArgs
• FlowChart workflow - Custom FreeformActi
• event not firing
• simple question