A workflow ultimately becomes a group of managed objects in memory. The trick is to arrange the objects in a relationship so they can perform useful work. This trick isn't specific to workflow software. Consider some code from a Windows application:
button1 = new System.Windows.Forms.Button(); button1.Location = new System.Drawing.Point(13, 13); button1.Name = "button1"; button1.Size = new System.Drawing.Size(75, 23); button1.Text = "Click Me!"; this.Controls.Add(this.button1);
This code is similar to the code we saw in the InitializeComponent
method the workflow designer created earlier. Instead of arranging activities, this code is arranging user interface controls. The code creates a Button
object and sets some properties so the button will appear visually appealing. This code lives inside a class derived from System.Windows.Forms.Form
. The most important line of code is adding the button object to the form's Controls collection: this.Controls.Add(this...