views:

31

answers:

1

Hi All,

So I'm starting to work with the new workflow enginge (wf4) after previously working with 3.5. And I must say it is greatly improved! However, now I am trying to port over some existing workflows to WF4 and have ran into some snags (as is always the case).

So my main problem is that in WF3, it was all interface based and the workflow runtime was responsible for "linking" interfaces and implentations on the app start and the workflows themselves never had an instance of an object when it serialized itself to the database, which is exactly what I want because I never want my data services to be serialized.

Now in WF4, I seems like I need to pass the data services as an argument to the workflow, so when it gets persisted to the database, it serializes the variables as well. These are long running workflows that have approval steps and such, so I need to persist the workflow when idle.

So I guess my question is, am I missing something, maybe thinking in the old WF3 mentaility? Or is there a pattern I can use to do this?

Thanks!

A: 

In WF4 workflow or activity extensions are the replacement for WF3 sercices. You can add them in a similar way to the WorklfowApplication or WorkflowServiceHost or you can add them in the CacheMetadata function of an activity.

Maurice
I guess I could have been a bit more clear... We have our data repositories wrapped in a Class, which we refer to as Services so I didnt mean service in the way of a WCF service for example. I found a way of dealing with this by using an IoC wrapper to pass into the WF4 activity and call the IoC to get an instance when needed and not store it anywhere where the implementation may be persisted.
doobist