<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Windows Workflow Foundation</title>
        <link>http://geekswithblogs.net/paulschapman/category/8408.aspx</link>
        <description>How to create workflows using Windows Workflow Foundation</description>
        <language>en-GB</language>
        <copyright>paulschapman</copyright>
        <managingEditor>paulschapman@xericsystems.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Getting WCF to work with Azure</title>
            <link>http://geekswithblogs.net/paulschapman/archive/2009/01/07/getting-wcf-to-work-with-azure.aspx</link>
            <description>&lt;p&gt;Silverlight makes creating compelling Rich Internet Applications fairly easy. That said the cut down version of .Net means some things that you would do within an application have to be relegated to Web Services which can benefit from the full .Net library. One of these is of course Azure, after all that is the whole point - an online store of Business Logic and data.&lt;/p&gt;
&lt;p&gt;The application I'm working on uses Silverlight on the front end, and Azure will provide the bulk of the backend. There are reasons for this; my budget for the site is not that large, adopting Azure means first off that it will be free during development, but almost as important - hosting costs will be related to the success of the site. &lt;/p&gt;
&lt;p&gt;Thing is dealing with pre-beta software has meant an increase in grey hairs and those that are left are getting fewer. One of the parts that needs looking at is in WCF. If you run the Azure Labs the WCF lab does not work. This is because the Development Fabric is not hosting the service correctly, and WCF metadata is not being returned correctly.&lt;/p&gt;
&lt;p&gt;Thanks must go to David Burela and his &lt;a target="_blank" href="http://davidburela.wordpress.com/"&gt;&lt;font color="#800080"&gt;House-o-blog&lt;/font&gt;&lt;/a&gt;. In it he describes a way to get WCF working despite the problems with the Development Fabric. So what I thought I would do is write a version of the Azure Services Training Kits Exercise 3: Hosting a WCF Service&lt;/p&gt;
&lt;p&gt;So the following is Exercise 3, but with the changes made to ensure it works&lt;/p&gt;
&lt;p&gt;1. Open the project you created in Exercise 2 or open the &lt;strong&gt;begin.sln&lt;/strong&gt; solution file located in &lt;strong&gt;C:\AzureServicesKit\Labs\BuildingWindowsAzureServices\Ex03-HostingWCFService\begin\&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;If you closed Visual Studio, be sure to open it elevated as &lt;strong&gt;Administrator&lt;/strong&gt;, from &lt;strong&gt;Start | All Programs | Microsoft Visual Studio 2008 right-click Microsoft Visual Studio 2008&lt;/strong&gt; and choose &lt;strong&gt;Run as Administrator&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;2. Add the WCF service file. To do this, right-click the &lt;strong&gt;RDCompute_WebRole&lt;/strong&gt; node in &lt;strong&gt;Solution Explorer&lt;/strong&gt;, point to &lt;strong&gt;Add&lt;/strong&gt; and select &lt;strong&gt;New Item&lt;/strong&gt;. In the &lt;strong&gt;Add New Item&lt;/strong&gt; dialog, select the &lt;strong&gt;WCF Service&lt;/strong&gt; template, change the Name to &lt;strong&gt;&lt;em&gt;MessageLogger.svc&lt;/em&gt;&lt;/strong&gt;, and then click &lt;strong&gt;Add&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/paulschapman/WindowsLiveWriter/GettingWCFtoworkwithAzure_1446C/image_2.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="388" alt="Add New Item" width="644" border="0" src="http://geekswithblogs.net/images/geekswithblogs_net/paulschapman/WindowsLiveWriter/GettingWCFtoworkwithAzure_1446C/image_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;The template adds an &lt;strong&gt;IMessageLogger&lt;/strong&gt; interface, which defines the service contract and a &lt;strong&gt;MessageLogger&lt;/strong&gt; class that implements the contract.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;3. Update the contract interface to define a method to send messages to the service. Open the &lt;strong&gt;&lt;em&gt;IMessageLogger.cs&lt;/em&gt;&lt;/strong&gt; file in the text editor. This file contains the generated &lt;strong&gt;IMessageLogger&lt;/strong&gt; interface, which includes a single method named &lt;strong&gt;DoWork&lt;/strong&gt;. Delete this method, and insert a &lt;strong&gt;LogMessage&lt;/strong&gt; method to replace it (shown highlighted in bold text below.) &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;[ServiceContract] &lt;br /&gt;
public interface IMessageLogger &lt;br /&gt;
{ &lt;br /&gt;
  [OperationContract] &lt;br /&gt;
  &lt;strong&gt;void LogMessage(string message); &lt;br /&gt;
&lt;/strong&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;4. Implement the contract interface in the &lt;strong&gt;MessageLogger&lt;/strong&gt; service. Open the &lt;strong&gt;&lt;em&gt;MessageLogger.&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;svc.&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;cs&lt;/em&gt;&lt;/strong&gt; file in the text editor. This file contains the service implementation and includes a skeleton &lt;strong&gt;DoWork&lt;/strong&gt; method. Again, delete this method and insert the following code that implements the &lt;strong&gt;LogMessage&lt;/strong&gt; method in its place. &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;public void LogMessage(string message) &lt;br /&gt;
{ &lt;br /&gt;
     MessageHelper.SaveMessage(message); &lt;br /&gt;
} &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;5. Change the binding of the &lt;strong&gt;IMessageLogger&lt;/strong&gt; endpoint to use a &lt;strong&gt;&lt;em&gt;basicHttpBinding&lt;/em&gt;&lt;/strong&gt;. Open the &lt;strong&gt;&lt;em&gt;Web.config&lt;/em&gt;&lt;/strong&gt; file in the text editor and locate the &lt;strong&gt;&lt;em&gt;RDCompute_&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;WebRole&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;.MessageLogger&lt;/em&gt;&lt;/strong&gt; service configuration in the &lt;strong&gt;services&lt;/strong&gt; section inside &lt;strong&gt;system.serviceModel&lt;/strong&gt;. This should be towards the end of the file. Change the &lt;strong&gt;binding&lt;/strong&gt; attribute of the single endpoint contained in this section from &lt;strong&gt;&lt;em&gt;wsHttpBinding&lt;/em&gt;&lt;/strong&gt; to &lt;strong&gt;&lt;em&gt;basicHttpBinding&lt;/em&gt;&lt;/strong&gt;. The endpoint configuration after the change should be as follows: &lt;/p&gt;
&lt;pre&gt;&amp;lt;endpoint address="" binding="basicHttpBinding" contract="RDCompute_WebRole.IMessageLogger"&amp;gt;
  &amp;lt;identity&amp;gt;
    &amp;lt;dns value="localhost" /&amp;gt;
  &amp;lt;/identity&amp;gt;
&amp;lt;/endpoint&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;6. Right click on the ASP.Net project (&lt;strong&gt;AzureWCFDemo_WebRole&lt;/strong&gt;) and set it as the startup project&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;7. Right click on the MessageLogger.svc file and select View in Browser&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;8. When IE starts copy the address displayed in the Address Bar to the clipboard&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;9. Start a new instance of Visual Studio&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;10. Create a console client project by select File, New Project&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/paulschapman/WindowsLiveWriter/GettingWCFtoworkwithAzure_1446C/image_4.png"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="386" alt="image" width="644" border="0" src="http://geekswithblogs.net/images/geekswithblogs_net/paulschapman/WindowsLiveWriter/GettingWCFtoworkwithAzure_1446C/image_thumb_1.png" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;11. Add a reference to the message logging service. In &lt;strong&gt;Solution Explorer&lt;/strong&gt;, right-click the &lt;strong&gt;Message&lt;/strong&gt;&lt;strong&gt;Generator&lt;/strong&gt; project node, and select &lt;strong&gt;Add Service Reference&lt;/strong&gt;. &lt;br /&gt;Paste the address you copied from the IE instance into the &lt;strong&gt;Add Service Reference&lt;/strong&gt; dialog and click Discover. Change the &lt;strong&gt;Namespace&lt;/strong&gt; to &lt;strong&gt;RDService&lt;/strong&gt; and click &lt;strong&gt;OK&lt;/strong&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;12. Add the following code to the main function&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;strong&gt;using (RDService.MessageLoggerClient client = new RDService.MessageLoggerClient())&lt;/strong&gt;
&lt;strong&gt;  {&lt;/strong&gt;
&lt;strong&gt;    Console.WriteLine("Enter your messages ('quit' to exit)");&lt;/strong&gt;
&lt;strong&gt;    while (true)&lt;/strong&gt;
&lt;strong&gt;    {&lt;/strong&gt;
&lt;strong&gt;      try&lt;/strong&gt;
&lt;strong&gt;      {&lt;/strong&gt;
&lt;strong&gt;        string message = Console.ReadLine();&lt;/strong&gt;
&lt;strong&gt;        if (message.Equals("quit", StringComparison.CurrentCultureIgnoreCase))&lt;/strong&gt;
&lt;strong&gt;          break;&lt;/strong&gt;
&lt;strong&gt;        client.LogMessage(message);&lt;/strong&gt;
&lt;strong&gt;      }&lt;/strong&gt;
&lt;strong&gt;      catch (Exception ex)&lt;/strong&gt;
&lt;strong&gt;      {&lt;/strong&gt;
&lt;strong&gt;           Console.WriteLine(ex.Message);&lt;/strong&gt;
&lt;strong&gt;      }&lt;/strong&gt;
&lt;strong&gt;    }&lt;/strong&gt;
&lt;strong&gt;  }&lt;/strong&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;13. Return to the instance of Visual Studio running the ASP.Net application and stop debugging the ASP.Net Application&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;13. Right click the Azure project and set as the Start-up project, then start debugging. The Dev Fabric should start running and hosting the WCF service. &lt;br /&gt;When IE starts note the port number. More than likely this will be 81.&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;14. Finally, go back to our client project. Open the app.config file and change the endpoint address so that is the port number found in the previous step.&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;15. Now run the client project. It should be able to call the WCF Service hosted within the Development Fabric&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;font face="Trebuchet MS"&gt;If everything worked you should have completed Exercise 3. Hopefully a fix to the problem will be forthcoming. Excercise 4 should be fun, since in this instance &lt;br /&gt;we will be calling the Web Service from within Azure (rather than a standard Windows Application) and so this technique may need adapting.&lt;/font&gt;&lt;/pre&gt;
&lt;/pre&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=128468"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=128468" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/paulschapman/aggbug/128468.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>paulschapman</dc:creator>
            <guid>http://geekswithblogs.net/paulschapman/archive/2009/01/07/getting-wcf-to-work-with-azure.aspx</guid>
            <pubDate>Thu, 08 Jan 2009 05:04:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulschapman/comments/128468.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulschapman/archive/2009/01/07/getting-wcf-to-work-with-azure.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulschapman/comments/commentRss/128468.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulschapman/services/trackbacks/128468.aspx</trackback:ping>
        </item>
        <item>
            <title>A first attempt with Windows Workflow Foundation #2</title>
            <link>http://geekswithblogs.net/paulschapman/archive/2008/07/03/a-first-attempt-with-windows-workflow-foundation-2.aspx</link>
            <description>&lt;p&gt;The form I need to model with Workflow is split into sections. Depending on what section it will be filled in by anyone of three different groups of people. However at the moment I am trying to deal with the communication between the host application and the workflow itself.&lt;/p&gt;
&lt;p&gt;First part of that is to define the Arguments that will be passed to our Event&lt;/p&gt;
&lt;font color="#0000ff"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;Imports&lt;/font&gt;&lt;font face="Courier New" size="2"&gt; System &lt;br /&gt;
Imports System.Collections &lt;br /&gt;
Imports System.Collections.Generic &lt;br /&gt;
Imports System.Text &lt;br /&gt;
Imports System.Workflow.Activities &lt;br /&gt;
Imports System.Workflow.ComponentModel&lt;/font&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;Namespace&lt;/font&gt;&lt;font face="Courier New" size="2"&gt; FormularyWorkflow&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;     &amp;lt;Serializable&amp;gt; _  &lt;br /&gt;
     Public Class SectionA_ApplicantEventArgs &lt;br /&gt;
          Inherits ExternalDataEventArgs &lt;br /&gt;
          Dim _Applicant As &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;String &lt;br /&gt;
          Dim _Email As &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;String &lt;br /&gt;
          Dim _ApplicationDate As Date = Date.Now &lt;br /&gt;
          Dim _Signed As Boolean = &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;False &lt;br /&gt;
      &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          Public Sub New(ByVal InstanceId As Guid) &lt;br /&gt;
               MyBase.New(InstanceId) &lt;br /&gt;
          End Sub&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          Public Property Applicant() As &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;String &lt;br /&gt;
               &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;Get &lt;br /&gt;
                    Return _Applicant &lt;br /&gt;
               End Get&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;               Set(ByVal value As String) &lt;br /&gt;
                    &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;_Applicant = value &lt;br /&gt;
               &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;End Set&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          End Property&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          Public Property Email() As String &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;               Get &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;                    Return _Email &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;               End Get&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;               Set(ByVal value As String) &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;                    _Email = value &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;               End Set &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          End Property&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          Public Property ApplicationDate() As Date &lt;br /&gt;
               &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;Get &lt;br /&gt;
                    &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;Return _ApplicationDate &lt;br /&gt;
               &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;End Get&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;               Set(ByVal value As Date) &lt;br /&gt;
                    &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;_ApplicationDate = value &lt;br /&gt;
               &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;End Set &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          End Property&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          Public Property Signed() As Boolean &lt;br /&gt;
               &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;Get &lt;br /&gt;
                    &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;Return _Signed &lt;br /&gt;
               &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;End Get&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;               Set(ByVal value As Boolean) &lt;br /&gt;
                    &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;_Signed = value &lt;br /&gt;
               &lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;End Set &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;          End Property &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;     End &lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;Class &lt;br /&gt;
&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt; Namespace&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font face="Trebuchet MS"&gt;There is not much to say about this bit of code. First we import the workflow namespaces; Workflow.Activities and Workflow.ComponentModel. Our class inherits from ExternalDataEventArgs. Finally we define a constructor for the class which simple calls the base class constructor with an indentifier for the workflow.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font face="Trebuchet MS"&gt;To define the way that our workflow exchanges data we now create the actual interface. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;
&lt;p&gt;Imports &lt;font size="2"&gt;System &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Collections &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Collections.Generic &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Text &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Workflow.Activities &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Workflow.ComponentModel&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Namespace &lt;font size="2"&gt;FormularyWorkflow&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;     &amp;lt;ExternalDataExchange&amp;gt; _ &lt;br /&gt;
&lt;/p&gt;
&lt;font size="2"&gt;     Public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;Interface&lt;/font&gt;&lt;font size="2"&gt; IFormularyDataExchange &lt;br /&gt;
          &lt;/font&gt;&lt;font size="2"&gt;Event&lt;/font&gt;&lt;font size="2"&gt; ApplicationEventHandler &lt;/font&gt;&lt;font size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; EventHandler(&lt;/font&gt;&lt;font size="2"&gt;Of &lt;/font&gt;&lt;font size="2"&gt;SectionA_ApplicantEventArgs) &lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;     End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;Interface &lt;br /&gt;
End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;NameSpace&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123573"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123573" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/paulschapman/aggbug/123573.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>paulschapman</dc:creator>
            <guid>http://geekswithblogs.net/paulschapman/archive/2008/07/03/a-first-attempt-with-windows-workflow-foundation-2.aspx</guid>
            <pubDate>Fri, 04 Jul 2008 03:30:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulschapman/comments/123573.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulschapman/archive/2008/07/03/a-first-attempt-with-windows-workflow-foundation-2.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulschapman/comments/commentRss/123573.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulschapman/services/trackbacks/123573.aspx</trackback:ping>
        </item>
        <item>
            <title>A first attempt with Windows Workflow Foundation #1</title>
            <link>http://geekswithblogs.net/paulschapman/archive/2008/07/02/a-first-attempt-with-windows-workflow-foundation.aspx</link>
            <description>&lt;p&gt;One of my current clients has a need for a workflow and document management system to manage applications. This has prompted me to look at Windows Workflow Foundation to manage this application process. &lt;/p&gt;
&lt;p&gt;The workflow has a number of advantages over writing the whole thing from scratch;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Most businesses have processes; be that purchasing, selling, staff applications. Once a process has been determined the workflow can be designed graphically - and this graphical design drives the code generation, meaning the process is always going to be closer to the users requirements. &lt;/li&gt;
    &lt;li&gt;The workflow system manages the running of the process, rules can be defined and this process will always be the same &lt;/li&gt;
    &lt;li&gt;In addition to controlling and managing a workflow, a workflow process can be tracked - it is possible to find out exactly where a workflow is, but also the stages it went through before. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because most of our workflows involve humans who do not always want to do the stages when the computer does; the workflow must therefore wait. Easiest way of doing this is to use a State Machine Workflow; which moves from state to state as each stage is done.&lt;/p&gt;
&lt;p&gt;In order for the workflow to work however we need to define the parameters that will drive it. So what we do first is define a class that inherits from ExternalDataEventArgs. and then define an interface with each of our events defined within it. Once we have done that we can then use a tool called 'Windows Communications Activities Generator to generate the classes that will define our communications.&lt;/p&gt;
&lt;p&gt;When could run the wca tool from within Visual Studio in which case it will pick up it's parameters from the solution currently loaded. We set this up by using the Tools, External tools option of the Visual Studio IDE. Clicking on the 'Add' button allows you to add another tool to the menu.&lt;/p&gt;
&lt;p&gt;My settings for the Windows Communications Activities are as follows;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Title&lt;/strong&gt;: &lt;font face="Arial"&gt;Workflow Communications Activities&lt;br /&gt;
&lt;strong&gt;Command&lt;/strong&gt;:  &lt;font face="Arial"&gt;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\WCA.exe&lt;br /&gt;
&lt;strong&gt;Arguments&lt;/strong&gt;: &lt;font face="Arial"&gt;$(TargetName)$(TargetExt) /o:$(ProjectDir) /l:vb&lt;br /&gt;
&lt;font face="Arial"&gt;&lt;strong&gt;Intial directory&lt;/strong&gt;: $(TargetDir)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;I've also checked 'Use &lt;u&gt;O&lt;/u&gt;utput window' - so I can see the wca tools output but have left '&lt;u&gt;P&lt;/u&gt;rompt for arguments' and Treat output a&lt;u&gt;s&lt;/u&gt; Unicode' clear.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123542"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123542" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/paulschapman/aggbug/123542.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>paulschapman</dc:creator>
            <guid>http://geekswithblogs.net/paulschapman/archive/2008/07/02/a-first-attempt-with-windows-workflow-foundation.aspx</guid>
            <pubDate>Thu, 03 Jul 2008 04:08:09 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paulschapman/comments/123542.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paulschapman/archive/2008/07/02/a-first-attempt-with-windows-workflow-foundation.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paulschapman/comments/commentRss/123542.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paulschapman/services/trackbacks/123542.aspx</trackback:ping>
        </item>
    </channel>
</rss>