This is a migrated thread and some comments may be shown as answers.

WCF Workflow 4.0

1 Answer 74 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lafama
Top achievements
Rank 1
Lafama asked on 12 Jan 2011, 11:37 AM
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   

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 13 Jan 2011, 05:39 PM
Hello Lafama,

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.

Kind regards,
Alexander
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
Data Access Free Edition
Asked by
Lafama
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or