Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c4b23e4
Image updates.
damabe Feb 27, 2019
a9fd7be
Image updates.
damabe Feb 27, 2019
648a692
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 6, 2019
ad6b189
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 7, 2019
3b1be9a
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 8, 2019
970c319
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 10, 2019
1531b8d
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 13, 2019
3ba1a22
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 15, 2019
f170c87
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 16, 2019
37c98b1
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 17, 2019
18da5b4
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 18, 2019
1fca543
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 19, 2019
ac379a9
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 20, 2019
a3edb9a
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 20, 2019
d9d1c45
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 20, 2019
b8cb6ed
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 22, 2019
24bb478
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 23, 2019
939e76c
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 25, 2019
e31c3bd
Merge branch 'master' of https://github.com/dotnet/docs
damabe Mar 26, 2019
c6be767
Merge branch 'master' of https://github.com/dotnet/docs
damabe May 1, 2019
e525e41
Merge branch 'master' of https://github.com/dotnet/docs
damabe May 4, 2019
c6ee321
Small PR.
damabe May 14, 2019
427222d
Reviewer feedback.
damabe May 15, 2019
d92fc3c
Reviewer feedback.
damabe May 15, 2019
66d7a96
Reviewer feedback.
damabe May 15, 2019
2b32ca4
Update docs/framework/windows-workflow-foundation/wf-features-in-the-…
damabe May 15, 2019
e541a43
Update docs/framework/windows-workflow-foundation/wf-features-in-the-…
damabe May 15, 2019
90170b3
Update docs/framework/windows-workflow-foundation/wf-features-in-the-…
damabe May 15, 2019
d53c852
Update docs/framework/windows-workflow-foundation/whats-new-in-wf-in-…
damabe May 15, 2019
1356a81
Update docs/framework/windows-workflow-foundation/whats-new-in-wf-in-…
damabe May 15, 2019
47c4a2e
Update docs/framework/windows-workflow-foundation/whats-new-in-wf-in-…
damabe May 15, 2019
1ae9f7e
Reviewer feedback.
damabe May 15, 2019
3184638
Merge branch '1463880-small2' of https://github.com/damabe/docs into …
damabe May 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Starting with [!INCLUDE[net_v45](../../../includes/net-v45-md.md)], C# expressio
### <a name="WFDesigner"></a> Using C# expressions in the Workflow Designer
Starting with [!INCLUDE[net_v45](../../../includes/net-v45-md.md)], C# expressions are supported in Windows Workflow Foundation (WF). C# workflow projects created in Visual Studio 2012 that target [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] use C# expressions, while Visual Basic workflow projects use Visual Basic expressions. To specify the desired C# expression, type it into the box labeled **Enter a C# expression**. This label is displayed in the properties window when the activity is selected in the designer, or on the activity in the workflow designer. In the following example, two `WriteLine` activities are contained within a `Sequence` inside a `NoPersistScope`.

![Automatically created sequence activity](./media/autosurround2.png "AutoSurround2")
![Screenshot that shows an automatically created sequence activity.](./media/csharp-expressions/auto-surround-sequence-activity.png)

> [!NOTE]
> C# expressions are supported only in Visual Studio, and are not supported in the re-hosted workflow designer. For more information about new WF45 features supported in the re-hosted designer, see [Support for New Workflow Foundation 4.5 Features in the Rehosted Workflow Designer](wf-features-in-the-rehosted-workflow-designer.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Workflows can be constructed from built-in activities as well as from custom act

The following example illustrates the completed workflow.

![Completed State Machine Workflow](./media/wfstatemachinegettingstartedtutorialcomplete.JPG "WFStateMachineGettingStartedTutorialComplete")
![Illustration that shows the completed state machine workflow.](./media/how-to-create-a-state-machine-workflow/complete-state-machine-workflow.jpg)

### To build the workflow

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ A state machine is a well-known paradigm for developing programs. The <xref:Syst

To create a state machine workflow, states are added to a <xref:System.Activities.Statements.StateMachine> activity, and transitions are used control the flow between states. The following screenshot, from the [Getting Started Tutorial](getting-started-tutorial.md) step [How to: Create a State Machine Workflow](how-to-create-a-state-machine-workflow.md), shows a state machine workflow with three states and three transitions. **Initialize Target** is the initial state and represents the first state in the workflow. This is designated by the line leading to it from the **Start** node. The final state in the workflow is named **FinalState**, and represents the point at which the workflow is completed.

![Completed State Machine Workflow](./media/wfstatemachinegettingstartedtutorialcomplete.JPG "WFStateMachineGettingStartedTutorialComplete")
![Illustration that shows the completed state machine workflow.](./media/state-machine-workflows/complete-state-machine-workflow.jpg)

A state machine workflow must have one and only one initial state, and at least one final state. Each state that is not a final state must have at least one transition. The following sections cover creating and configuring states and transitions.

## Creating and Configuring States
A <xref:System.Activities.Statements.State> represents a state in which a state machine can be in. To add a <xref:System.Activities.Statements.State> to a workflow, drag the **State** activity designer from the **State Machine** section of the **Toolbox** and drop it onto a <xref:System.Activities.Statements.StateMachine> activity on the [!INCLUDE[wfd1](../../../includes/wfd1-md.md)] surface.

![WF4 State Machine Activities](./media/netframework4platformupdate1statemachineactivities.jpg "NETFramework4PlatformUpdate1StateMachineActivities")
![Screenshot of the State Machine section of the Toolbox.](./media/state-machine-workflows/state-machine-section-toolbox.jpg)

To configure a state as the **Initial State**, right-click the state and select **Set as Initial State**. Additionally, if there is no current initial state, the initial state can be designated by dragging a line from the **Start** node at the top of the workflow to the desired state. When a <xref:System.Activities.Statements.StateMachine> activity is dropped onto the workflow designer, it is pre-configured with an initial state named **State1**. A state machine workflow must have one and only one initial state.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ Windows Workflow Foundation (WF) in [!INCLUDE[net_v45](../../../includes/net-v45

The following screenshot shows the variable and argument designer context menu.

![Variable and Argument Designer Context Menu](./media/designercontextmenu.png "DesignerContextMenu")
![Variable and Argument Designer Context Menu](./media/wf-features-in-the-rehosted-workflow-designer/designer-context-menu.png)

### Auto-surround with Sequence
Since a workflow or certain container activities (such as <xref:System.Activities.Statements.NoPersistScope>) can only contain a single body activity, adding a second activity required the developer to delete the first activity, add a <xref:System.Activities.Statements.Sequence> activity, and then add both activities to the sequence activity. Starting with [!INCLUDE[net_v45](../../../includes/net-v45-md.md)], when adding a second activity to the designer surface, a `Sequence` activity will be automatically created to wrap both activities. This feature is supported in the rehosted designer.

The following screenshot shows a `WriteLine` activity in the `Body` of a `NoPersistScope`.

![Auto&#45;surround drop location](./media/autosurround1.png "AutoSurround1")
![A WriteLine activity in the Body of a NoPersistScope activity.](./media/wf-features-in-the-rehosted-workflow-designer/auto-surround-write-line-activity.png)

The following screenshot shows the automatically created `Sequence` activity in the `Body` when a second `WriteLine` is dropped below the first.

![Automatically created sequence activity](./media/autosurround2.png "AutoSurround2")
![An automatically created Sequence in the Body of a NoPersistScope.](./media/wf-features-in-the-rehosted-workflow-designer/auto-surround-sequence-activity.png)

### Pan Mode
To more easily navigate a large workflow in the designer, pan mode can be enabled, allowing the developer to click and drag to move the visible portion of the workflow, rather than needing to use the scroll bars. The button to activate pan mode is in the lower right corner of the designer. This feature is supported in the rehosted designer.

The following screenshot shows the pan button which is located at the bottom right corner of the workflow designer.

![Pan button in workflow designer](./media/panbutton.png "PanButton")
![The pan button highlighted in the workflow designer.](./media/wf-features-in-the-rehosted-workflow-designer/pan-button-workflow-designer.png)

The middle mouse button or space bar can also be used to pan the workflow designer.

Expand All @@ -63,7 +63,7 @@ Windows Workflow Foundation (WF) in [!INCLUDE[net_v45](../../../includes/net-v45

The following screenshot of the completed workflow from the [Getting Started Tutorial](getting-started-tutorial.md) shows the outline view with a sequential workflow.

![Outline View in Workflow Designer](./media/outlineviewinworkflowdesigner.jpg "OutlineViewinWorkflowDesigner")
![Screenshot of outline view with a sequential workflow in Visual Studio](./media/wf-features-in-the-rehosted-workflow-designer/outline-view-in-workflow-designer.jpg)

### More control of visibility of shell bar and header items
In a rehosted designer, some of the standard UI controls may not have meaning for a given workflow, and may be turned off. In [!INCLUDE[netfx40_short](../../../includes/netfx40-short-md.md)], this customization is only supported by the shell bar at the bottom of the designer. In [!INCLUDE[net_v45](../../../includes/net-v45-md.md)], the visibility of shell header items at the top of the designer can be adjusted by setting <xref:System.Activities.Presentation.View.DesignerView.WorkflowShellHeaderItemsVisibility%2A> with the appropriate <xref:System.Activities.Presentation.View.ShellHeaderItemsVisibility> value.
Expand All @@ -73,18 +73,18 @@ Windows Workflow Foundation (WF) in [!INCLUDE[net_v45](../../../includes/net-v45

The following screenshot shows the attachment points that become visible when an activity is dragged from the toolbox.

![Flowchart start node showing autoconnect points](./media/autoconnect1.png "Autoconnect1")
![Flowchart start node showing auto-connect points](./media/wf-features-in-the-rehosted-workflow-designer/auto-connect-points-start-node.png)

Activities can also be dragged onto connections between flowchart nodes and states to auto-insert the node between two other nodes. The following screenshot shows the highlighted connecting line where activities can be dragged from the toolbox and dropped.

![Auto&#45;insert handle for dropping activities](./media/autoinsert.png "Autoinsert")
![Auto-insert handle for dropping activities](./media/wf-features-in-the-rehosted-workflow-designer/auto-insert-connecting-line.png)

Auto-connect and auto-insert are supported in the rehosted designer.

### Designer Annotations
To facilitate developing larger workflows, the designer now supports adding annotations to help keep track of the design process. Annotation can be added to activities, states, flowchart nodes, variables and arguments. The following screenshot shows the context menu used to add annotations to the designer.

![Annotation context menu](./media/annotationdialog.png "annotationdialog")
![Screenshot that shows the menu for adding notations.](./media/wf-features-in-the-rehosted-workflow-designer/designer-annotations-context-menu.png)

Designer annotations are supported in the rehosted designer.

Expand Down Expand Up @@ -128,7 +128,7 @@ Windows Workflow Foundation (WF) in [!INCLUDE[net_v45](../../../includes/net-v45

The following screenshot shows the completed state machine workflow from the [Getting Started Tutorial](getting-started-tutorial.md) step [How to: Create a State Machine Workflow](how-to-create-a-state-machine-workflow.md).

![Completed State Machine Workflow](./media/wfstatemachinegettingstartedtutorialcomplete.JPG "WFStateMachineGettingStartedTutorialComplete")
![Illustration that shows the completed state machine workflow.](./media/wf-features-in-the-rehosted-workflow-designer/complete-state-machine-workflow.jpg)

For more information on creating state machine workflows, see [State Machine Workflows](state-machine-workflows.md). State machine workflows are supported in the rehosted designer.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,27 @@ In [!INCLUDE[netfx40_short](../../../includes/netfx40-short-md.md)], variables a

The following screenshot shows the variable and argument designer context menu.

![Variable and Argument Designer Context Menu](./media/designercontextmenu.png "DesignerContextMenu")
![Variable and Argument Designer Context Menu](./media/whats-new-in-wf-in-dotnet/designer-context-menu.png)

### <a name="BKMK_AutoSurround"></a> Auto-surround with Sequence

Since a workflow or certain container activities (such as <xref:System.Activities.Statements.NoPersistScope>) can only contain a single body activity, adding a second activity required the developer to delete the first activity, add a <xref:System.Activities.Statements.Sequence> activity, and then add both activities to the sequence activity. Starting with [!INCLUDE[net_v45](../../../includes/net-v45-md.md)], when adding a second activity to the designer surface, a `Sequence` activity will be automatically created to wrap both activities.

The following screenshot shows a `WriteLine` activity in the `Body` of a `NoPersistScope`.

![Auto&#45;surround drop location](./media/autosurround1.png "AutoSurround1")
![A WriteLine activity in the Body of a NoPersistScope activity.](./media/whats-new-in-wf-in-dotnet/auto-surround-write-line-activity.png)

The following screenshot shows the automatically created `Sequence` activity in the `Body` when a second `WriteLine` is dropped below the first.

![Automatically created sequence activity](./media/autosurround2.png "AutoSurround2")
![An automatically created Sequence in the Body of a NoPersistScope.](./media/whats-new-in-wf-in-dotnet/auto-surround-sequence-activity.png)

### <a name="BKMK_PanMode"></a> Pan Mode

To more easily navigate a large workflow in the designer, pan mode can be enabled, allowing the developer to click and drag to move the visible portion of the workflow, rather than needing to use the scroll bars. The button to activate pan mode is in the lower right corner of the designer.

The following screenshot shows the pan button which is located at the bottom right corner of the workflow designer.

![Pan button in workflow designer](./media/panbutton.png "PanButton")
![The pan button highlighted in the workflow designer.](./media/whats-new-in-wf-in-dotnet/pan-button-workflow-designer.png)

The middle mouse button or space bar can also be used to pan the workflow designer.

Expand All @@ -149,7 +149,7 @@ In order to make hierarchical workflows easier to navigate, components of a work

The following screenshot of the completed workflow from the [Getting Started Tutorial](getting-started-tutorial.md) shows the outline view with a sequential workflow.

![Outline View in Workflow Designer](./media/outlineviewinworkflowdesigner.jpg "OutlineViewinWorkflowDesigner")
![Screenshot of outline view with a sequential workflow in Visual Studio.](./media/whats-new-in-wf-in-dotnet/outline-view-in-workflow-designer.jpg)

### <a name="BKMK_CSharpExpressions"></a> C# Expressions

Expand All @@ -169,17 +169,17 @@ In [!INCLUDE[netfx40_short](../../../includes/netfx40-short-md.md)], connections

The following screenshot shows the attachment points that become visible when an activity is dragged from the toolbox.

![Flowchart start node showing autoconnect points](./media/autoconnect1.png "Autoconnect1")
![Flowchart start node showing auto-connect points](./media/whats-new-in-wf-in-dotnet/auto-connect-points-start-node.png)

Activities can also be dragged onto connections between flowchart nodes and states to auto-insert the node between two other nodes. The following screenshot shows the highlighted connecting line where activities can be dragged from the toolbox and dropped.

![Auto&#45;insert handle for dropping activities](./media/autoinsert.png "Autoinsert")
![Auto-insert handle for dropping activities](./media/whats-new-in-wf-in-dotnet/auto-insert-connecting-line.png)

### <a name="BKMK_Annotations"></a> Designer Annotations

To facilitate developing larger workflows, the designer now supports adding annotations to help keep track of the design process. Annotation can be added to activities, states, flowchart nodes, variables and arguments. The following screenshot shows the context menu used to add annotations to the designer.

![Annotation context menu](./media/annotationdialog.png "annotationdialog")
![Screenshot showing a menu for adding annotations.](./media/whats-new-in-wf-in-dotnet/designer-annotations-context-menu.png)

### Debugging states

Expand Down Expand Up @@ -227,7 +227,7 @@ State machine workflows were introduced as part of the .NET Framework 4, version

The following screenshot shows the completed state machine workflow from the [Getting Started Tutorial](getting-started-tutorial.md) step [How to: Create a State Machine Workflow](how-to-create-a-state-machine-workflow.md).

![Completed State Machine Workflow](./media/wfstatemachinegettingstartedtutorialcomplete.JPG "WFStateMachineGettingStartedTutorialComplete")
![Illustration that shows the completed state machine workflow.](./media/whats-new-in-wf-in-dotnet/complete-state-machine-workflow.jpg)

For more information on creating state machine workflows, see [State Machine Workflows](state-machine-workflows.md).

Expand Down