GetMapServiceInfo Activity not finding correct information
Hi to all
Just wondering if anyone else is having issues with this Activity when used with a AGS 10.1 map service that " Allows per request modification of layer order and symbology" .
The Activity, while running, rather than finding the layer as specified by it's name in a mapservice specified by it's Geocortex mapservice id and returning the layer id, is returning the layer id of dynamicLayer
Here is a sample workflow where the first mapservice tested against is a 10.1 service with "Allows per request modification of layer order and symbology" enabled.
The second mapservice does not have the same dynamic request capablity.
<Activity mc:Ignorable="sap sads" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="325,836" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"
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: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:s3="clr-namespace:System;assembly=System.ComponentModel.Composition"
xmlns:s4="clr-namespace:System;assembly=System.ServiceModel"
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:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="285,756" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="parcelMapServiceUrl" />
<Variable x:TypeArguments="x:String" Name="parcelLayerId" />
</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>
<gwa1:GetMapServiceInfo DisplayName="GetMapServiceInfoForParcelsLayer" sap:VirtualizedContainerService.HintSize="263,128" LayerId="[parcelLayerId]" LayerName="Parcel - Primary" MapServiceId="1" MapServiceUrl="[parcelMapServiceUrl]" />
<gwa1:Prompt DefaultText="[parcelMapServiceUrl]" sap:VirtualizedContainerService.HintSize="263,128" Title="["Layer Id: " & parcelLayerId]" />
<gwa1:GetMapServiceInfo DisplayName="GetMapServiceInfoForParcelsLayer" sap:VirtualizedContainerService.HintSize="263,128" LayerId="[parcelLayerId]" LayerName="WSValve" MapServiceId="6" MapServiceUrl="[parcelMapServiceUrl]" />
<gwa1:Prompt DefaultText="[parcelMapServiceUrl]" sap:VirtualizedContainerService.HintSize="263,128" Title="["Layer Id: " & parcelLayerId]" />
</Sequence>
</Activity>
The result prompts look like this:
/customer/servlet/servlet.FileDownload?file=00P6000000e88TfEAI
/customer/servlet/servlet.FileDownload?file=00P6000000e88TkEAI
Any help on this such as confirming a bug would be most appreciated
Regards
Ralph Price
-
Hi to all
this will break workflows. Hopefully a fix won't take too long ;-)
Regards
Ralph Price
0 -
Hi Ralph,
You may need to modify your workflows if you expect to use map services that support dynamic layers.
ArcGIS 10.1 adds a new REST endpoint to define dynamic layers, so you can redefine the source and styling of layers in the map service. Starting with Geocortex Essentials 3.11, the Get Map Service Info activity has added a Source output, available in the Properties panel of Workflow Designer. When the LayerId is returned as "dynamicLayer", you need to keep track of the dynamic layer's source definition by creating a (type: LayerSource) variable for the Source output. Activities such as Query Task have a Source input argument, and you will need to pass along the layer source definition to these activities.
The Source output of Get Map Service Info will be null if you use map services that do not support dynamic layers (either pre-ArcGIS 10.1 or with "Allows per request modification of layer order and symbology" disabled). Activities such as Query Task should ignore a null Source input and work as it did before.
Please let us know if there is a particular activity that doesn't allow you to correctly access a layer through a combination of LayerId / Source inputs.
0 -
Thanks Paul
Great explanation. I will try shortly
Regards
Ralph0 -
Kind of weird. I added a variable called _sourceLayer of type LayerSource, inserted it into the GetMapServiceInfo activity under the out argument "Source", then added it to the Query Task "Source" in argument. While the workflow finishes, it doesn't display: the layer name, the feature label, the feature description or the layer icon. How did it lose its connection to the actual layer being queried? How do I indicate what this is supposed to be?
0 -
Hi Heather,
I assume you are using Select Features to display the results. You will need a to specify a unique Layer Id or Layer Name in Select Features for the viewer to find your configured layer details (label/description/icon/etc.) as defined in your site's map service. Unfortunately, once a map service starts using dynamic layers, the GetMapServiceInfo activity returns a LayerId of "dynamicLayer" for all layers, which is no longer a unique key back to the layers in your map service configuration.
Presumably you already have a layer name in your workflow if you are using the GetMapServiceInfo activity. Could you try setting the Layer Name input instead of Layer Id when using Select Features?
0 -
It seems to be working with assigning the query layer name but not the layer id in the select activity, so thank you!
0 -
I am having the same issue on Geocortex 4.7 (Viewer 2.8).
I create a workflow that invokes "GetMapServiceInfo" ,
I supply the input values correctly, and I expect the ArcGIS server URL and ArcGIS layer "number" in the LayerID
HOWEVER: on slow computers, I ~sometimes~ get a string "1" (correct) and sometimes I get the string "dynamicLayer" (which is wrong).. The problem is that is works sometimes, but often fails on slower computer/clients.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
7 kommentarer