By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,149 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,149 IT Pros & Developers. It's quick & easy.

Passivating a workflow

P: n/a
Urs
Hi

What happens to workflow references to objects outside the workflow class
instance, when passivating a workflow, having SqkWorkflowPersistenceService
enabled?

Example: Let's say my workflow holds a reference to a class instance in the
host. A workflow is waiting for a few days. In the meantime, the machine is
rebooted. I understand that the persistence objects come back to life, and
my particular workflow will continue waiting.

Q1: Where does my original reference ot that class instance point to after
restarting?
Q2: How do I reset that reference that it actually points to the new
instance (since I restarted the app)?

Thanks for any hints.
Urs
Jan 29 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Urs" <uv****@msn.comwrote in message
news:Oo****************@TK2MSFTNGP02.phx.gbl...
Hi

What happens to workflow references to objects outside the workflow class
instance, when passivating a workflow, having
SqkWorkflowPersistenceService enabled?
If the object you're referencing is marked with the [Serializable] attribute
then it will be serialized and deserialized along with your activity. If it
isn't, an exception is thrown.

There are many ways to control the serialization process if that won't work
for your application.
>
Example: Let's say my workflow holds a reference to a class instance in
the host. A workflow is waiting for a few days. In the meantime, the
machine is rebooted. I understand that the persistence objects come back
to life, and my particular workflow will continue waiting.
If your host is providing something that your activities use, you should
probably expose the object by having the host register it as a service (see
WorkflowRuntime.AddService()) Then, the activity should get a reference to
the service when it needs it.
>
Q1: Where does my original reference ot that class instance point to after
restarting?
Q2: How do I reset that reference that it actually points to the new
instance (since I restarted the app)?

Thanks for any hints.
Urs

Feb 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.