A Sequential Example


This section explains how to use Visual Basic to build the simplified bug-reporting workflow shown in Figure 30-2. After the bug report is created, it is assigned to an engineer. The engineer either fixes the bug or rejects it. Next, the bug fix is tested, and either passes or fails the tests.

image from book
Figure 30-2: This flowchart shows a simplified bug-tracking workflow.

This workflow is similar to the one shown in Figure 30-1, and it uses the same actors. The main difference is that this diagram doesn’t allow flow back to previous steps in the workflow.

This is a straightforward sequential workflow where the activities are executed in a fixed order. Two tests let you end the workflow early: first, if the engineer assigned to the bug doesn’t fix it, and second, if the bug fix fails its tests.

To keep the example as simple as possible, the tasks that must be performed outside of the workflow (Create, Assign, Fix Bug, and Test) are performed in a simple host program that interacts directly with the workflow. The program does not use persistence to save the workflow while each of these potentially lengthy steps is executed.

The main Visual Basic form plays the role of the host service that interacts with the workflow. It starts the workflow, performs the necessary tasks, and raises events to tell the workflow what is happening to the bug report.

The following sections describe the code in the workflow and the main service application.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net