Does Workflow Support the Table Search
Does the query activity or relationship query activity support searching configured tables? I am about to start work on a workflow to search a table related to sewer mains. It works well in the global search but I would like to use a workflow for the search.
-
Hi Nick,
Unfortunately you cannot yet access Datalink Search Tables from Workflow. The easiest way to query external data from Workflow is to publish it as a table with your map service. Then it will have it's own Rest Endpoint which you can query from Workflow using a regular QueryTask.
-Victoria
0 -
Victoria, do you have a sample of this? I need to build a report that returns information from a non-spatial table that is not related to any map layer so I'm thinking what you described might be a good approach. Thoughts?
0 -
Hi Tim
if you are using the more recent versions of Workflow then you could directly query the table using the SQL Query Activity.
Thanks
Ralph
0 -
Using 3.8, in what version is "SQL Query Activity" supported? I'm not readily seeing it in my report designer.
0 -
;-)
3.10
Regards
Ralph
0 -
Thanks Ralph. We will update our system to 3.10.1 this weekend.
How do I create output from the results of the "SQL Query Activity"? Is there a way to build a report on the results of a "SQL Query Activity"?
-Tim
0 -
I am trying to use workflow to query an SDE table. It runs, but does not return results. Does anyone have an example of how to set this up? For Search Results, all I se is Feature Set. I am guessing this is not correct. Anyone have an example?
Thanks
Jason
0 -
Hi Jason
have you published that SDE table as a query layer in a AGS map service?
Have you tried doing a query against it via the AGS REST endpoint?
What fields are you specifying to return in your workflow?
What workflow version are you using?
ie we need a little more information before we can helpfully comment.
Thanks
Ralph
0 -
Hi Ralph
I added the SDE table in the MXD; saved as an MSD and then published. I am referencing the ArcGIS REST endpoint in Workflow designer using a query tool. I used "*" for the return fields because I removed and aliased the fields I wanted to keep in the MXD.
The version of Workflow Designer is from GE Mgr 3.4.1
Thanks
Jason
0 -
Hi Jason
just to be pedantic, so you can go to the REST end point of your map service ie something along the lines of:
http://server/arcgis/rest/services/theMapService/MapServer
you see something along the lines of:
/customer/servlet/servlet.FileDownload?file=00P6000000e88IcEAI
If you click on one of the tables ie in the example above OzoneParcelSearch, do you see:
/customer/servlet/servlet.FileDownload?file=00P6000000e88IhEAI
And if you click on the Query option do you get a search form?
/customer/servlet/servlet.FileDownload?file=00P6000000e88ImEAI
Try the form using * for the fields (note no quotes) or use field1, field2 with a where statement
Let me know how that goes
Thanks
Ralph
0 -
Yes. Under tables, I have the table referenced below, not a query.. When I click on query for the ArcGIS REST Endpoint for the table, I get:
/customer/servlet/servlet.FileDownload?file=00P6000000e88IrEAI
0 -
Hi Jason
so you will be ags10.0? My screen shots are 10.1
Slightly different layout but you should still be able to put in a where statement and a field list and click on the Query button. Either should work for this purpose.
What version of the Workflow Designer are you using? If you are using one of the more recent versions you could also talk directly to your SQL DB rather than via AGS?
Thanks
Ralph
0 -
We are using 3.4.1. Our SDE is Oracle. I added the SDE table because I thought it would be the simplest way to make this query work in Workflow.
I am confused by the REST Endpoint I provided because, although a table, it has many references to Geometry Type, Spatial Relationship. The 10.1 screen shot you provided does not. It also says "Query" at top and not "Table" as the example I provided does. I can't seem to get any results returned in the query for my table REST Endpoint.
Thanks
0 -
ALso, yes we are using 10.0 and you can disregard my comment about Geometry Type, etc. After reexamining the 10.1 endpoint screenshot you provided, I see those same fields. Thanks
0 -
Sorry for the multiple posts. Update: I was able to perform a query of the REST Endpoint for this SDE table. SO, how do I get this to work using a GE Workflow? /customer/servlet/servlet.FileDownload?file=00P6000000e87wBEAQ Thanks again, Jason
/customer/servlet/servlet.FileDownload?file=00P6000000e88IiEAI
0 -
Hi Jason
the 'Query Task' Activity is what you want:
<Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="392,522" 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:esri="http://schemas.esri.com/arcgis/client/2009" 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:mv="clr-namespace:Microsoft.VisualBasic;assembly=Microsoft.VisualBasic" xmlns:mv1="clr-namespace:Microsoft.VisualBasic;assembly=System" 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.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sw="clr-namespace:System.Windows;assembly=PresentationFramework" xmlns:sw1="clr-namespace:System.Windows;assembly=WindowsBase" xmlns:sw2="clr-namespace:System.Windows;assembly=PresentationCore" xmlns:sw3="clr-namespace:System.Windows;assembly=UIAutomationTypes" xmlns:swt="clr-namespace:System.Windows.Threading;assembly=WindowsBase" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="352,482" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="esri:FeatureSet" Name="featureSet1" />
</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:QueryTask sap:VirtualizedContainerService.HintSize="330,227" OutFields="FULL_NAME,field2" QueryServiceUrl="http://myServer/arcgis/rest/service/myMapServer/0/query" Results="[featureSet1]" ReturnGeometry="False" SpatialRelationship="esriSpatialRelIntersects" Where="FULL_NAME = "ALIDA ROW"" />
<gwa1:Alert sap:VirtualizedContainerService.HintSize="330,91" Text="[featureSet1.Features(0).Attributes("FULL_NAME").ToString & vbCrLf & _
featureSet1.Features(0).Attributes("field2").ToString]" />
</Sequence>
</Activity>Save the above into a text file with the suffix of .xaml
Now you have a workflow, add it to your site, add a button to your viewer toolbar or add an item to your I Want to menu as a means to run it. And give it a test.
You could also try it in the Simulator on the Workflow Designer
Of course there will need to be adjustment of the Query Url
Regards
Ralph
0 -
Thank you. I think this is going to work. I have a few mods to make, but I think I have it.
Best,
Jason
0
Please sign in to leave a comment.
Comments
17 comments