Zum Hauptinhalt gehen

Passing Geometry into workflow in HTML5?

Kommentare

9 Kommentare

  • Permanently deleted user

    Hi Marcus,

    It does sound like the geometry isn't being passed. Try swapping in this simple workflow in place of your current one - it simply shows the extent of the passed in geometry. You can use Fiddler to see the inargs on the run workflow command; here's a sample of what I see in my test system in Fiddler using the WebForms view:

    [{"runtimeTypeName":"ESRI.ArcGIS.Client.Geometry.Geometry, ESRI.ArcGIS.Client","name":"thisGeometry","typeName":"ESRI.ArcGIS.Client.Geometry.Geometry, ESRI.ArcGIS.Client","isRequired":false,"value":{"type":"polygon","rings":[[[1434105.12509534,560706.062577073

    <snip>

    [1434105.12509534,560706.062577073]]],"_ring":0,"spatialReference":{"wkid":2264}}}]

     

    I've run this in the 1.3 viewer without issue.

    regards,

    Edmond

    PS - Using Fiddler with the Silverlight viewer will also show the geometry argument. 

    <Activity mc:Ignorable="sads sap" x:Class="{x:Null}"

     

     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: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: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">

     

      <x:Members>

     

        <x:Property Name="thisGeometry" Type="InArgument(esri:Geometry)" />

     

      </x:Members>

     

      <sap:VirtualizedContainerService.HintSize>273,286</sap:VirtualizedContainerService.HintSize>

     

      <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>

     

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

     

        <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:Alert sap:VirtualizedContainerService.HintSize="211,82" Text="[thisGeometry.extent.tostring]" Title="[thisGeometry.tostring]" />

     

      </Sequence>

     

    </Activity>
    0
  • Marcus Bodig

    The geometry is not be being passed into the workflow.  I get the following error when I use the alert you provided: There was a workflow error running activity: Exception has been thrown by the target of an invocation. Workflow 'Climate_Buffer_From_Partners' failed Unhandled exception: 'Object reference not set to an instance of an object.' in activity '1.153: Alert'. Object reference not set to an instance of an object.

    I get the geometry returned just fine in the Silverlight Viewer.

     

    Any Ideas for a workaround?

    0
  • Permanently deleted user

    Hi Marcus,

      I forgot to explicitly state that the hyperlink specifies the name of the argument, so if there was a mismatch you'd see the error you got. Here is the hyperlink text I used:

     

    HyperLink Command

     

    <a href="command:RunWorkflowWithArguments?workflowId=thisWorkflow&thisGeometry={$Geometry}">Run this workflow too</a>

     

    So for your system, rather then mess with your hyperlink command in your layer, change my workflow's argument from "thisGeometry" to "input" and retry it. If it fails again then go to Fiddler and capture the run workflow request, then examine it. Is the input "value" blank? If so, compare it agains the request on the Silverlight one.

     

    regards,

    Edmond

    0
  • Marcus Bodig

    Has anyone found a workaround for this issue?  I still can not pass geometry from the HTML5 Viewer

    0
  • Permanently deleted user

    Hi Marcus,

    There was a bug in the HTML5 Viewer that prevented arguments from being passed to the workflow when using the RunWorkflowWithArguments command. This has been fixed in the 1.3.1 maintenance release, which is available under the Downloads tab.

    -Victoria

    0
  • Marcus Bodig

    That fixed the issue - Thank you very much!

    0
  • Lauren MacLean
    I'm trying to do this with a tool, passing the geometry drawn by the tool to the workflow. I've not had any luck at all despite changing the desktop.json to include

     

    "command": "RunWorkflowWithArguments",

     

                      "commandParameter": {

     

                        "workflowId": "MyWorkflow",

     

                        "ExtGeom": "{{geometry}}"

     

                      }

     

    Is this possible? it seems to not even try and fail to run the workflow. it just does nothing.
    0
  • Permanently deleted user
    Hi All,

     

     

    I got this error when try to run a hyperlink workflow:

     

    This is the my command:

     

    <div>{ParcelNumber}</div><div>{BlockNumber}</div><div>{CommunityName_Arabic}</div><div style="font-size: 10pt;"><span style="font-family: Arial; font-size: small;"><span style="font-weight: bold; color: rgb(0, 0, 153);"><br/></span></span></div><a href="command:RunWorkflowWithArguments?workflowId=MultiLayerReportWithMap&amp;objectID={OBJECTID}" style="font-size: 10pt; font-weight: bold;">????? ??????? ??????</a><span style="font-size: 10pt;">&nbsp;</span>

     

     

     

    And I got this error in the buffer tool:

     

     

    There was a workflow error running activity: Exception has been thrown by the target of an invocation. Workflow 'MultiLayerReportWithMap' failed Unhandled exception: 'Value cannot be null. Parameter name: geometry' in activity '1.170: BufferTask'. Value cannot be null. Parameter name: geometry

     

     

     

    please note that if I add a display form instead of  hyperlink on the layer the workflow will work fine, so the problem from the hyperlink.

     

     

    Any suggestion?

     

     

    Thank you in advance

     

     

     

     
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.