Hoppa till huvudinnehållet

Workflow with Layer ID lookup

Kommentarer

12 kommentarer

  • Permanently deleted user

    Hi Todd

    1. Make sure that the map service id is what is reported in the REST end point  ie http://serverName/Geocortex/Essentials/REST/sites/siteName/map and is quoted. While it will look like a integer, smell like an integer it needs to be input as a string.
    2. Use the above process to figure out the layer name as well

    Here is a bare-bones workflow example:

    <Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="325,414" 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: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:x="http://schemas.microsoft.com/winfx/2006/xaml">

     

      <Sequence sap:VirtualizedContainerService.HintSize="285,374" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">

     

        <Sequence.Variables>

     

          <Variable x:TypeArguments="x:String" Name="theUrl" />

     

          <Variable x:TypeArguments="x:String" Name="theLyrId" />

     

        </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 sap:VirtualizedContainerService.HintSize="263,128" LayerId="[theLyrId]" LayerName="Address" MapServiceId="2" MapServiceUrl="[theUrl]" />

     

        <gwa1:Alert sap:VirtualizedContainerService.HintSize="263,82" Text="[theUrl]" Title="[theLyrId]" />

     

      </Sequence>

     

    </Activity>

    Let us know how you get on from here.

    Regards

    Ralph Price

    0
  • Todd Sales

    Ralph,

    Thanks for the reply & example. It was helpful to confirm that I was indeed using the correct syntax in the 'Get Map Service Info' task.

    I'll share my own silly mistake in case others experience it - I had the variables reversed in the subsequent Assign task..

    While I've got the workflow search  working correctly, I'll note something that I'm still troubleshooting - Once I create the appropriate Layer URL string variable and place the variable into an auto-complete field in a form, the auto-complete stops working for the field. The search renders the correct results, the field just won't auto-complete.

    0
  • Permanently deleted user

    Hi Todd

    just to confirm, you want to have an auto-complete on a field in a layer? Is that what you are setting the Task Url to?

    /customer/servlet/servlet.FileDownload?file=00P6000000e88AZEAY

    And you are setting the Where Clause to have something like the above image?

    Thanks

    Ralph

    0
  • Todd Sales

    Hey Ralph,

    Yes, have the autocomplete set to a layer to use with a field. The autocomplete works when I enter/hard-code the correct URL string in 'Task URL', but doesn't when trying to enter the variable name.

    But it appears that the Form Designer > Query Details section can't deal with a variable. Looking for a way to tell the form to use the value of Layer_URL instead of "Layer_URL". Wondering if anyone found a way to code this? (several guesses haven't worked)

    0
  • Permanently deleted user

    Hi Todd

    are you using the run-time modification capabilities of forms?

    Ralph

    0
  • Todd Sales

    Ralph,

    No, I'm not. Thanks for the hint. Looking at the API reference now, but not yet finding the right method/syntax. (maybe InputData???)

    The video from the Virtual Conference - Intro to Workflow Forms, eludes to the very thing I'm trying to do,  but doesn't provide specific guidance.

    Thanks again!

    0
  • Permanently deleted user

    Hi Todd

    check out this link: http://support.geocortex.com/Forums/Thread.aspx?thread=46940&mid=2&pageid=0&ItemID=20&pagenumber=1#post136482

    Due to the searching issues in the forums I am now saving threads (once they become helpful ) into my Evernote account for use later

    (Also do this with the pdf documentation.)

    The Commonly used Properties for built-in Form Items can be found on page 48  of the Geocortex 3.9.0  Workflow Designer Guide

    I am not quite sure why the Geocortex 3.9.0  Workflow Designer Guide is 166 pages long and the Geocortex 3.10.0  Workflow Designer Guide is a mere 76 pages long. I'm just glad that I didn't throw away the old versions ;-)

    Maybe there is an updated version that can downloaded again?

    Thanks

    Ralph

     

     

    0
  • Ryan Cooney

    Hi Ralph,

    The page count discrepancy between 3.9 and 3.10 is because we excluded the pages that describe the individual activities from the PDF version of the help. This was intentional. The information is not lost! You can still find it all in the "Geocortex Workflow Designer.chm" that installs with the Designer.

    When using Designer the help for the individual activities are automatically linked to the CHM. Just right-click an activity in the toolbox and you can open the CHM to the correct page.

    --Ryan

    0
  • Permanently deleted user

    Hi Ryan

    thanks for pointing me in the write direction. I guess I had just got used to finding all the documentation in the various pdfs.

    I was just a little confused yesterday as I was trying to bring some colleagues up to speed with how to modify the form and that detail was no longer in the current pdf.

    All good now however

    Best regards

    Ralph Price

    0
  • Todd Sales

    In getting back to this -

    Thanks Ralph for pointing me to the reference, that was a great help.

    I've added the 'Assign' (XML below) to the runtime modification section and set it as I'd expect it should be. (Assigning the the value using the 'Layer_URL' variable.) There's not a validation error displayed, but when I run the workflow, I get an error - "Cannot create an L-value from the given expression with property 'QueryServiceURL' because the target object is null"  The error is thrown whether in simulator or regular workflow execution.

    Again, I have a an alert msg immediately preceding the form that (properly) displays the value of the 'Layer_URL' variable. So I know that the value of 'Layer_URL' has been set correctly. Thus once again, this hints of some issue with possible scope of the variable, even within the runtime modification.

     

    <Assign sap:VirtualizedContainerService.HintSize="242,57">

     

            <Assign.To>

     

              <OutArgument x:TypeArguments="x:String">[form.Find(Of AutoCompleteBoxFormItem)("&lt;FormItemID&gt;").QueryServiceUrl]</OutArgument>

     

            </Assign.To>

     

            <Assign.Value>

     

              <InArgument x:TypeArguments="x:String">[Layer_URL]</InArgument>

     

            </Assign.Value>

     

          </Assign>
    0
  • Permanently deleted user

    Hi Todd

    do you really have a form item called <FormItemID> ?  The error is essentially saying that it can't find that form item.

    I would suggest that your AutoCompleteBox is actually called AutoCompleteBox1 and so your assign should be form.Find(Of AutoCompleteBoxFormItem)("AutoCompleteBox1").QueryServiceUrl

    Thanks

    Ralph

    0
  • Todd Sales

    Ralph,

    That resolved the issue. That mismatched reference was so obvious in hind-sight, as always... I was interpreting the error to mean that the value of 'Layer_URL' appeared to be null within the form.

    Thanks so much for all the assistance. Struggling (as a non-programmer) to come up to speed with workflow development.

    Take care,

    Todd

    0

Du måste logga in om du vill lämna en kommentar.