WCF Workflow 4.0

2 posts, 0 answers
  1. Lafama
    Lafama avatar
    12 posts
    Member since:
    Oct 2009

    Posted 12 Jan 2011 Link to this post

    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   
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 13 Jan 2011 Link to this post

    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.
  3. DevCraft banner
Back to Top