index > Windows Workflow Foundation > Custom queue and persistance

Custom queue and persistance

Hi,

I created a custom Activity implementing IActivityEventListener to manager my own events.

My problem is when the workflow host is closed and relaunch, all events registered previously are not recreated during rehydratation and my activities aren't responding anymore.

How can i solve this ?
Do i need to persist each queue myself ? If yes, where (or when...) should i do that ?

Thanks for any help,

Hadrien

Hadrienlc
How, and where, are you subscribing to the events in your queues?



Tomas Restrepo [MVP]
Tomas Restrepo

Subscriptions are normally created in IEventActivty.Subscribe().
(I also tried to recreate them during OnActivityExecutionLoad() but without success.)

The queue management is very similar to the one showed in the CustomActivity Framework sample...

I insist on the fact that this problem only occurs in close and relaunch the workflow host...

Thanks for your help !



Hadrienlc
I think you're creating the subscriptions in the right place.

I have a theory, however, but it is just that, a theory, so it would be nice if someone could confirm/reject it.

I believe that WF will *never* force event activities to recreate subscriptions when a persisted workflow is loaded again. Subscriptions are persisted in the sense that they are handled and remembered by the WorkflowQueuing service. However, if your external runtime service that does the work (i.e. that reacts to subscriptions and fires event) has to do something when a new subscription is created (such as polling or attaching to events in an external data source), then this won't quite work because the subscription is not recreated when the workflow instance is loaded again.

In that case, I *think* that it's the developers responsability to create the helper runtime service so that it "remembers" any subscriptions that were created and uses that information to respawn any processes that had been started as a consecuence (such as start polling the external data source again).

I may be wrong on this though (and hopefully I am, because it sure seems for the built-in support to be half baked without this).



Tomas Restrepo [MVP]
Tomas Restrepo
reply 4

You can use google to search for other answers

 

More Articles

• Microsoft Office SharePoint Server 2007
• Installing WWF in WinXP problem
• Problem exposing webservice after renaming workfow
• AzMan roles ?
• Custom Perisistence: There can only be one service of type "...
• How to change the font of a DesignerTheme?
• Sharepoint services client setup
• Example of SQL persistance service
• Adding Custom Activities to Hosted Workflow Designer
• Qury Regarding Long Running Workflows ....
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Compared to BPEL
• Find activity during Design Time
• Changing workflow assembly during runtime
• Correlation
• invoking workflow from GUI
• Resolving Assemblies in LoadWorkflowInst
• guidance on deployment
• New Beta: Windows® Workflow Foundat
• Rehydration and member variables
• InfoPath and WF
• State Machine Workflow
• Multiple requests clogs w3wp.exe
• Is WF 2.2 Beta compatible with WinFX Feb
• IndexOutOfRangeException when creating n
• Problem with Workflows and WebServices

Hot Articles

• visual studio2005 designer for windows w
• UpdateDefaultTrackingProfile doesnt fire
• Invoking one workflow from another
• HandleExternalEvent activity in Parallel
• What are .xoml files ?
• If/Else - Code Condition using an Activi
• A couple of questions regarding WF...
• Handling concurrent development of workf
• Example of ordering state machine suppor
• Where can I host the runtime in a SOA ba
• WWF or Skelta
• Compilation error
• Hosting state-transition workflow design
• Workflow Foundation and the Hosting Proc
• Any Utils Available To Sync Activities W

Recommend Articles

• How to use ValidationOption
• Mail to James Conrad
• Workflow implementation in ASP.Net
• The event that is fired in an activity w
• event not listened in state machine
• accessing member variables
• HELP: Exception has been thrown by the t
• Workflow Compilation Process
• Developing a Distributed Workflow
• Retrieving data back from workflow
• simple question
• No templates show after installation of
• Custom Workflow Designer sample
• WF custom persistence once again
• Custom If activity