Query Transform Workflow
I'm looking for an example of a Query Transform workflow. Who has succesfully used this type of workflow? How is the output configured?
0
-
Did you ever get an example of one of these?
Thanks,
Lloyd0 -
No... 0 -
Hi Guys, I don't think we have an example easily available because what a Query Transform workflow does depends very heavily on the WMS or WFS service it is associated with.
The general idea is that the workflow is passed a DataSet (the queryData argument) which is an In/Out argument.
Within your workflow, you can read the Tables within that dataset, do whatever you like (query a database, query ArcGIS server, transform the data) and then modify or replace the Tables with your new data.
If the transformer workflow throws an Exception then the original DataSet is used instead of whatever half-finished data you have.
You can't use client activities as there is no client context available for the workflow. So, Alert won't work, but Log is fine.
Also, we would recommend against any complex or long running activities here since the workflow would be run for every identify or query request made against the WMS service.
Regards,
-Malcolm0 -
Malcolm,
Is that not the case with all examples. That's why it is called an example. So I would be happy with a little more explanation.
Thanks in advance,
Ronnie0 -
I've tried to create a build a query transform workflow and with an in/out Argument of the System.Data.DataSet type. But if I want to add this workflow I get the following message
'{SiteUri}/Workflows/transformPerceelInfo.xaml' is not a valid query transform workflow. Argument 'queryData' must be an input argument of type 'DataSet'.
What is the problem here?0 -
An simple example of this working would be really useful. I am having the same issues. 0 -
Using File > New > Query Transform Workflow should get you set up with a blank template for a query transform workflow.
Here's a basic example, which doesn't have a practical purpose but is functional:<Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:gwa="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: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:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <x:Members> <x:Property Name="queryData" Type="InArgument(sd:DataSet)" /> </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</x:String> <x:String>System.Activities.XamlIntegration</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>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.Reporting</x:String> <x:String>Geocortex.Workflow.Activities</x:String> <x:String>Microsoft.VisualBasic.Activities</x:String> <x:String>System</x:String> <x:String>System.Activities.Debugger.Symbol</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Linq</x:String> <x:String>System.Data</x:String> <x:String>System.Windows.Markup</x:String> <x:String>System.Xml.Serialization</x:String> <x:String>System.Collections</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.Reporting</AssemblyReference> <AssemblyReference>Geocortex.Workflow</AssemblyReference> <AssemblyReference>Geocortex.Workflow.Activities</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>System.ServiceModel</AssemblyReference> <AssemblyReference>System.Data</AssemblyReference> <AssemblyReference>PresentationFramework</AssemblyReference> <AssemblyReference>WindowsBase</AssemblyReference> <AssemblyReference>PresentationCore</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> <AssemblyReference>System.ComponentModel.Composition</AssemblyReference> <AssemblyReference>System.Reactive.Core</AssemblyReference> <AssemblyReference>System.Xml</AssemblyReference> </sco:Collection> </TextExpression.ReferencesForImplementation> <gwa:ServerScope sap2010:Annotation.AnnotationText="The "queryData" input argument contains the DataSet of query results." sap2010:WorkflowViewState.IdRef="ServerScope_1"> <gwa:ServerScope.Body> <ActivityAction> <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1"> <Sequence.Variables> <Variable x:TypeArguments="esri:FeatureSet" Name="featureSet1" /> </Sequence.Variables> <gwa:AddDataTableColumn x:TypeArguments="x:String" ColumnName="NewColumn" DataTable="[queryData.Tables(0)]" Expression="'test value!'" sap2010:WorkflowViewState.IdRef="AddDataTableColumn`1_1" /> <gwa:AddDataTableColumn x:TypeArguments="x:Int32" ColumnName="OBJECTID_Plus_5" DataTable="[queryData.Tables(0)]" sap2010:WorkflowViewState.IdRef="AddDataTableColumn`1_2" /> <ForEach x:TypeArguments="sd:DataRow" DisplayName="ForEach<DataRow>" sap2010:WorkflowViewState.IdRef="ForEach`1_1" Values="[queryData.Tables(0).Rows.OfType(of DataRow)]"> <ActivityAction x:TypeArguments="sd:DataRow"> <ActivityAction.Argument> <DelegateInArgument x:TypeArguments="sd:DataRow" Name="row" /> </ActivityAction.Argument> <Assign sap2010:WorkflowViewState.IdRef="Assign_1"> <Assign.To> <OutArgument x:TypeArguments="x:Object">[row("OBJECTID_Plus_5")]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:Int32">[Convert.ToInt32(row("pub:OBJECTID"))+5]</InArgument> </Assign.Value> </Assign> </ActivityAction> </ForEach> </Sequence> </ActivityAction> </gwa:ServerScope.Body> <sads:DebugSymbol.Symbol>d39DOlxQcm9ncmFtIEZpbGVzICh4ODYpXExhdGl0dWRlIEdlb2dyYXBoaWNzXEdlb2NvcnRleCBFc3NlbnRpYWxzXERlZmF1bHRcUkVTVCBFbGVtZW50c1xTaXRlc1xNYXJjaDE0XHF1ZXJ5VHJhbnNmb3JtRXhhbXBsZS54YW1sDkMDXxUCAQFGCVsUAgECSgtKzQECAQxLC0u3AQIBCEwLWhUCAQNKSUpUAgEQSoIBSpEBAgEPSl9KdgIBDUtIS1kCAQtLZEt7AgEJTIsBTLoBAgEHUQ9YGAIBBFY5VmECAQZTO1NTAgEF</sads:DebugSymbol.Symbol> </gwa:ServerScope> <sap2010:WorkflowViewState.ViewStateManager> <sap2010:ViewStateManager> <sap2010:ViewStateData Id="AddDataTableColumn`1_1" sap:VirtualizedContainerService.HintSize="302,86" /> <sap2010:ViewStateData Id="AddDataTableColumn`1_2" sap:VirtualizedContainerService.HintSize="302,86" /> <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="242,60" /> <sap2010:ViewStateData Id="ForEach`1_1" sap:VirtualizedContainerService.HintSize="302,208" /> <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="324,584"> <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="ServerScope_1" sap:VirtualizedContainerService.HintSize="338,698"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="378,778" /> </sap2010:ViewStateManager> </sap2010:WorkflowViewState.ViewStateManager> </Activity>0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
7 Kommentare