WCF Workflow 4.0

Lafama

hi,
I have a project that uses open access for the data access, this application is accessible via a web application and a WCF- Workflow service that is needed to facilitate same approval process. However am currently stuck when i try to access the activities within the workflow (activities that call the database using open access) for the running or persisted workflow. My thinking is that there is a problem with how am handling the object scope for the wcf workflow service. Please someone advice me on the best possible solution to ensure that the scope is available to both my web application and wcf workflow service.
A sample project will be highly appreciated

Regards

Alexander

I guess you are using the persistent classes directly in your service contracts, which may cause various issues. The recommended way of using OpenAccess with WCF services is not to use the persistent classes as data contracts but to define additional proxy objects that wrap the information from the persistent classes and use them for data transmission. This way you can use per-call contexts (or IObjectScopes) and also avoid some other problems with the serialization of persistent objects like circular references. We even provide a code generation template that can generate those proxy classes automatically based on a domain model (.rlinq file). The template can be downloaded from here and a sample application that demonstrates how to use it with plain WCF services is available in our new SDK. Currently we do not have an example with WCF Workflow services. Unfortunately if you are using the "classic" OpenAccess with the Forward/Reverse mapping wizards, you will have to write the transporter classes manually.
I believe this approach will help you overcome the problems you are currently experiencing as it isolates the OpenAccess-specific code in a layer below the transport objects.
If you do not want to use this method or face troubles implementing it, feel free to send us your application and we will have a look into it. I have changed the thread type to one that allows attachments.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.