Windows Server AppFabric / Workflow Services Demo - Contoso HR

This sample demonstrates how you can use a Windows Workflow Foundation (WF4) Workflow Service and Windows Server AppFabric to construct a long running business process.

C# (6.3 MB)
4.9 Star
6,155 times
Add to favorites
E-mail Twitter Digg Facebook

Solution explorer

namespace UserActivityLibrary
    using System.Activities;

    public sealed class ReadLine : NativeActivity<string>
        public InArgument<string> BookmarkName { get; set; }

        protected override bool CanInduceIdle
            get { return true; }

        protected override void Execute(NativeActivityContext context)
            // Inform the host that this activity needs data and wait for the callback
            context.CreateBookmark(this.BookmarkName.Get(context), this.OnReadComplete);

        private void OnReadComplete(NativeActivityContext context, Bookmark bookmark, object state)
            // Store the value returned by the host
            context.SetValue(this.Result, state as string);