Skip to main content

How to run external command, for example "identify" in vertiGIS Workflow

Comments

6 comments

  • Nico Burgerhart

    Is your question on Geocortex Essentials Workflow (your screenshot) or on VertiGIS Studio Workflow?

    And what is your viewer application.

    Assuming Geocortex Viewer for HTML5, there is an Identify command, but the command parameter is a geometry.

    https://docs.vertigisstudio.com/essentials/gvh/4.14/commands-help/#/commands/Identify/Identify

    1
  • lubnan

    My question is on VertiGIS 5.20

    I am trying to build workflow in vertiGIS, and I try to translate those command in the GVH to be similar in VertiGIS

     

    Best,

    Lubna

     

    1
  • lubnan

    I will try it, thank you

    0
  • lubnan

    Hi,

    I built a workflow that makes a query for 3 values and it runs successfully with zooming to the result but it fails to make the identify task on the selected feature.

    I used 2 command (get centroid and run command “task.Identify”) as shown in the below screenshots

    Json code is below,

    {"_properties":{"isServerWorkflow":false},"components":[{"id":2,"steps":[{"id":3,"inputs":{},"position":"-370,-140","purpose":"start","title":"Start","transitions":[{"id":214,"inputs":{},"position":"-280,-80 -280,-30","sourceConnector":"bottom","target":{"id":4},"targetConnector":"top"}]},{"action":"gcx:wf:forms:form:DisplayForm","id":4,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":5}}},"name":"DisplayForm","position":"-400,-30","title":"Display Form","transitions":[{"id":114,"inputs":{},"position":"-280,90 -280,150 -260,150 -260,170","sourceConnector":"bottom","target":{"id":23},"targetConnector":"top"}]},{"action":"gcx:wf:core::If","id":23,"inputs":{"condition":{"accessors":["$DisplayForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$DisplayForm.result === \"Submit\"","source":"$DisplayForm.result === \"Submit\""}},"position":"-320,170","title":"If","transitions":[{"branch":"false","id":66,"inputs":{},"position":"-200,200 0,200 0,370 20,370","sourceConnector":"right","target":{"id":65},"targetConnector":"left"},{"branch":"true","id":115,"inputs":{},"position":"-320,200 -580,200 -580,150 -720,150 -720,170","sourceConnector":"left","target":{"id":109},"targetConnector":"top"}]},{"action":"gcx:wf:core::Exit","id":65,"inputs":{},"position":"20,340","title":"Exit"},{"action":"gcx:wf:core::Container","id":68,"inputs":{},"position":"-1070,770","title":"Identify","transitions":[{"id":79,"position":"-950,860 -950,930","sourceConnector":"bottom","target":{"id":166},"targetConnector":"top"}]},{"action":"gcx:wf:core::Container","id":90,"inputs":{},"position":"-1070,640","title":"Show results","transitions":[{"id":75,"position":"-950,730 -950,770","sourceConnector":"bottom","target":{"id":68}}]},{"action":"gcx:wf:core::Container","id":92,"inputs":{},"position":"-840,300","title":"Parcel Query","transitions":[{"id":76,"inputs":{},"position":"-840,345 -950,345 -950,510","sourceConnector":"left","target":{"id":152},"targetConnector":"top"}]},{"action":"gcx:wf:core::Container","id":109,"inputs":{},"position":"-840,170","title":"Container","transitions":[{"id":116,"inputs":{},"position":"-720,260 -720,300","sourceConnector":"bottom","target":{"id":92},"targetConnector":"top"}]},{"action":"gcx:wf:core::Container","id":152,"inputs":{},"position":"-1070,510","title":"Zoom To","transitions":[{"id":85,"inputs":{},"position":"-950,600 -950,640","sourceConnector":"bottom","target":{"id":90},"targetConnector":"top"}]},{"action":"gcx:wf:ui::Alert","id":166,"inputs":{"text":{"accessors":["$queryParcel1"],"annotations":[{"count":13,"index":0,"kind":"idref"}],"code":"$queryParcel1.features.length.toString()","source":"$queryParcel1.features.length.toString()\n"},"title":"x"},"position":"-1070,930","title":"Alert"}]},{"id":7,"steps":[{"id":8,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":15,"inputs":{},"position":"90,60 90,110","target":{"id":10}}]},{"action":"gcx:wf:forms::GetFormEventData","description":"Get the current value from the AutoComplete element.","id":10,"inputs":{"form":{"accessors":["$$form"],"code":"$$form","source":"$$form"}},"name":"getFormEventData1","position":"-30,110","title":"Get Form Event Data","transitions":[{"id":16,"inputs":{},"position":"90,220 90,270","target":{"id":11}}]},{"action":"gcx:wf:core::TextReplace","description":"Escape apostrophe characters to avoid SQL injection and broken queries.","id":11,"inputs":{"newValue":"''","oldValue":"'","text":{"accessors":["$getFormEventData1"],"code":"$getFormEventData1.argument","source":"$getFormEventData1.argument"}},"name":"textReplace1","position":"-30,270","title":"Text Replace","transitions":[{"id":17,"inputs":{},"position":"90,400 90,450","target":{"id":12}}]},{"action":"gcx:wf:arcgis:query:QueryTask","description":"Query for features.","id":12,"inputs":{"outFields":"CommunityName_Arabic","returnGeometry":false,"url":"https://lubnaj-pc.molg.pna.ps/adaptor/rest/services/Parcels/MapServer/1","where":{"accessors":["$textReplace1"],"annotations":[{"count":13,"index":43,"kind":"idref"}],"code":"\"UPPER(CommunityName_Arabic) LIKE UPPER('\".concat($textReplace1.result, \"%')\")","source":"`UPPER(CommunityName_Arabic) LIKE UPPER('${$textReplace1.result}%')`"}},"name":"query1","position":"-30,450","title":"Query Layer","transitions":[{"id":18,"inputs":{},"position":"90,550 90,600","target":{"id":13}}]},{"action":"gcx:wf:forms::GetFormElementItemsFromFeatures","description":"Convert the features into form element items to be used in the element.","id":13,"inputs":{"features":{"accessors":["$query1"],"code":"$query1.features","source":"$query1.features"},"labelFieldName":"CommunityName_Arabic","valueFieldName":"CommunityName_Arabic"},"name":"formElementItems1","position":"-30,600","title":"Get Form Element Items From Features","transitions":[{"id":19,"inputs":{},"position":"90,730 90,780","target":{"id":14}}]},{"action":"gcx:wf:forms::SetFormElementItems","description":"Assign form element items to the element.","id":14,"inputs":{"form":{"accessors":["$$form"],"code":"$$form","source":"$$form"},"items":{"accessors":["$formElementItems1"],"code":"$formElementItems1.items","source":"$formElementItems1.items"}},"position":"-30,780","title":"Set Form Element Items"}],"title":"suggest-CommunityName"},{"id":69,"steps":[{"id":70,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":113,"inputs":{},"position":"90,60 90,240","sourceConnector":"bottom","target":{"id":74},"targetConnector":"top"}]},{"action":"gcx:wf:arcgis::GetCentroid","id":74,"inputs":{"geometry":{"accessors":["$getFeatureSetExtent1"],"annotations":[{"count":21,"index":0,"kind":"idref"}],"code":"$getFeatureSetExtent1.center","source":"$getFeatureSetExtent1.center"}},"name":"centroid1","position":"-30,240","title":"Get Centroid","transitions":[{"id":78,"inputs":{},"position":"90,310 90,390","sourceConnector":"bottom","target":{"id":77},"targetConnector":"top"}]},{"action":"gcx:wf:app::RunCommand","id":77,"inputs":{"commandName":{"accessors":[],"code":"\"tasks.identify\"","source":"\"tasks.identify\""}},"position":"-30,390","title":"Run Command"}]},{"id":91,"steps":[{"id":96,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":104,"inputs":{},"position":"90,60 90,120","sourceConnector":"bottom","target":{"id":103},"targetConnector":"top"}]},{"action":"gcx:wf:arcgis::SelectFeatures","id":103,"inputs":{"featureSetDisplayName":"ParcelNumber","features":{"accessors":["$queryParcel1"],"annotations":[{"count":13,"index":0,"kind":"idref"}],"code":"$queryParcel1.features","source":"$queryParcel1.features"},"mapServiceId":{"accessors":[],"code":"0","source":"0"}},"position":"-30,120","title":"Show Results"}]},{"id":93,"steps":[{"id":94,"inputs":{},"position":"0,-60","purpose":"start","title":"Container","transitions":[{"id":99,"inputs":{},"position":"90,0 90,50","sourceConnector":"bottom","target":{"id":98},"targetConnector":"top"}]},{"action":"gcx:wf:arcgis:query:QueryTask","id":98,"inputs":{"groupByFieldsForStatistics":"CommunityName_Arabic","layer":"Parcels_04","outFields":"*","returnDistinctValues":false,"returnGeometry":true,"url":"https://lubnaj-pc.molg.pna.ps/adaptor/rest/services/Parcels/MapServer/0","where":{"accessors":["$DisplayForm","$DisplayForm","$DisplayForm"],"annotations":[{"count":12,"index":34,"kind":"idref"},{"count":12,"index":106,"kind":"idref"},{"count":12,"index":172,"kind":"idref"}],"code":"\"((CommunityName_Arabic) LIKE ('\".concat($DisplayForm.state.CommunityName.value, \"')) AND ((ParcelNumber) LIKE ('\").concat($DisplayForm.state.Parcelno.value, \"')) AND ((BlockNumber) LIKE ('\").concat($DisplayForm.state.Blockno.value, \"'))\")","source":"`((CommunityName_Arabic) LIKE ('${$DisplayForm.state.CommunityName.value}')) AND ((ParcelNumber) LIKE ('${$DisplayForm.state.Parcelno.value}')) AND ((BlockNumber) LIKE ('${$DisplayForm.state.Blockno.value}'))`\n"}},"name":"queryParcel1","position":"-30,50","title":"Parcels Query","transitions":[{"id":89,"inputs":{},"position":"90,120 90,210","sourceConnector":"bottom","target":{"id":123},"targetConnector":"top"}]},{"action":"gcx:wf:core::SetProperty","id":123,"inputs":{"object":{"accessors":["$selectedFeatures"],"annotations":[{"count":17,"index":0,"kind":"idref"}],"code":"$selectedFeatures","source":"$selectedFeatures"},"propertyName":"result","propertyValue":{"accessors":["$queryParcel1"],"annotations":[{"count":13,"index":0,"kind":"idref"}],"code":"$queryParcel1.features","source":"$queryParcel1.features"}},"position":"-30,210","title":"Set Selected Features"}]},{"id":110,"steps":[{"id":111,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":120,"inputs":{},"position":"90,60 90,120","sourceConnector":"bottom","target":{"id":119},"targetConnector":"top"}]},{"action":"gcx:wf:core::CreateValue","description":"Used to store selected features from chosen query","id":119,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[]","source":"[]"}},"name":"selectedFeatures","position":"-30,120","title":"Selected Features List"}]},{"id":132,"steps":[{"action":"gcx:wf:arcgis::SetViewExtent","id":134,"inputs":{"geometry":{"accessors":["$getFeatureSetExtent1"],"annotations":[{"count":21,"index":0,"kind":"idref"}],"code":"$getFeatureSetExtent1.extent","source":"$getFeatureSetExtent1.extent"}},"name":"setMapExtent","position":"-20,230","title":"Set Map Extent"},{"id":140,"inputs":{},"position":"10,20","purpose":"start","title":"Container","transitions":[{"id":146,"inputs":{},"position":"100,80 100,120","sourceConnector":"bottom","target":{"id":142},"targetConnector":"top"}]},{"action":"gcx:wf:arcgis::GetFeatureSetExtent","id":142,"inputs":{"features":{"accessors":["$selectedFeatures"],"annotations":[{"count":17,"index":0,"kind":"idref"}],"code":"$selectedFeatures.result","source":"$selectedFeatures.result"}},"name":"getFeatureSetExtent1","position":"-20,120","title":"Get Feature Set Extent","transitions":[{"id":148,"inputs":{},"position":"100,190 100,230","target":{"id":134}}]}]}],"deploymentConfig":{"supportedApps":{"GWV":true}},"designerVersion":"5.28.1+3","forms":[{"defaults":{},"elements":{"Blockno":{"enabled":true,"index":1,"rowIndex":0,"rowNumber":1,"title":{"markdown":"Block Number"},"titleLocation":"beside","type":"TextBox"},"CommunityName":{"enabled":true,"index":2,"prompt":{"markdown":"Start typing a value"},"rowIndex":0,"rowNumber":2,"title":{"markdown":"Community Name"},"titleLocation":"beside","type":"AutoComplete"},"Parcelno":{"enabled":true,"index":0,"rowIndex":0,"rowNumber":0,"title":{"markdown":"Parcel Number"},"titleLocation":"beside","type":"TextBox"},"footer":{"enabled":true,"items":{"0":{"default":true,"index":0,"label":{"markdown":"Submit"},"validates":true,"value":"Submit"},"1":{"index":1,"label":{"markdown":"Cancel"},"validates":false,"value":"cancel"}},"section":"footer","type":"ButtonBar"},"header":{"section":"header","title":{"markdown":"Form Title"},"type":"Header"}},"id":5}],"licenseInfo":{"licenseUrl":"https://lubnaj-pc.molg.pna.ps/vertigisstudio/workflow/service/auth/license"},"start":{"id":3},"transitions":[{"branch":"suggest$CommunityName","id":9,"inputs":{},"source":{"id":4},"target":{"id":8}},{"branch":"content","id":71,"inputs":{},"source":{"id":68},"target":{"id":70}},{"branch":"content","id":95,"inputs":{},"source":{"id":92},"target":{"id":94}},{"branch":"content","id":97,"inputs":{},"source":{"id":90},"target":{"id":96}},{"branch":"content","id":112,"inputs":{},"source":{"id":109},"target":{"id":111}},{"branch":"content","id":154,"inputs":{},"source":{"id":152},"target":{"id":140}}]}

     

    I will be very appreciated for any help :)

     

    Best,

    Lubna

    0
  • lubnan

    Hi again,

    I used get centroid because of the result of my query is polygon not point, so I think it will not working well if I run the Identify task without get centroid, but still is not working with me

     

    best,

    Lubna

    0

Please sign in to leave a comment.