Answered by:
Bug in Workflow Designer with FlowSwitch

Question
-
I discovered a bug in the designer. With FlowDecision or FlowSwitch activities, the Condition (or Expression) is displayed to the right of the activity. If you place another activity in the same place on the pallette, the designer gets stuck in an infinite loop, and hangs. I have a .xaml file that demonstrates this problem if it would be helpful to find and debug.Sunday, November 1, 2009 9:51 PM
Answers
-
Hi Mark,
I tried your xaml in RTM build, but I can't repro your issue. I think that might get fixed finally in RTM.
thanks,
Anders
This posting is provided "AS IS" and confers no rights or warranties.- Proposed as answer by Karl ReinschMicrosoft employee Tuesday, June 29, 2010 5:01 PM
- Marked as answer by Mark J Collins Wednesday, June 30, 2010 1:10 AM
Tuesday, June 29, 2010 1:44 PM
All replies
-
Hi Mark,
Can you share your xaml file? I tried to reproduce your bug but withou success. (VS 2010 Ultimate beta 2)Sunday, November 1, 2009 10:10 PM -
Mark, can you file a bug on connect and submit the file. We've found a few places where we manage to get WPF stuck in an infinite layout loop, which obviously has some negative performance aspects to it :-). We've fixed some of them after beta2, but it would be great to take a look at your project to confirm.
Thanks,
matt
Program Manager -- wf designer -- http://blogs.msdn.com/mwinkleMonday, November 2, 2009 1:03 AM -
Bug #507377 was submitted. Just load the attached .xaml file and, unless you've already fixed the bug, only half of the diagram will be drawn and case #4 is flashing.
- Marked as answer by edhickey Friday, November 6, 2009 5:14 PM
- Unmarked as answer by Mark J Collins Tuesday, February 9, 2010 11:58 PM
Monday, November 2, 2009 3:21 AM -
This is still not fixed in RC. The symptoms seems to be somewhat random but one of the FlowStep branches continues to flash in the designer like it's continuously redrawing. Zooming and panning either doesn't work or is unresponsive. The code compiles are runs fine but the designer is basically broke. Here is the xaml file:
<Activity mc:Ignorable="sap" x:Class="Chapter03.Workflow1" sap:VirtualizedContainerService.HintSize="902.4,964.8" mva:VisualBasic.Settings="Assembly references and imported namespaces for internal implementation" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:s4="clr-namespace:System;assembly=System.ServiceModel" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Flowchart sad:XamlDebuggerXmlReader.FileName="C:\Users\mark\Documents\Books\WF40\Code\Chapter03\Chapter03\Workflow1.xaml" sap:VirtualizedContainerService.HintSize="862.4,924.8"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">False</x:Boolean> <av:Point x:Key="ShapeLocation">380,2.5</av:Point> <av:Size x:Key="ShapeSize">60,75.2</av:Size> <av:PointCollection x:Key="ConnectorLocation">410,77.5 410,107.5 410,109.5</av:PointCollection> <x:Double x:Key="Width">848.96792768664159</x:Double> <x:Double x:Key="Height">888.21078004686944</x:Double> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <Flowchart.StartNode> <FlowStep x:Name="__ReferenceID1"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">304.5,109.5</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> <av:PointCollection x:Key="ConnectorLocation">410.1,171.9 410.1,201.9 410,201.9 410,202.5</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Hello" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Hello, World!" /> <FlowStep.Next> <FlowDecision x:Name="__ReferenceID2" Condition="[DateTime.Now.Hour >= 12]" sap:VirtualizedContainerService.HintSize="60,75.2"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">380,202.5</av:Point> <av:Size x:Key="ShapeSize">60,75.2</av:Size> <x:String x:Key="FalseLabel">Morning</x:String> <x:String x:Key="TrueLabel">Afternoon</x:String> <av:PointCollection x:Key="FalseConnector">440,240 544.5,240</av:PointCollection> <av:PointCollection x:Key="TrueConnector">380,240 245,240 245,312.5</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <FlowDecision.True> <FlowDecision x:Name="__ReferenceID4" Condition="[DateTime.Now.Hour >= 18]" sap:VirtualizedContainerService.HintSize="60,75.2"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">200,312.5</av:Point> <av:Size x:Key="ShapeSize">60,75.2</av:Size> <x:String x:Key="FalseLabel">Afternoon</x:String> <x:String x:Key="TrueLabel">Evening</x:String> <av:PointCollection x:Key="TrueConnector">200,350 110,350 110,409.5</av:PointCollection> <av:PointCollection x:Key="FalseConnector">260,350.1 350,350.1 350,408.8</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <FlowDecision.True> <FlowStep x:Name="__ReferenceID5"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">4.5,409.5</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> <av:PointCollection x:Key="ConnectorLocation">110.1,471.9 110.1,501.9 335,501.9 335,542.5</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Evening" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Good Evening" /> <FlowStep.Next> <FlowSwitch x:TypeArguments="x:Int32" x:Name="__ReferenceID0" Expression="[CInt(((DateTime.Now.Month Mod 12) + 1) / 4) - 1]" sap:VirtualizedContainerService.HintSize="60,75.2"> <FlowSwitch.Default> <FlowStep x:Name="__ReferenceID9"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">244.5,719.5</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Default" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="["Season calculated as: " + CInt(((DateTime.Now.Month Mod 12) + 1) / 4).ToString()]" /> </FlowStep> </FlowSwitch.Default> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">320,542.4</av:Point> <av:Size x:Key="ShapeSize">60,75.2</av:Size> <av:PointCollection x:Key="Default">350,617.6 350,647.24 350.1,647.24 350.1,719.5</av:PointCollection> <av:PointCollection x:Key="1Connector">320,598.8 285.7,598.8 285.7,670.7 255.7,670.7</av:PointCollection> <av:PointCollection x:Key="2Connector">380,598.8 410,598.8 410,670 444.4,670</av:PointCollection> <av:PointCollection x:Key="4Connector">380,580 410,580 454.5,580</av:PointCollection> <av:PointCollection x:Key="3Connector">380,580 454.4,580</av:PointCollection> <av:PointCollection x:Key="0Connector">320,580 290,580 290,580.7 245.7,580.7</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <FlowStep x:Key="0" x:Name="__ReferenceID7"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">34.5,549.5</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Sprint" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Happy Spring" /> </FlowStep> <FlowStep x:Key="1" x:Name="__ReferenceID8"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">44.5,639.5</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Summer" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Happy Summer" /> </FlowStep> <FlowStep x:Key="2" x:Name="__ReferenceID10"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">444.4,638.8</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Autumn" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Happy Autumn" /> </FlowStep> <FlowStep x:Key="3" x:Name="__ReferenceID11"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">454.4,548.8</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Winter" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Happy Winter" /> </FlowStep> </FlowSwitch> </FlowStep.Next> </FlowStep> </FlowDecision.True> <FlowDecision.False> <FlowStep x:Name="__ReferenceID6"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">244.4,408.8</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> <av:PointCollection x:Key="ConnectorLocation">350,471.2 350,542.5</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Afternoon" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Good Afternoon" /> <FlowStep.Next> <x:Reference>__ReferenceID0</x:Reference> </FlowStep.Next> </FlowStep> </FlowDecision.False> </FlowDecision> </FlowDecision.True> <FlowDecision.False> <FlowStep x:Name="__ReferenceID3"> <sap:WorkflowViewStateService.ViewState> <scg3:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">544.5,209.5</av:Point> <av:Size x:Key="ShapeSize">211.2,62.4</av:Size> <av:PointCollection x:Key="ConnectorLocation">650.1,271.9 650.1,512.5 365,512.5 365,542.5</av:PointCollection> </scg3:Dictionary> </sap:WorkflowViewStateService.ViewState> <WriteLine DisplayName="Morning" sap:VirtualizedContainerService.HintSize="211.2,62.4" Text="Good Morning" /> <FlowStep.Next> <x:Reference>__ReferenceID0</x:Reference> </FlowStep.Next> </FlowStep> </FlowDecision.False> </FlowDecision> </FlowStep.Next> </FlowStep> </Flowchart.StartNode> <x:Reference>__ReferenceID1</x:Reference> <x:Reference>__ReferenceID2</x:Reference> <x:Reference>__ReferenceID3</x:Reference> <x:Reference>__ReferenceID4</x:Reference> <x:Reference>__ReferenceID5</x:Reference> <x:Reference>__ReferenceID6</x:Reference> <x:Reference>__ReferenceID0</x:Reference> <x:Reference>__ReferenceID7</x:Reference> <x:Reference>__ReferenceID8</x:Reference> <x:Reference>__ReferenceID9</x:Reference> <x:Reference>__ReferenceID10</x:Reference> <x:Reference>__ReferenceID11</x:Reference> </Flowchart> </Activity>
Wednesday, February 10, 2010 12:03 AM -
Hi Mark - are you still observing this in RTM?Monday, June 28, 2010 11:43 PM
-
Hi Mark,
I tried your xaml in RTM build, but I can't repro your issue. I think that might get fixed finally in RTM.
thanks,
Anders
This posting is provided "AS IS" and confers no rights or warranties.- Proposed as answer by Karl ReinschMicrosoft employee Tuesday, June 29, 2010 5:01 PM
- Marked as answer by Mark J Collins Wednesday, June 30, 2010 1:10 AM
Tuesday, June 29, 2010 1:44 PM -
Yes, the designer seems spretty solid in RTM. Thanks.Wednesday, June 30, 2010 1:11 AM