PickBranch Activity Designer
PickBranch objects are contained in the Branches collection of a Pick activity. Each PickBranch is contained in a branch of the Pick activity and can be executed due to some incoming event that serves as a trigger. In this way the Windows Workflow Designer provides event-based control flow modeling. Each PickBranch contains a Trigger and an Action.
How to use the Pick Activity Designer
The PickBranch designer can be found in the Control Flow category of the Toolbox, which is accessed by clicking the Toolbox tab on Workflow Designer (Alternatively, select Toolbar from the View menu, or CTRL+ALT+X).
Two empty PickBranch objects with display names of Branch1 and Branch2 are created by default as elements of a Pick activity when the Pick activity designer is initially dropped on to the Workflow Designer. These respective DisplayName property values can be edited in the PickBranch designer header or within the Properties window for each branch.
There are two ways to add PickBranch objects to the collection of a Pick object: dragging and dropping the PickBranch designer from the Toolbox or by using the context menu from within the Pick design surface:
The PickBranch designer creates a PickBranch when it is dragged from the Toolbox and dropped into one of the branches of a Pick activity designer on the Workflow Designer surface. The new PickBranch objects can be placed inside the Pick designer to the left or right of any existing PickBranch elements already contained in the collection. When dragging a PickBranch designer onto the Pick designer with a mouse, the Pick designer uses a vertical blue-gray band to indicate where the PickBranch is added for a given mouse placement.
Right click Pick activity designer (but not inside PickBranch designer) to obtain a context menu and select Create Branch to add a new PickBranch. Notice that the new PickBranch is added to the right of the existing PickBranch objects in the Pick designer.
The PickBranch designer can be expanded to reveal the Trigger and Action boxes or collapsed by clicking the double carets on the right side of their headers. Edit the Trigger and Action of each PickBranch by dropping activities into the Trigger and Action boxes of their designers.
The PickBranch objects in the Branches collection of a Pick object, can be reordered by dragging and dropping them to a new location within the Pick designer. The Pick designer uses a vertical blue-gray band to indicate where the PickBranch is added for a given mouse placement.
There are two ways to delete a PickBranch:
Select the PickBranch designer and delete it.
Select the PickBranch designer, right-click to obtain the context menu and select Delete.
Be sure to select the PickBranch designer, as selecting one of the activities inside its Trigger or Action boxes by mistake deletes one of those activities and not the PickBranch object.
PickBranch Properties in the Workflow Designer
The following table shows the most useful PickBranch properties and describes how to use them in the Workflow Designer.
The friendly name displayed on the header of the PickBranch designer. The default value is Branch.
Although the DisplayName is not strictly required, it is a best practice to use one.