Last active
March 3, 2017 01:45
-
-
Save bradbrowne/7fa1e6bf127f6bd0812da8a1ccb074f6 to your computer and use it in GitHub Desktop.
π GeoCortex FilePicker uploads file multiple times if FileItem properties are accessed multiple times.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" this:ActivityBuilder.WorkflowContainerName="FileUploadIssue" | |
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" | |
xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" | |
xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" | |
xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" | |
xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core" | |
xmlns:gcx="http://apis.geocortex.com/2009" | |
xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" | |
xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi" | |
xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" | |
xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" | |
xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" | |
xmlns:s="clr-namespace:System;assembly=System.Core" | |
xmlns:s1="clr-namespace:System;assembly=System" | |
xmlns:s2="clr-namespace:System;assembly=mscorlib" | |
xmlns:sa="clr-namespace:System.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:sl="clr-namespace:System.Linq;assembly=System.Core" | |
xmlns:this="clr-namespace:" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<x:Members> | |
<x:Property Name="WorkflowContainerName" Type="InArgument(x:String)" /> | |
</x:Members> | |
<mva:VisualBasic.Settings> | |
<x:Null /> | |
</mva:VisualBasic.Settings> | |
<sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef> | |
<TextExpression.NamespacesForImplementation> | |
<sco:Collection x:TypeArguments="x:String"> | |
<x:String>System.Activities.XamlIntegration</x:String> | |
<x:String>System.Activities.Validation</x:String> | |
<x:String>System.Activities</x:String> | |
<x:String>System.Activities.Statements</x:String> | |
<x:String>System.Activities.Expressions</x:String> | |
<x:String>ESRI.ArcGIS.Client</x:String> | |
<x:String>ESRI.ArcGIS.Client.Geometry</x:String> | |
<x:String>ESRI.ArcGIS.Client.Tasks</x:String> | |
<x:String>Geocortex.Core.Extensions</x:String> | |
<x:String>Geocortex.Workflow.Activities</x:String> | |
<x:String>Geocortex.Forms.Client</x:String> | |
<x:String>Geocortex.Forms.Client.Items</x:String> | |
<x:String>Geocortex.Reporting</x:String> | |
<x:String>System</x:String> | |
<x:String>Microsoft.VisualBasic.Activities</x:String> | |
<x:String>System.Collections.Generic</x:String> | |
<x:String>System.Linq</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>ESRI.ArcGIS.Client</AssemblyReference> | |
<AssemblyReference>Geocortex.Core</AssemblyReference> | |
<AssemblyReference>Geocortex.Workflow</AssemblyReference> | |
<AssemblyReference>Geocortex.EssentialsWpfApi</AssemblyReference> | |
<AssemblyReference>Geocortex.Reporting</AssemblyReference> | |
<AssemblyReference>System.Core</AssemblyReference> | |
<AssemblyReference>System</AssemblyReference> | |
<AssemblyReference>mscorlib</AssemblyReference> | |
<AssemblyReference>PresentationFramework</AssemblyReference> | |
<AssemblyReference>WindowsBase</AssemblyReference> | |
<AssemblyReference>PresentationCore</AssemblyReference> | |
<AssemblyReference>System.Xaml</AssemblyReference> | |
<AssemblyReference>System.ComponentModel.Composition</AssemblyReference> | |
<AssemblyReference>System.ServiceModel</AssemblyReference> | |
<AssemblyReference>System.Reactive.Core</AssemblyReference> | |
</sco:Collection> | |
</TextExpression.ReferencesForImplementation> | |
<Sequence DisplayName="Main" sap2010:WorkflowViewState.IdRef="Sequence_2" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="scg:Dictionary(x:String, x:Object)" Name="formResult" /> | |
<Variable x:TypeArguments="scg:IList(gcx:FileItem)" Name="attachments" /> | |
<Variable x:TypeArguments="gcx:FileItem" Name="fileItem" /> | |
</Sequence.Variables> | |
<gwa1:DisplayForm FormDefinition="<FormDefinition xmlns="http://schemas.datacontract.org/2004/07/Geocortex.Forms.Client" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ContainerFormItem xmlns:a="http://schemas.datacontract.org/2004/07/Geocortex.Forms.Client.Items"><a:ArgumentName/><a:IsVisible>true</a:IsVisible><a:ItemID>Group1</a:ItemID><a:ToolTip/><a:ValidationItems xmlns:b="http://schemas.datacontract.org/2004/07/Geocortex.Forms.Client.Items.Validation"/><a:Description/><a:FormItems><a:FormItem i:type="a:FilePickerFormItem"><a:ArgumentName>ATTACHMENTS</a:ArgumentName><a:IsVisible>true</a:IsVisible><a:ItemID>FilePicker1</a:ItemID><a:ToolTip/><a:ValidationItems xmlns:b="http://schemas.datacontract.org/2004/07/Geocortex.Forms.Client.Items.Validation"><b:ValidationItem i:type="b:FileSizeValidationItem"><b:Message>2GB total file size limit exceeded</b:Message><b:TotalFileSize>2147483647</b:TotalFileSize></b:ValidationItem></a:ValidationItems><a:AcceptFileTypes i:nil="true"/><a:AllowMultiple>true</a:AllowMultiple><a:Label><a:ArgumentName/><a:IsVisible>true</a:IsVisible><a:ItemID/><a:ToolTip/><a:ValidationItems xmlns:b="http://schemas.datacontract.org/2004/07/Geocortex.Forms.Client.Items.Validation"/><a:LabelForItemID/><a:Text>FilePicker1</a:Text></a:Label></a:FormItem></a:FormItems><a:MaxWidth>INF</a:MaxWidth><a:Orientation>Vertical</a:Orientation><a:VisibleControlID i:nil="true"/><a:VisibleControlValue i:nil="true"/></ContainerFormItem><KnownTypes xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><a:string>Geocortex.Forms.Client.Items.ContainerFormItem</a:string><a:string>Geocortex.Forms.Client.Items.FilePickerFormItem</a:string><a:string>Geocortex.Forms.Client.Items.Validation.FileSizeValidationItem</a:string></KnownTypes><MaxHeight>800</MaxHeight><MaxWidth>1000</MaxWidth><Title>Form Title</Title><Version>1.1</Version></FormDefinition>" FormResults="[formResult]" sap2010:WorkflowViewState.IdRef="DisplayForm_1" WorkflowContainerName="[WorkflowContainerName]"> | |
<gwa1:DisplayForm.Body> | |
<ActivityAction x:TypeArguments="gcx:FormDefinition"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="gcx:FormDefinition" Name="form" /> | |
</ActivityAction.Argument> | |
<Sequence DisplayName="RuntimeModifications" sap2010:WorkflowViewState.IdRef="Sequence_1" /> | |
</ActivityAction> | |
</gwa1:DisplayForm.Body> | |
<gwa1:DisplayForm.Buttons> | |
<gcx:FormButton CausesValidation="True" IsDefault="True" Label="Upload" Value="Upload" /> | |
</gwa1:DisplayForm.Buttons> | |
<gwa1:DisplayForm.FormOutArguments> | |
<gwa:ArgumentWrapper x:TypeArguments="OutArgument" IsRequired="False" Name="ATTACHMENTS"> | |
<gwa:ArgumentWrapper.Argument> | |
<OutArgument x:TypeArguments="scg:IList(gcx:FileItem)">[attachments]</OutArgument> | |
</gwa:ArgumentWrapper.Argument> | |
</gwa:ArgumentWrapper> | |
</gwa1:DisplayForm.FormOutArguments> | |
</gwa1:DisplayForm> | |
<gwa1:ServerScope sap2010:WorkflowViewState.IdRef="ServerScope_1"> | |
<gwa1:ServerScope.Body> | |
<ActivityAction> | |
<Assign DisplayName="attachments Assign" sap2010:WorkflowViewState.IdRef="Assign_2"> | |
<Assign.To> | |
<OutArgument x:TypeArguments="gcx:FileItem">[fileItem]</OutArgument> | |
</Assign.To> | |
<Assign.Value> | |
<InArgument x:TypeArguments="gcx:FileItem">[attachments.First]</InArgument> | |
</Assign.Value> | |
</Assign> | |
</ActivityAction> | |
</gwa1:ServerScope.Body> | |
</gwa1:ServerScope> | |
<gwa1:ExternalLog sap2010:WorkflowViewState.IdRef="ExternalLog_1" Message="[fileItem.FileName]" /> | |
<gwa1:ExternalLog sap2010:WorkflowViewState.IdRef="ExternalLog_2" Message="[fileItem.FileName]" /> | |
<sads:DebugSymbol.Symbol>d44BQzpcUHJvZ3JhbSBGaWxlcyAoeDg2KVxMYXRpdHVkZSBHZW9ncmFwaGljc1xHZW9jb3J0ZXggRXNzZW50aWFsc1xHWDQ2MlxSRVNUIEVsZW1lbnRzXFNpdGVzXFRlbXBsYXRlc1xXb3JrZmxvd3NcQXNzZXRcR2lzdFxGaWxlVXBsb2FkSXNzdWUueGFtbBABcAGAAQECTAN3DgIBAVIFZRgCAQtmBXMYAgEGdAV0ZwIBBHUFdWcCAQJSJlLyEgIBElLUE1LtEwIBEGFEYVECAQ9S/xJSjRMCAQ1YC1hnAgEMaQtwFAIBB3RPdGQCAQV1T3VkAgEDbjpuTQIBCms7a0UCAQg=</sads:DebugSymbol.Symbol> | |
</Sequence> | |
<sap2010:WorkflowViewState.ViewStateManager> | |
<sap2010:ViewStateManager> | |
<sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="200,97"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
</sap2010:ViewStateData> | |
<sap2010:ViewStateData Id="DisplayForm_1" sap:VirtualizedContainerService.HintSize="297,540" /> | |
<sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="242,59" /> | |
<sap2010:ViewStateData Id="ServerScope_1" sap:VirtualizedContainerService.HintSize="297,135" /> | |
<sap2010:ViewStateData Id="ExternalLog_1" sap:VirtualizedContainerService.HintSize="297,59" /> | |
<sap2010:ViewStateData Id="ExternalLog_2" sap:VirtualizedContainerService.HintSize="297,59" /> | |
<sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="319,1037"> | |
<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="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="359,1117" /> | |
</sap2010:ViewStateManager> | |
</sap2010:WorkflowViewState.ViewStateManager> | |
</Activity> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The file is uploaded twice as can be seen in Chrome Developer Tools below:
This is caused by the
FileItem.FileName
being externally logged twice: