How to create folder locally in system through UIpath - uipath

I want to create one master folder in C or D drive through UI path studio.After creating master folder,i want to crate three folder inside the master folder.
How to resolve this issue in UIpath?

Use the Create Directory activity in UiPath.
Just search for it in the Activites window.

you have to mention the path correctly like the below:-
"C:\Users\Documents\UiPath\Your_Folder_Name"

Create directory Activity will be the key to do this, before doing so, please make sure you (your UiPath) do have the privilege for creating folder in your C-Drive and/or D-Drive (if your C-Drive is readonly for your logged in user, the robot cannot do anything).
I wrote the following simple example which works for me, simply save them into a notepad with extension .xaml, and open with UiPath. By running it, your C-Drive and D-Drive should both be created with a folder called MasterFolderC or MasterFolderD, with 3 subfolders underneath.
Hope it helps.
<Activity mc:Ignorable="sap sap2010 sads" x:Class="Main" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="Main_1"
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:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
xmlns:ui="http://schemas.uipath.com/workflow/activities"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>UiPath.Core</AssemblyReference>
<AssemblyReference>UiPath.Core.Activities</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Flowchart sap2010:WorkflowViewState.IdRef="Flowchart_1">
<Flowchart.Variables>
<Variable x:TypeArguments="x:String" Default="C:\MasterFolderC\" Name="MasterPathC" />
<Variable x:TypeArguments="x:String" Default="D:\MasterFolderD\" Name="MasterPathD" />
</Flowchart.Variables>
<Flowchart.StartNode>
<FlowStep x:Name="__ReferenceID0" sap2010:WorkflowViewState.IdRef="FlowStep_4">
<Sequence DisplayName="Creating Folders" sap2010:WorkflowViewState.IdRef="Sequence_3">
<Sequence DisplayName="C-Drive" sap2010:WorkflowViewState.IdRef="Sequence_4">
<Sequence.Variables>
<Variable x:TypeArguments="x:Boolean" Name="pathExist" />
</Sequence.Variables>
<ui:PathExists DisplayName="Path exists" Exists="[pathExist]" sap2010:WorkflowViewState.IdRef="PathExists_2" Path="[MasterPathC]" PathType="Folder" />
<If Condition="[pathExist]" sap2010:WorkflowViewState.IdRef="If_7">
<If.Then>
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_5" Path="[MasterPathC]" />
</If.Then>
</If>
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_6" Path="[MasterPathC + "SubFolder1"]" />
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_7" Path="[MasterPathC + "SubFolder2"]" />
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_8" Path="[MasterPathC + "SubFolder3"]" />
</Sequence>
<Sequence DisplayName="D-Drive" sap2010:WorkflowViewState.IdRef="Sequence_5">
<Sequence.Variables>
<Variable x:TypeArguments="x:Boolean" Name="pathExist" />
</Sequence.Variables>
<ui:PathExists DisplayName="Path exists" Exists="[pathExist]" sap2010:WorkflowViewState.IdRef="PathExists_3" Path="[MasterPathD]" PathType="Folder" />
<If Condition="[pathExist]" sap2010:WorkflowViewState.IdRef="If_8">
<If.Then>
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_9" Path="[MasterPathD]" />
</If.Then>
</If>
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_10" Path="[MasterPathD + "SubFolder1"]" />
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_11" Path="[MasterPathD + "SubFolder2"]" />
<ui:CreateDirectory ContinueOnError="{x:Null}" DisplayName="Create directory" sap2010:WorkflowViewState.IdRef="CreateDirectory_12" Path="[MasterPathD + "SubFolder3"]" />
</Sequence>
</Sequence>
</FlowStep>
</Flowchart.StartNode>
<x:Reference>__ReferenceID0</x:Reference>
<sads:DebugSymbol.Symbol>dzFDOlxVc2Vyc1xtbWlhb1xEZXNrdG9wXFRlc3RpbmdXb3JrcGxhY2VcTWFpbi54YW1sIDsDZA8CAQE9ND1HAgEDPjQ+RwIBAkIJXxQCAQRDC1AWAgEaUQteFgIBBUcNR6MBAgEqSA1MEgIBJE0NTb8BAgEhTg1OvwECAR5PDU+/AQIBG1UNVaMBAgEVVg1aEgIBD1sNW8ABAgEMXA1cwAECAQldDV3AAQIBBkc9R0oCAS1Hf0eOAQIBK0gbSCgCASVKEUqqAQIBJ02UAU28AQIBIk6UAU68AQIBH0+UAU+8AQIBHFU9VUoCARhVf1WOAQIBFlYbVigCARBYEViqAQIBEluVAVu9AQIBDVyVAVy9AQIBCl2VAV29AQIBB0qYAUqnAQIBKFiYAVinAQIBEw==</sads:DebugSymbol.Symbol>
</Flowchart>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="PathExists_2" sap:VirtualizedContainerService.HintSize="464,89" />
<sap2010:ViewStateData Id="CreateDirectory_5" sap:VirtualizedContainerService.HintSize="200,22" />
<sap2010:ViewStateData Id="If_7" sap:VirtualizedContainerService.HintSize="464,208" />
<sap2010:ViewStateData Id="CreateDirectory_6" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="CreateDirectory_7" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="CreateDirectory_8" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="200,51">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="PathExists_3" sap:VirtualizedContainerService.HintSize="464,89" />
<sap2010:ViewStateData Id="CreateDirectory_9" sap:VirtualizedContainerService.HintSize="200,22" />
<sap2010:ViewStateData Id="If_8" sap:VirtualizedContainerService.HintSize="464,208" />
<sap2010:ViewStateData Id="CreateDirectory_10" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="CreateDirectory_11" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="CreateDirectory_12" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="Sequence_5" sap:VirtualizedContainerService.HintSize="200,51">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="222,266">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="FlowStep_4">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<av:Point x:Key="ShapeLocation">200,127.5</av:Point>
<av:Size x:Key="ShapeSize">200,51</av:Size>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="Flowchart_1" sap:VirtualizedContainerService.HintSize="614,636">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<av:Point x:Key="ShapeLocation">270,2.5</av:Point>
<av:Size x:Key="ShapeSize">60,75</av:Size>
<av:PointCollection x:Key="ConnectorLocation">300,77.5 300,127.5</av:PointCollection>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="Main_1" sap:VirtualizedContainerService.HintSize="654,716" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>

Related

UiPath Automating clicks of a list sequentially on a webpage

This is the website I am looking at.
In this website there is a list of companies where I can click into them:
Click the name of the company
Click the "Annual Report" button
Click the "Annual Report & CG Report - 2018" link
There are 788 companies in this list and I wish to repeat this process for the whole list.
Is this possible?
Currently I used Data Scraping -> Attach Browser url -> Extract Structured Data. After that I am stuck.
For me that sounds pretty simple:
go to overview
download the list via data scraping
for each on that list and surf to each of those urls
on the url do the things you said, like clicking the Annual Report and then Annual Report & CG Report - 2018
So the usual structure of a UiPath process is this one:
This is the Main.xaml visual overview that works on your example:
And this is the Main.xaml code:
<Activity mc:Ignorable="sap sap2010" x:Class="Main" mva:VisualBasic.Settings="{x:Null}" sap:VirtualizedContainerService.HintSize="530,1075" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<scg:List x:TypeArguments="x:String" Capacity="22">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>UiPath.CV</x:String>
</scg:List>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<scg:List x:TypeArguments="AssemblyReference" Capacity="18">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>UiPath.CV</AssemblyReference>
<AssemblyReference>System.ValueTuple</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
</scg:List>
</TextExpression.ReferencesForImplementation>
<Sequence sap:VirtualizedContainerService.HintSize="510,975" sap2010:WorkflowViewState.IdRef="Sequence_3">
<Sequence.Variables>
<Variable x:TypeArguments="sd:DataTable" Default="[New System.Data.DataTable]" Name="ExtractDataTable" />
<Variable x:TypeArguments="ui:Browser" Name="Browser" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:OpenBrowser CommunicationMethod="{x:Null}" Hidden="{x:Null}" NewSession="{x:Null}" Private="{x:Null}" BrowserType="Firefox" DisplayName="Open Browser" sap:VirtualizedContainerService.HintSize="468,351" sap2010:WorkflowViewState.IdRef="OpenBrowser_1" UiBrowser="[Browser]" Url="https://www.bursamalaysia.com/trade/trading_resources/listing_directory/main_market">
<ui:OpenBrowser.Body>
<ActivityAction x:TypeArguments="x:Object">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="ContextTarget" />
</ActivityAction.Argument>
<ui:BrowserScope Browser="{x:Null}" SearchScope="{x:Null}" TimeoutMS="{x:Null}" UiBrowser="{x:Null}" BrowserType="Firefox" DisplayName="Attach Browser" sap:VirtualizedContainerService.HintSize="434,252" sap2010:WorkflowViewState.IdRef="BrowserScope_2" InformativeScreenshot="49520eaf054f3a2d88e58aa9f0f1cdb7" Selector="<html app='firefox.exe' title='Main Market' />">
<ui:BrowserScope.Body>
<ActivityAction x:TypeArguments="x:Object">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="ContextTarget" />
</ActivityAction.Argument>
<ui:ExtractData DelayBetweenPagesMS="{x:Null}" ContinueOnError="True" DataTable="[ExtractDataTable]" DisplayName="Extract Structured Data" ExtractMetadata="<extract><column exact='1' name='Name' attr='text' name2='URL' attr2='href'><webctrl tag='tr'/><webctrl tag='td' class=' text-left position-relative'/><webctrl tag='a' class='company-announcement-link' idx='1'/></column></extract>" sap:VirtualizedContainerService.HintSize="334,106" sap2010:WorkflowViewState.IdRef="ExtractData_2" MaxNumberOfResults="100" NextLinkSelector="<webctrl parentid='DataTables_Table_0_next' tag='A' />" SimulateClick="True">
<ui:ExtractData.Target>
<ui:Target ClippingRegion="{x:Null}" Element="{x:Null}" InformativeScreenshot="c9106f042e4e67a92a010ed284896366" Selector="<webctrl parentid='DataTables_Table_0' tag='TBODY' />" WaitForReady="COMPLETE">
<ui:Target.TimeoutMS>
<InArgument x:TypeArguments="x:Int32" />
</ui:Target.TimeoutMS>
</ui:Target>
</ui:ExtractData.Target>
</ui:ExtractData>
</ActivityAction>
</ui:BrowserScope.Body>
</ui:BrowserScope>
</ActivityAction>
</ui:OpenBrowser.Body>
</ui:OpenBrowser>
<ui:ForEachRow CurrentIndex="{x:Null}" DataTable="[ExtractDataTable]" DisplayName="For Each Row" sap:VirtualizedContainerService.HintSize="468,492" sap2010:WorkflowViewState.IdRef="ForEachRow_1">
<ui:ForEachRow.Body>
<ActivityAction x:TypeArguments="sd:DataRow">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="sd:DataRow" Name="row" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="376,344" sap2010:WorkflowViewState.IdRef="Sequence_7">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ui:NavigateTo Browser="[Browser]" DisplayName="Navigate To" sap:VirtualizedContainerService.HintSize="334,59" sap2010:WorkflowViewState.IdRef="NavigateTo_1" Url="["https://www.bursamalaysia.com" + row("Url").ToString]" />
<Delay Duration="00:00:05" sap:VirtualizedContainerService.HintSize="334,22" sap2010:WorkflowViewState.IdRef="Delay_1" />
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,91" sap2010:WorkflowViewState.IdRef="LogMessage_3" Level="Info" Message="["Here you do all the stuff like Click Annual Report..."]" />
</Sequence>
</ActivityAction>
</ui:ForEachRow.Body>
</ui:ForEachRow>
</Sequence>
</Activity>

uipath error Click on onbeforeunload popup not working in chrome

I am facing issue with onbeforeunload window event popup in chrome. I have installed chrome extension.
Steps:
Create Open Browser activity with url:
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload"\
Create Click Event with selector:
<webctrl aaname='Click here to go to w3schools.com' tag='A' />
Create Click Event with selector:
<ctrl name='Leave site?' role='dialog' /><ctrl name='Leave' role='push button' />
My problem is the second click is not working.
Main.xaml:
<Activity mc:Ignorable="sap sap2010 sads" x:Class="Main" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="Main_1"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
xmlns:ui="http://schemas.uipath.com/workflow/activities"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>UiPath.Core</AssemblyReference>
<AssemblyReference>UiPath.Core.Activities</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
<AssemblyReference>System.ServiceModel</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<ui:OpenBrowser UiBrowser="{x:Null}" BrowserType="Chrome" DisplayName="Open browser" Hidden="False" sap2010:WorkflowViewState.IdRef="OpenBrowser_3" NewSession="True" Private="False" Url="https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload">
<ui:OpenBrowser.Body>
<ActivityAction x:TypeArguments="x:Object">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="ContextTarget" />
</ActivityAction.Argument>
<Sequence DisplayName="Do" sap2010:WorkflowViewState.IdRef="Sequence_25">
<ui:Click DelayBefore="{x:Null}" DelayMS="{x:Null}" ClickType="CLICK_SINGLE" DisplayName="Click 'A https://www.w3school...'" sap2010:WorkflowViewState.IdRef="Click_6" KeyModifiers="None" MouseButton="BTN_LEFT" SendWindowMessages="False" SimulateClick="False">
<ui:Click.CursorPosition>
<ui:CursorPosition Position="Center">
<ui:CursorPosition.OffsetX>
<InArgument x:TypeArguments="x:Int32" />
</ui:CursorPosition.OffsetX>
<ui:CursorPosition.OffsetY>
<InArgument x:TypeArguments="x:Int32" />
</ui:CursorPosition.OffsetY>
</ui:CursorPosition>
</ui:Click.CursorPosition>
<ui:Click.Target>
<ui:Target ClippingRegion="{x:Null}" Element="{x:Null}" TimeoutMS="{x:Null}" InformativeScreenshot="ad281f65b6ab6cc6ce588fb1cf53160a" Selector="<webctrl aaname='Click here to go to w3schools.com' tag='A' />" WaitForReady="INTERACTIVE" />
</ui:Click.Target>
</ui:Click>
<ui:Click DelayBefore="{x:Null}" DelayMS="{x:Null}" ClickType="CLICK_SINGLE" DisplayName="Click 'push button Leave'" sap2010:WorkflowViewState.IdRef="Click_5" KeyModifiers="None" MouseButton="BTN_LEFT" SendWindowMessages="False" SimulateClick="False">
<ui:Click.CursorPosition>
<ui:CursorPosition Position="Center">
<ui:CursorPosition.OffsetX>
<InArgument x:TypeArguments="x:Int32" />
</ui:CursorPosition.OffsetX>
<ui:CursorPosition.OffsetY>
<InArgument x:TypeArguments="x:Int32" />
</ui:CursorPosition.OffsetY>
</ui:CursorPosition>
</ui:Click.CursorPosition>
<ui:Click.Target>
<ui:Target ClippingRegion="{x:Null}" Element="{x:Null}" TimeoutMS="{x:Null}" InformativeScreenshot="a52efda054f51d9ac88fd53b22f4663a" Selector="<ctrl name='Leave site?' role='dialog' /><ctrl name='Leave' role='push button' />" WaitForReady="INTERACTIVE" />
</ui:Click.Target>
</ui:Click>
</Sequence>
</ActivityAction>
</ui:OpenBrowser.Body>
<sads:DebugSymbol.Symbol>dyhFOlxVaVBhdGhXb3Jrc3BhY2VcV2hhdHNhcHBNc2dcTWFpbi54YW1sBzoDYxQCAQE6vQE6iQICAQdACV8UAgECQQtPFgIBBVALXhYCAQNNngFN5AECAQZcngFc/QECAQQ=</sads:DebugSymbol.Symbol>
</ui:OpenBrowser>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="Click_6" sap:VirtualizedContainerService.HintSize="314,106" />
<sap2010:ViewStateData Id="Click_5" sap:VirtualizedContainerService.HintSize="314,106" />
<sap2010:ViewStateData Id="Sequence_25" sap:VirtualizedContainerService.HintSize="336,376">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="OpenBrowser_3" sap:VirtualizedContainerService.HintSize="414,475" />
<sap2010:ViewStateData Id="Main_1" sap:VirtualizedContainerService.HintSize="454,635" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>
Which not working with script alerts.
Please find the solved workflow here. It's a tricky way to solve your problem.

Wix installer - using the same property for reading from the registry and setting during the UI

I Have a (simple) wix project. In the project, I have a property which gets it's value from the registry (if such registry key exists).
On a dialog, the user sees the value of that property and then can change it.
For some reason, I cannot see that the property gets the value from the registry...
Will appreciate your help:
from the wix project:
<!-- The Registry group of the installation package. -->
<ComponentGroup Id="RegistryGroup">
<Component Id="_70B15100_F11D_48BF_8349_3E3B83157C54" Guid="2F344400-5C37-4CAE-902E-7100FDD2DB22" Transitive="no" Directory="TARGETDIR">
<RegistryKey Root="HKLM" Key="Software\[Manufacturer]\YYY" ForceCreateOnInstall="no" ForceDeleteOnUninstall="no">
<RegistryValue Type="string" Name="ServerPort" Value="[SERVERPORT]" />
<RegistryValue Type="string" Name="ServerAddress" Value="[SERVERADDRESS]" />
</RegistryKey>
</Component>
</ComponentGroup>
<!-- The composite feature of the installation package. -->
<Feature Id="CompleteInstall" Title="All Files" Level="1">
<ComponentGroupRef Id="FileSystemGroup" />
<ComponentGroupRef Id="RegistryGroup" />
</Feature>
<Upgrade Id="{D627BB25-59CB-4387-AF42-0127AC701DBE}">
<UpgradeVersion Minimum="3.11.7" Property="NEWPRODUCTFOUND" OnlyDetect="yes" IncludeMinimum="no" Language="1033" />
<UpgradeVersion Maximum="3.11.7" Property="OLDPRODUCTFOUND" OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="no" Language="1033" />
</Upgrade>
<InstallExecuteSequence>
<Custom Action="CA_CreateConfig" Sequence="1" />
<Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR = ""]]></Custom>
<Custom Action="PreventDowngrading" After="FindRelatedProducts"><![CDATA[NEWPRODUCTFOUND]]></Custom>
<Custom Action="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit.SetProperty" After="StartServices"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom>
<Custom Action="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit" After="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom>
<Custom Action="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install.SetProperty" After="_C976A2F6_5EC5_4EE5_898C_4A660FC42C9F.Commit"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom>
<Custom Action="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install" After="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom>
<Custom Action="_854AE351_70ED_4318_82B0_B079EDD6C3CD.Rollback.SetProperty" After="_458FD9FC_2B2B_45E5_B89F_E5C67FA1AB86.Install"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom>
<Custom Action="_854AE351_70ED_4318_82B0_B079EDD6C3CD.Rollback" After="_854AE351_70ED_4318_82B0_B079EDD6C3CD.Rollback.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769>2]]></Custom>
<Custom Action="_BEF9A9A6_06F8_43FA_85B9_F40521FCC587.Uninstall.SetProperty" After="MsiUnpublishAssemblies"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769=2]]></Custom>
<Custom Action="_BEF9A9A6_06F8_43FA_85B9_F40521FCC587.Uninstall" After="_BEF9A9A6_06F8_43FA_85B9_F40521FCC587.Uninstall.SetProperty"><![CDATA[(NOT DISABLESERVICE) AND $com_DCAB0809_69B4_442E_82E5_E600A7E1E769=2]]></Custom>
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action="CustomTextA_SetProperty_EDIT1" Sequence="701" />
<Custom Action="CustomTextA_SetProperty_EDIT2" Sequence="702" />
<Custom Action="CustomTextA_SetProperty_EDIT3" Sequence="703" />
<Custom Action="CustomTextA_SetProperty_EDIT4" Sequence="704" />
</InstallExecuteSequence>
<InstallUISequence>
<Custom Action="ERRCA_UIANDADVERTISED" Sequence="5"><![CDATA[ProductState=1]]></Custom>
<AppSearch Sequence="100" />
<FindRelatedProducts Sequence="200" />
<LaunchConditions Sequence="400"><![CDATA[NOT Installed]]></LaunchConditions>
<CCPSearch Sequence="500"><![CDATA[NOT Installed]]></CCPSearch>
<RMCCPSearch Sequence="600"><![CDATA[NOT Installed]]></RMCCPSearch>
<ValidateProductID Sequence="700" />
<Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR = ""]]></Custom>
<Custom Action="PreventDowngrading" After="FindRelatedProducts"><![CDATA[NEWPRODUCTFOUND]]></Custom>
<CostInitialize Sequence="800" />
<FileCost Sequence="900" />
<IsolateComponents Sequence="950"><![CDATA[RedirectedDllSupport]]></IsolateComponents>
<CostFinalize Sequence="1000" />
<ExecuteAction Sequence="1300" />
<Custom Action="CustomTextA_SetProperty_EDIT1" Sequence="701" />
<Custom Action="CustomTextA_SetProperty_EDIT2" Sequence="702" />
<Custom Action="CustomTextA_SetProperty_EDIT3" Sequence="703" />
<Custom Action="CustomTextA_SetProperty_EDIT4" Sequence="704" />
<Show Dialog="CustomTextA" Sequence="1001"><![CDATA[Installed="" AND NOT RESUME]]></Show>
<Show Dialog="ProgressForm" Sequence="1299" />
<Show Dialog="FatalErrorForm" OnExit="error"><![CDATA[NOT HideFatalErrorForm]]></Show>
<Show Dialog="UserExitForm" OnExit="cancel" />
<Show Dialog="FinishedForm" OnExit="success" />
<Custom Action="VSDCA_FolderForm_AllUsers" Sequence="997"><![CDATA[Installed="" AND NOT RESUME AND ALLUSERS=1]]></Custom>
<Show Dialog="ResumeForm" Sequence="998"><![CDATA[Installed="" AND RESUME]]></Show>
<Show Dialog="MaintenanceForm" Sequence="999"><![CDATA[Installed<>""]]></Show>
</InstallUISequence>
<AdminUISequence>
<Custom Action="DIRCA_TARGETDIR" Before="CostInitialize"><![CDATA[TARGETDIR = ""]]></Custom>
<CostInitialize Sequence="800" />
<FileCost Sequence="900" />
<CostFinalize Sequence="1000" />
<ExecuteAction Sequence="1300" />
<Show Dialog="AdminWelcomeForm" Sequence="1001"><![CDATA[Installed="" AND NOT RESUME]]></Show>
<Show Dialog="AdminProgressForm" Sequence="1299" />
<Show Dialog="AdminFatalErrorForm" OnExit="error" />
<Show Dialog="AdminUserExitForm" OnExit="cancel" />
<Show Dialog="AdminFinishedForm" OnExit="success" />
<Show Dialog="AdminResumeForm" Sequence="998"><![CDATA[Installed="" AND RESUME]]></Show>
<Show Dialog="AdminMaintenanceForm" Sequence="999"><![CDATA[Installed<>""]]></Show>
</AdminUISequence>
<UI Id="Base">
<Error Id="1001">Error [1]. [2]</Error>
<Property Id="VSDNETURLMSG" Value="This setup requires the .NET Framework version [1]. Please install the .NET Framework and run this setup again. The .NET Framework can be obtained from the web. Would you like to do this now?" />
<Property Id="VSDIISMSG" Value="This setup requires Internet Information Server 5.1 or higher and Windows XP or higher. This setup cannot be installed on Windows 2000. Please install Internet Information Server or a newer operating system and run this setup again." />
<Property Id="VSDUIANDADVERTISED" Value="This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic." />
<Property Id="VSDNETMSG" Value="This setup requires the .NET Framework version [1]. Please install the .NET Framework and run this setup again." />
<Property Id="VSDINVALIDURLMSG" Value="The specified path '[2]' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager." />
<Property Id="VSDVERSIONMSG" Value="Unable to install because a newer version of this product is already installed." />
</UI>
<CustomAction Id="CustomTextA_SetProperty_EDIT1" Property="SERVERADDRESS" Value="[SERVERADDRESS]" Execute="firstSequence" />
<CustomAction Id="CustomTextA_SetProperty_EDIT2" Property="SERVERPORT" Value="[SERVERPORT]" Execute="firstSequence" />
<CustomAction Id="CustomTextA_SetProperty_EDIT3" Property="EDITA3" Value="" Execute="firstSequence" />
<CustomAction Id="CustomTextA_SetProperty_EDIT4" Property="EDITA4" Value="" Execute="firstSequence" />
<CustomAction Id="VSDCA_FolderForm_AllUsers" Property="FolderForm_AllUsers" Value="ALL" />
<CustomAction Id="ERRCA_UIANDADVERTISED" Error="[VSDUIANDADVERTISED]" />
<Property Id="CustomTextA_NextArgs" Value="EulaForm" />
<Property Id="EulaForm_PrevArgs" Value="CustomTextA" />
<Property Id="EulaForm_NextArgs" Value="WelcomeForm" />
<Property Id="WelcomeForm_PrevArgs" Value="EulaForm" />
<Property Id="WelcomeForm_NextArgs" Value="ConfirmInstallForm" />
<Property Id="ConfirmInstallForm_PrevArgs" Value="WelcomeForm" />
<UI Id="CustomText1Dlg">
<Dialog Id="CustomTextA" X="50" Y="50" Width="373" Height="287" Title="[ProductName]">
<Control Id="NextButton" Type="PushButton" X="300" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}&Next >" TabSkip="no" Default="yes">
<Publish Event="EndDialog" Value="Return"><![CDATA[CustomTextA_NextArgs=""]]></Publish>
<Publish Event="NewDialog" Value="[CustomTextA_NextArgs]"><![CDATA[CustomTextA_NextArgs<>""]]></Publish>
</Control>
<Control Id="Label1" Type="Text" X="18" Y="108" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Server Address (leave empty for default)" TabSkip="no" />
<Control Id="Edit1" Type="Edit" X="18" Y="120" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="SERVERADDRESS" Sunken="yes" />
<Control Id="Label2" Type="Text" X="18" Y="144" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Server Port (leave empty for default)" TabSkip="no" />
<Control Id="Edit2" Type="Edit" X="18" Y="156" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="SERVERPORT" Sunken="yes" />
<Control Id="Label3" Type="Text" X="18" Y="180" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Edit3:" Hidden="yes" TabSkip="no" />
<Control Id="Edit3" Type="Edit" X="18" Y="192" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="EDITA3" Hidden="yes" Sunken="yes" />
<Control Id="Label4" Type="Text" X="18" Y="216" Width="348" Height="12" Text="{\VSI_MS_Sans_Serif13.0_0_0}Edit4:" Hidden="yes" TabSkip="no" />
<Control Id="Edit4" Type="Edit" X="18" Y="228" Width="348" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}" TabSkip="no" Property="EDITA4" Hidden="yes" Sunken="yes" />
<Control Id="CancelButton" Type="PushButton" X="156" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}Cancel" TabSkip="no" Cancel="yes">
<Publish Event="SpawnDialog" Value="Cancel" />
</Control>
<Control Id="PreviousButton" Type="PushButton" X="228" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}< &Back" TabSkip="no">
<Condition Action="disable"><![CDATA[CustomTextA_PrevArgs=""]]></Condition>
<Condition Action="enable"><![CDATA[CustomTextA_PrevArgs<>""]]></Condition>
<Publish Event="NewDialog" Value="[CustomTextA_PrevArgs]"><![CDATA[CustomTextA_PrevArgs<>""]]></Publish>
</Control>
<Control Id="BannerBmp" Type="Bitmap" X="0" Y="0" Width="375" Height="52" Text="_bbb3a8b4c218495cb88ea30ee85d4499" TabSkip="no" Disabled="yes" />
<Control Id="BodyText" Type="Text" X="9" Y="63" Width="354" Height="42" Text="{\VSI_MS_Sans_Serif13.0_0_0}The installed agent will use the following connection properties." TabSkip="yes" NoPrefix="yes" />
<Control Id="BannerText" Type="Text" X="9" Y="9" Width="306" Height="33" Text="{\VSI_MS_Sans_Serif16.0_1_0}Specify Connection Details" TabSkip="yes" Transparent="yes" NoPrefix="yes" />
<Control Id="Control273" Type="Line" X="0" Y="252" Width="375" Height="6" Text="{\VSI_MS_Sans_Serif13.0_0_0}MsiHorizontalLine" TabSkip="yes" Disabled="yes" />
<Control Id="Control278" Type="Line" X="0" Y="52" Width="375" Height="6" Text="{\VSI_MS_Sans_Serif16.0_1_0}MsiHorizontalLine" TabSkip="yes" Disabled="yes" />
</Dialog>
</UI>
You say that you are getting the value of the property from the registry, but that requires a RegistrySearch element and there doesn't seem to be one in your WiX source.
My problem was that I used a tool that automatically converted my vdproj to a wix project. This conversion was not perfect and it created a custom action and a set property that I did not need. Once these were deleted, everything worked perfectly.

Visual Studio Sharepoint 2013 Workflow not attaching to list

I have created a simple SP 2013 workflow in Visual Studio 2012. I configured it through the wizard to attach to a specific list. I am using a VM with windows server 2012, SP2013 in a standalone environment, and workflow manager. The solution deploys fine to SP and is activated, but does not get attached to the list. I went through the log files and found this:
Not enough information to determine a list for module "GuitarWorkflow". Assuming no list for this module.
Here is my elements/xaml contents:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="GuitarWorkflow" Url="wfsvc/9fdef811d07146f6a4153dbf70de81b0">
<File Url="WorkflowStartAssociation" Path="GuitarWorkflow\WorkflowStartAssociation" Type="Ghostable">
<Property Name="WSDisplayName" Value="GuitarWorkflow - Workflow Start" />
<Property Name="ContentType" Value="WorkflowServiceSubscription" />
<Property Name="WSPublishState" Value="3" />
<Property Name="WSEventType" Value="WorkflowStart" />
<Property Name="WSEnabled" Value="true" />
<Property Name="WSGUID" Value="d68c7819-fd0c-4cb3-9537-bc099cc42e2e" />
<Property Name="WSEventSourceGUID" Value="{$ListId:Lists/Guitars;}" />
<Property Name="Microsoft.SharePoint.ActivationProperties.ListId" Value="{$ListId:Lists/Guitars;}" />
<Property Name="HistoryListId" Value="{$ListId:Lists/Workflow History;}" />
<Property Name="RestrictToScope" Value="{$ListId:Lists/Guitars;}" />
<Property Name="TaskListId" Value="(None)" />
</File>
<File Url="ItemAddedAssociation" Path="GuitarWorkflow\ItemAddedAssociation" Type="Ghostable">
<Property Name="WSDisplayName" Value="GuitarWorkflow - Item Added" />
<Property Name="ContentType" Value="WorkflowServiceSubscription" />
<Property Name="WSPublishState" Value="3" />
<Property Name="WSEventType" Value="ItemAdded" />
<Property Name="WSEnabled" Value="true" />
<Property Name="WSGUID" Value="4aa20a2f-81d0-41eb-b93d-a2d22b8b5e49" />
<Property Name="WSEventSourceGUID" Value="{$ListId:Lists/Guitars;}" />
<Property Name="Microsoft.SharePoint.ActivationProperties.ListId" Value="{$ListId:Lists/Guitars;}" />
<Property Name="HistoryListId" Value="{$ListId:Lists/Workflow History;}" />
<Property Name="RestrictToScope" Value="{$ListId:Lists/Guitars;}" />
<Property Name="TaskListId" Value="(None)" />
</File>
<File Path="GuitarWorkflow\Workflow.xaml" Url="GuitarWorkflow/Workflow.xaml" >
<Property Name="RestrictToScope" Value="{$ListId:Lists/Guitars;}" />
<Property Name="RestrictToType" Value="List" />
</File>
</Module>
<ListInstance FeatureId="{2c63df2b-ceab-42c6-aeff-b3968162d4b1}"
TemplateType="4501"
Title="wfsvc"
Description="This list instance is used by SharePoint to keep track of workflows. Do not modify."
Url="wfsvc"
RootWebOnly="FALSE" />
</Elements>
Here is my workflow xaml:
<Activity mc:Ignorable="sap sap2010 sads" x:Class="GuitarWorkflow.GuitarWorkflow.Workflow" sap2010:ExpressionActivityEditor.ExpressionActivityEditor="C#" sap2010:WorkflowViewState.IdRef="GuitarWorkflow.GuitarWorkflow.Workflow_1"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
xmlns:msdad="clr-namespace:Microsoft.SharePoint.DesignTime.Activities.Design;assembly=Microsoft.SharePoint.DesignTime.Activities.Design"
xmlns:p="http://schemas.microsoft.com/workflow/2012/07/xaml/activities"
xmlns:p1="wf://workflow.windows.net/$Activities"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Text</x:String>
<x:String>System.Collections.ObjectModel</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>Microsoft.Activities</AssemblyReference>
<AssemblyReference>Microsoft.SharePoint.DesignTime.Activities</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization</AssemblyReference>
<AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>Microsoft.SharePoint</AssemblyReference>
<AssemblyReference>Microsoft.SharePoint.Client.ServerRuntime</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>GuitarWorkflow</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="p:DynamicValue" Name="dv_0" />
<Variable x:TypeArguments="x:String" Name="GuitarType">
<Variable.Default>
<mca:CSharpValue x:TypeArguments="x:String">dv_0["Guitar Type"].ToString()</mca:CSharpValue>
</Variable.Default>
</Variable>
<Variable x:TypeArguments="sco:Collection(x:String)" Name="CreateBy" />
<Variable x:TypeArguments="x:String" Name="initiator" />
</Sequence.Variables>
<p1:WriteToHistory sap2010:WorkflowViewState.IdRef="WriteToHistory_1" Message="The GuitarWorkflow has started." />
<p1:LookupSPListItem ItemGuid="{x:Null}" Properties="{x:Null}" sap2010:WorkflowViewState.IdRef="LookupSPListItem_1">
<p1:LookupSPListItem.ItemId>
<InArgument x:TypeArguments="x:Int32">
<p:ExpressionContainerValue x:TypeArguments="x:Int32">
<p1:GetCurrentItemId />
</p:ExpressionContainerValue>
</InArgument>
</p1:LookupSPListItem.ItemId>
<p1:LookupSPListItem.ListId>
<InArgument x:TypeArguments="s:Guid">
<mca:CSharpValue x:TypeArguments="s:Guid">System.Guid.Parse("{$ListId:Lists/Guitars;}")</mca:CSharpValue>
</InArgument>
</p1:LookupSPListItem.ListId>
<p1:LookupSPListItem.Result>
<OutArgument x:TypeArguments="p:DynamicValue">
<mca:CSharpReference x:TypeArguments="p:DynamicValue">dv_0</mca:CSharpReference>
</OutArgument>
</p1:LookupSPListItem.Result>
</p1:LookupSPListItem>
<p:GetODataProperties DisplayName="GetDynamicValueProperties" sap2010:WorkflowViewState.IdRef="GetODataProperties_1">
<p:GetODataProperties.Source>
<InArgument x:TypeArguments="p:DynamicValue">
<mca:CSharpValue x:TypeArguments="p:DynamicValue">dv_0</mca:CSharpValue>
</InArgument>
</p:GetODataProperties.Source>
<scg:Dictionary x:TypeArguments="x:String, OutArgument">
<OutArgument x:TypeArguments="x:String" x:Key="Guitar_x0020_Type">
<mca:CSharpReference x:TypeArguments="x:String">GuitarType</mca:CSharpReference>
</OutArgument>
<OutArgument x:TypeArguments="sco:Collection(x:String)" x:Key="AuthorId">
<mca:CSharpReference x:TypeArguments="sco:Collection(x:String)">CreateBy</mca:CSharpReference>
</OutArgument>
</scg:Dictionary>
</p:GetODataProperties>
<If sap2010:WorkflowViewState.IdRef="If_1">
<If.Condition>
<InArgument x:TypeArguments="x:Boolean">
<mca:CSharpValue x:TypeArguments="x:Boolean">GuitarType.Equals("Acoustic")</mca:CSharpValue>
</InArgument>
</If.Condition>
<If.Then>
<p1:UpdateListItem ItemGuid="{x:Null}" ListItemProperties="{x:Null}" sap2010:WorkflowViewState.IdRef="UpdateListItem_1">
<p1:UpdateListItem.ItemId>
<InArgument x:TypeArguments="x:Int32">
<p:ExpressionContainerValue x:TypeArguments="x:Int32">
<p1:GetCurrentItemId />
</p:ExpressionContainerValue>
</InArgument>
</p1:UpdateListItem.ItemId>
<p1:UpdateListItem.ListId>
<InArgument x:TypeArguments="s:Guid">
<mca:CSharpValue x:TypeArguments="s:Guid">System.Guid.Parse("{$ListId:Lists/Guitars;}")</mca:CSharpValue>
</InArgument>
</p1:UpdateListItem.ListId>
<p1:UpdateListItem.ListItemPropertiesDynamicValue>
<InArgument x:TypeArguments="p:DynamicValue">
<p:SetDynamicValueProperties>
<scg:Dictionary x:TypeArguments="x:String, InArgument">
<InArgument x:TypeArguments="x:String" x:Key="Comment">VS Workflow added a comment: a new acoustic guitar item was added</InArgument>
</scg:Dictionary>
</p:SetDynamicValueProperties>
</InArgument>
</p1:UpdateListItem.ListItemPropertiesDynamicValue>
</p1:UpdateListItem>
</If.Then>
<If.Else>
<p1:UpdateListItem ItemGuid="{x:Null}" ListItemProperties="{x:Null}" sap2010:WorkflowViewState.IdRef="UpdateListItem_2">
<p1:UpdateListItem.ItemId>
<InArgument x:TypeArguments="x:Int32">
<p:ExpressionContainerValue x:TypeArguments="x:Int32">
<p1:GetCurrentItemId />
</p:ExpressionContainerValue>
</InArgument>
</p1:UpdateListItem.ItemId>
<p1:UpdateListItem.ListId>
<InArgument x:TypeArguments="s:Guid">
<mca:CSharpValue x:TypeArguments="s:Guid">System.Guid.Parse("{$ListId:Lists/Guitars;}")</mca:CSharpValue>
</InArgument>
</p1:UpdateListItem.ListId>
<p1:UpdateListItem.ListItemPropertiesDynamicValue>
<InArgument x:TypeArguments="p:DynamicValue">
<p:SetDynamicValueProperties>
<scg:Dictionary x:TypeArguments="x:String, InArgument">
<InArgument x:TypeArguments="x:String" x:Key="Comment">VS Workflow added a comment: a new electric guitar item was added</InArgument>
</scg:Dictionary>
</p:SetDynamicValueProperties>
</InArgument>
</p1:UpdateListItem.ListItemPropertiesDynamicValue>
</p1:UpdateListItem>
</If.Else>
</If>
<p1:LookupWorkflowContextProperty sap2010:WorkflowViewState.IdRef="LookupWorkflowContextProperty_1" PropertyName="InitiatorUserId">
<p1:LookupWorkflowContextProperty.Result>
<OutArgument x:TypeArguments="x:String">
<mca:CSharpReference x:TypeArguments="x:String">initiator</mca:CSharpReference>
</OutArgument>
</p1:LookupWorkflowContextProperty.Result>
</p1:LookupWorkflowContextProperty>
<p:BuildCollection x:TypeArguments="x:String">
<p:BuildCollection.Result>
<OutArgument x:TypeArguments="sco:Collection(x:String)">
<mca:CSharpReference x:TypeArguments="sco:Collection(x:String)">CreateBy</mca:CSharpReference>
</OutArgument>
</p:BuildCollection.Result>
<p:BuildCollection.Values>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String">initiator</mca:CSharpValue>
</InArgument>
</p:BuildCollection.Values>
<sap2010:WorkflowViewState.IdRef>BuildCollection`1_1</sap2010:WorkflowViewState.IdRef>
</p:BuildCollection>
<p1:Email AdditionalHeaders="{x:Null}" BCC="{x:Null}" CC="{x:Null}" sap2010:WorkflowViewState.IdRef="Email_1" Subject="New Guitar">
<p1:Email.Body>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String">"A new guitar was added:" + GuitarType</mca:CSharpValue>
</InArgument>
</p1:Email.Body>
<p1:Email.To>
<InArgument x:TypeArguments="sco:Collection(x:String)">
<mca:CSharpValue x:TypeArguments="sco:Collection(x:String)">CreateBy</mca:CSharpValue>
</InArgument>
</p1:Email.To>
</p1:Email>
<p1:WriteToHistory>
<p1:WriteToHistory.Message>
<InArgument x:TypeArguments="x:String">
<mca:CSharpValue x:TypeArguments="x:String">String.Format("An email was sent by {0}.", initiator)</mca:CSharpValue>
</InArgument>
</p1:WriteToHistory.Message>
<sap2010:WorkflowViewState.IdRef>WriteToHistory_3</sap2010:WorkflowViewState.IdRef>
</p1:WriteToHistory>
<p1:WriteToHistory sap2010:WorkflowViewState.IdRef="WriteToHistory_2" Message="Guitar Workflow has ended" />
<sads:DebugSymbol.Symbol>d3FDOlxVc2Vyc1xkZXZ1c2VyXGRvY3VtZW50c1x2aXN1YWwgc3R1ZGlvIDIwMTJcUHJvamVjdHNcR3VpdGFyV29ya2Zsb3dcR3VpdGFyV29ya2Zsb3dcR3VpdGFyV29ya2Zsb3dcV29ya2Zsb3cueGFtbCktA74BDgIBATILMmcCAQI4BTh3AgFhOQVLGwIBVUwFWhwCAUVbBZMBCgIBLZQBBZoBKAIBJpsBBacBGQIBG6gBBbMBEAIBD7QBBbsBGQIBCbwBBbwBcQIBBzhTOHQCAWJDC0N0AgFcSAtIWwIBVzwLPigCAVZUC1RbAgFQTwtPUwIBS1cLV2kCAUZeC15nAgEuYgl4HQIBPHsJkQEdAgEzlwELlwFaAgEolAF2lAGHAQIBJ6MBC6MBUgIBIZ4BC54BaQIBHLABC7ABYQIBFqsBC6sBbwIBEagBe6gBhwECARC3AQu3AX4CAQq8AVO8AW4CAQg9DT0kAwFWAXEPdS0CAUNsD2x4AgE+ZQ9nLAIBPYoBD44BLQIBOoUBD4UBeAIBNX4PgAEsAgE0c0pziwECAURmEWYoAwE9AYwBSowBiwECATt/EX8oAwE0AQ==</sads:DebugSymbol.Symbol>
</Sequence>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="WriteToHistory_1" sap:VirtualizedContainerService.HintSize="464,68" />
<sap2010:ViewStateData Id="LookupSPListItem_1" sap:VirtualizedContainerService.HintSize="464,89">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<scg:Dictionary x:TypeArguments="x:String, msdad:ViewStateNameValue" x:Key="SPLocalizedDisplayNames">
<msdad:ViewStateNameValue x:Key="ItemId" DisplayName="(current item)" Value="$CurrentItemId" />
<msdad:ViewStateNameValue x:Key="ListId" DisplayName="Guitars" Value="Lists/Guitars" />
</scg:Dictionary>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="GetODataProperties_1" sap:VirtualizedContainerService.HintSize="464,92">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:String x:Key="Properties.SelectedEntityType">Lists/Guitars</x:String>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="UpdateListItem_1" sap:VirtualizedContainerService.HintSize="200,68">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<scg:Dictionary x:TypeArguments="x:String, msdad:ViewStateNameValue" x:Key="SPLocalizedDisplayNames">
<msdad:ViewStateNameValue x:Key="ItemId" DisplayName="(current item)" Value="$CurrentItemId" />
<msdad:ViewStateNameValue x:Key="ListId" DisplayName="Guitars" Value="Lists/Guitars" />
</scg:Dictionary>
<x:String x:Key="ListItemPropertiesDynamicValue.SelectedEntityType">Lists/Guitars</x:String>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="UpdateListItem_2" sap:VirtualizedContainerService.HintSize="200,68">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<scg:Dictionary x:TypeArguments="x:String, msdad:ViewStateNameValue" x:Key="SPLocalizedDisplayNames">
<msdad:ViewStateNameValue x:Key="ItemId" DisplayName="(current item)" Value="$CurrentItemId" />
<msdad:ViewStateNameValue x:Key="ListId" DisplayName="Guitars" Value="Lists/Guitars" />
</scg:Dictionary>
<x:String x:Key="ListItemPropertiesDynamicValue.SelectedEntityType">Lists/Guitars</x:String>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,218" />
<sap2010:ViewStateData Id="LookupWorkflowContextProperty_1" sap:VirtualizedContainerService.HintSize="464,68">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<scg:Dictionary x:TypeArguments="x:String, msdad:ViewStateNameValue" x:Key="SPLocalizedDisplayNames">
<msdad:ViewStateNameValue x:Key="PropertyName" DisplayName="Initiator" Value="InitiatorUserId" />
</scg:Dictionary>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="BuildCollection`1_1" sap:VirtualizedContainerService.HintSize="464,22" />
<sap2010:ViewStateData Id="Email_1" sap:VirtualizedContainerService.HintSize="464,68" />
<sap2010:ViewStateData Id="WriteToHistory_3" sap:VirtualizedContainerService.HintSize="464,68" />
<sap2010:ViewStateData Id="WriteToHistory_2" sap:VirtualizedContainerService.HintSize="464,68" />
<sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="486,1205">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="GuitarWorkflow.GuitarWorkflow.Workflow_1" sap:VirtualizedContainerService.HintSize="526,1285" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>
Not sure what I am doing wrong here. Any help is appreciated.
Edit. one other thing. I looked in the workflow manager database in sql express and only see info pertaining to WFs I created in SP Designer. I don't see this workflow. Not sure if I created the right kind of solution for deploying a VS workflow to Workflow Manager.
The problem was the following line in the workflow xaml:
<Variable x:TypeArguments="x:String" Name="GuitarType">
<Variable.Default>
<mca:CSharpValue x:TypeArguments="x:String">dv_0["Guitar Type"].ToString()</mca:CSharpValue>
</Variable.Default>
</Variable>
I was trying to apply a default value:
dv_0["Guitar Type"].ToString()
to a variable. I got the following error when deploying. I didn't see it in the original project:
Error occurred in deployment step 'Activate Features': Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
The private implementation of activity '1: DynamicActivity' has the following validation error: Cast operation is not supported for DynamicValue => Object.
When I removed the default value, the workflow deployed

Unable to connect to TFS server on clicking View Test Results link in Build Summary

After running nunit tests as part of build process. I would like to see the results of that build. If I want to click on View Test Results link showing in log file opened in VS2010. then it at first throws up error saying unable to connect to server and on clicking again will display the reults in Test Results Window of VS2010. But it is also not displaying any view test results link in TFS web page where any one can see the results. Any idea what is missing.
4 projects/solutions compiled
1 test run(s) completed - 0% average pass rate (0% total pass rate)
0/1 test(s) passed, 1 failed, 0 inconclusive, View Test Results
No Code Coverage Results
My Changed build configuration file for Nunit:
<If Condition="[Not DisableTests]" DisplayName="If Not DisableTests" sap:VirtualizedContainerService.HintSize="1200,1867" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Run Tests" sap:VirtualizedContainerService.HintSize="1075,1761" mtbwt:BuildTrackingParticipant.Importance="Low">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If Condition="[Not TestSpecs Is Nothing]" DisplayName="If Not TestSpecs Is Nothing" sap:VirtualizedContainerService.HintSize="1053,1637" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<ForEach x:TypeArguments="mtbwa:TestSpec" DisplayName="For Each TestSpec in TestSpecs" sap:VirtualizedContainerService.HintSize="928,1531" mtbwt:BuildTrackingParticipant.Importance="Low" Values="[TestSpecs]">
<ActivityAction x:TypeArguments="mtbwa:TestSpec">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mtbwa:TestSpec" Name="spec" />
</ActivityAction.Argument>
<TryCatch DisplayName="Try Run Tests" sap:VirtualizedContainerService.HintSize="898,1425" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec]" DisplayName="If spec Is TestMetadataFileSpec" sap:VirtualizedContainerService.HintSize="880,1238" mtbwt:BuildTrackingParticipant.Importance="None">
<If.Then>
<Sequence DisplayName="Run MSTest for Metadata File" sap:VirtualizedContainerService.HintSize="222,1132">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:TestMetadataFileSpec" Name="testMetadataFile" />
<Variable x:TypeArguments="x:String" Name="localTestMetadata" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign x:TypeArguments="mtbwa:TestMetadataFileSpec" DisplayName="Assign spec to testMetadataFile" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[testMetadataFile]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec)]" />
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" Input="[testMetadataFile.MetadataFileName]" Result="[localTestMetadata]" Workspace="[Workspace]" />
<mtbwa:MSTest Category="[testMetadataFile.CategoryFilter]" CommandLineArguments="[testMetadataFile.MSTestCommandLineArgs]" DisplayName="Run MSTest for Metadata File" Flavor="[platformConfiguration.Configuration]" sap:VirtualizedContainerService.HintSize="200,22" MaxPriority="[testMetadataFile.MaximumPriority]" MinPriority="[testMetadataFile.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestLists="[testMetadataFile.TestLists]" TestMetadata="[localTestMetadata]" TestSettings="[String.Empty]" />
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="Run NUnit for Test Assemblies" sap:VirtualizedContainerService.HintSize="633,1132" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:TestAssemblySpec" Name="testAssembly" />
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="testAssemblies" />
<Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testFlavor" />
<Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testPlatform" />
<Variable x:TypeArguments="x:Int32" Name="NUnitResult" />
<Variable x:TypeArguments="x:String" Name="variable1" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign x:TypeArguments="mtbwa:TestAssemblySpec" DisplayName="Assign spec to testAssembly" sap:VirtualizedContainerService.HintSize="611,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[testAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec)]" />
<mtbwa:FindMatchingFiles DisplayName="Find Test Assemblies" sap:VirtualizedContainerService.HintSize="611,22" mtbwt:BuildTrackingParticipant.Importance="Low" MatchPattern="[String.Format("{0}\{1}", outputDirectory, testAssembly.AssemblyFileSpec)]" Result="[testAssemblies]" />
<If Condition="[testAssemblies.Count() > 0]" DisplayName="If Test Assemblies Found" sap:VirtualizedContainerService.HintSize="611,884" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Run Tests and Publish Results" sap:VirtualizedContainerService.HintSize="486,778">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<mtbwa:InvokeProcess Arguments="[String.Format("/xml:nunit-tests.xml /framework:net-4.0 {0}", String.Join(" ",
testAssemblies))]" DisplayName="Invoke NUnit" FileName="[System.IO.Path.Combine(NUnitBinaryDirectory, "nunit-console.exe")]" sap:VirtualizedContainerService.HintSize="464,184" Result="[[NUnitResult]]" WorkingDirectory="[outputDirectory]">
<mtbwa:InvokeProcess.ErrorDataReceived>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
</ActivityAction.Argument>
</ActivityAction>
</mtbwa:InvokeProcess.ErrorDataReceived>
<mtbwa:InvokeProcess.OutputDataReceived>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" />
</ActivityAction.Argument>
</ActivityAction>
</mtbwa:InvokeProcess.OutputDataReceived>
</mtbwa:InvokeProcess>
<mtbwa:InvokeProcess Arguments="[String.Format("-n {0} -t {1} -p ""{2}"" -f {3} -b ""{4}"" -v 2010",
"nunit-tests.xml",
BuildDetail.TeamProject,
BuildSettings.PlatformConfigurations(0).Platform,
BuildSettings.PlatformConfigurations(0).Configuration,
BuildDetail.BuildNumber)]" DisplayName=" Publish NUnit Results" FileName="[Path.Combine(NUnitTfsPublisherDirectory, "NUnitTfs.exe")]" sap:VirtualizedContainerService.HintSize="464,184" WorkingDirectory="[outputDirectory]">
<mtbwa:InvokeProcess.ErrorDataReceived>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
</ActivityAction.Argument>
</ActivityAction>
</mtbwa:InvokeProcess.ErrorDataReceived>
<mtbwa:InvokeProcess.OutputDataReceived>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" />
</ActivityAction.Argument>
</ActivityAction>
</mtbwa:InvokeProcess.OutputDataReceived>
</mtbwa:InvokeProcess>
<If Condition="[NUnitResult <> 0]" DisplayName="If NUnit Tests Failed" sap:VirtualizedContainerService.HintSize="464,206">
<If.Then>
<Assign DisplayName="Set Test Status To Failed" sap:VirtualizedContainerService.HintSize="291,100">
<Assign.To>
<OutArgument x:TypeArguments="mtbc:BuildPhaseStatus">[BuildDetail.TestStatus]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="mtbc:BuildPhaseStatus">[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]</InArgument>
</Assign.Value>
</Assign>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
</Sequence>
</If.Else>
</If>
Viewing test results in Web Access was not implemented for Dev10, neither was a protocol handler to open the test results file (trx) in Visual Studio. That explains why the build summary does not show the "View Test Results" link on TFS web page.
Per the Visual Studio issue, does it always throw "unable to connect to server" error the first time you click "View Test Results" in VS? And when you said "clicking again", you mean click "View Test Results" again? Can you check in the event log to see if there is any related error with more information.

Resources