{"_properties":{"isServerWorkflow":false},"components":[{"id":1,"steps":[{"id":2,"inputs":{},"position":"-270,-30","purpose":"start","title":"Start","transitions":[{"id":227,"inputs":{},"position":"-180,30 -180,70","sourceConnector":"bottom","target":{"id":214}}]},{"action":"gcx:wf:core::Annotation","description":"Most of the activities used are in the default Workflow toolbox, with the exception of the Open Window which is from the **JavaScript Web APIs Activity pack**. ","id":79,"inputs":{},"position":"-1140,240","title":"Dependencies","width":"extra-wide"},{"action":"gcx:wf:forms:form:DisplayForm","description":"Our main form: allows the user to set their selections and proceed to running the print.","id":89,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":87}}},"name":"printTool","position":"-300,300","title":"Print Tool","transitions":[{"id":280,"inputs":{},"position":"-180,480 -180,540 -130,540 -130,560","sourceConnector":"bottom","target":{"id":261}}]},{"action":"gcx:wf:core::Annotation","description":"This workflow is intended to show how you might use a conjunction of Studio Workflow and Printing to provide users with your ideal printing functionality via a custom form interface and extended logic.\n\nWe have a few activities:\n- Setup, for configuring some variables\n- Print Tool, which is a Display Form, for our form\n- a Switch to handle form print/cancel logic\n- a Run Command to popup the print output in a new tab","id":192,"inputs":{},"position":"-1140,-10","title":"Notes","width":"extra-wide"},{"action":"gcx:wf:core::Container","description":"This container has all our URLs, variables and configured templates.","id":214,"inputs":{},"name":"setup","position":"-300,70","title":"Setup","transitions":[{"id":279,"inputs":{},"position":"-180,230 -180,300","target":{"id":89}}]},{"action":"gcx:wf:core::Switch","description":"","id":261,"inputs":{"value":{"accessors":["$printTool"],"annotations":[{"count":10,"index":0,"kind":"idref"}],"code":"$printTool.result","source":"$printTool.result"}},"position":"-250,560","title":"Switch","transitions":[{"branch":"cancel","id":273,"inputs":{},"position":"-10,590 20,590 20,940","sourceConnector":"right","target":{"id":265}},{"id":282,"inputs":{},"position":"-190,620 -190,640 -230,640 -230,770","purpose":"default","target":{"id":286},"title":"print"}]},{"action":"gcx:wf:core::Exit","id":265,"inputs":{},"position":"-70,940","title":"Exit"},{"action":"uuid:9f74ca74-c74e-4951-9a57-03c3781c73e4::OpenWindow","id":277,"inputs":{"url":{"accessors":["$runPrint"],"annotations":[{"count":9,"index":0,"kind":"idref"}],"code":"$runPrint.href","source":"$runPrint.href"}},"position":"-360,940","title":"Open Window"},{"action":"gcx:wf:geocortex::RunPrint","id":286,"inputs":{"extent":{"accessors":["$mapExtent"],"annotations":[{"count":10,"index":0,"kind":"idref"}],"code":"$mapExtent.extent","source":"$mapExtent.extent"},"parameters":{"accessors":["$printTool","$printTool"],"annotations":[{"count":10,"index":9,"kind":"idref"},{"count":10,"index":51,"kind":"idref"}],"code":"{ Title: $printTool.state.titleEntry.value, Notes: $printTool.state.notes.value }","source":"{ Title: $printTool.state.titleEntry.value, Notes: $printTool.state.notes.value }"},"scale":{"accessors":["$printTool"],"annotations":[{"count":10,"index":0,"kind":"idref"}],"code":"$printTool.state.dropDownScale.value.data.scale","source":"$printTool.state.dropDownScale.value.data.scale"},"url":{"accessors":["$printTool"],"annotations":[{"count":10,"index":58,"kind":"idref"}],"code":"\"https://latitudegeo.maps.arcgis.com/home/item.html?id=\" + $printTool.state.dropDownLayout.value.data.id","source":"\"https://latitudegeo.maps.arcgis.com/home/item.html?id=\" +$printTool.state.dropDownLayout.value.data.id"}},"name":"runPrint","position":"-350,770","title":"Run Print","transitions":[{"id":145,"inputs":{},"position":"-230,830 -230,920 -240,920 -240,940","target":{"id":277}}]}]},{"id":41,"steps":[{"id":43,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":50,"inputs":{},"position":"90,60 90,130","target":{"id":45}}]},{"action":"gcx:wf:forms::GetFormElementItemsFromCollection","id":45,"inputs":{"collection":{"accessors":["$availableScales"],"annotations":[{"count":16,"index":0,"kind":"idref"}],"code":"$availableScales.result","source":"$availableScales.result"},"labelFieldName":"{name}"},"name":"scaleElementItems1","position":"-30,130","title":"Get Form Element Items From Collection","transitions":[{"id":52,"inputs":{},"position":"90,200 90,270","target":{"id":48}}]},{"action":"gcx:wf:forms::SetFormElementItems","id":48,"inputs":{"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$scaleElementItems1"],"annotations":[{"count":19,"index":0,"kind":"idref"}],"code":"$scaleElementItems1.items","source":"$scaleElementItems1.items"}},"position":"-30,270","title":"Set Form Element Items"}],"title":"populate-dropDownScale"},{"id":54,"steps":[{"id":57,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":63,"inputs":{},"position":"90,60 90,190","sourceConnector":"bottom","target":{"id":59}}]},{"action":"gcx:wf:forms::GetFormElementItemsFromCollection","id":59,"inputs":{"collection":{"accessors":["$availableTemplates"],"annotations":[{"count":19,"index":0,"kind":"idref"}],"code":"$availableTemplates.result","source":"$availableTemplates.result"},"labelFieldName":"{name}"},"name":"layoutElementItems","position":"-30,190","title":"Get Form Element Items From Collection","transitions":[{"id":65,"inputs":{},"position":"90,260 90,310","target":{"id":61}}]},{"action":"gcx:wf:forms::SetFormElementItems","id":61,"inputs":{"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$layoutElementItems"],"annotations":[{"count":19,"index":0,"kind":"idref"}],"code":"$layoutElementItems.items","source":"$layoutElementItems.items"}},"position":"-30,310","title":"Set Form Element Items"}],"title":"populate-dropDownLayout"},{"id":102,"steps":[{"id":104,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":120,"inputs":{},"position":"90,60 90,120","target":{"id":106}}]},{"action":"gcx:wf:arcgis::GetViewExtent","id":106,"inputs":{},"name":"mapExtent","position":"-30,120","title":"Get Map Extent","transitions":[{"id":181,"inputs":{},"position":"90,180 90,230","target":{"id":179}}]},{"action":"gcx:wf:core::Annotation","description":"We're doing a bit of housekeeping here: \n- we get our map extent for passing into our print job\n- setting our various item URLs (workflow, print template example) \n- set our available print scales\n- our available print templates. \n\nThis is all populated into our form later.","id":112,"inputs":{},"position":"-380,90","title":"Notes"},{"action":"gcx:wf:core::Container","description":"Sets available scale selections for printing","id":114,"inputs":{},"position":"-30,500","title":"Set Scales","transitions":[{"id":126,"inputs":{},"position":"90,640 90,690","sourceConnector":"bottom","target":{"id":116}}]},{"action":"gcx:wf:core::Container","id":116,"inputs":{},"position":"-30,690","title":"Set Templates"},{"action":"gcx:wf:core::CreateValue","id":179,"inputs":{"expression":"https://latitudegeo.maps.arcgis.com/home/item.html?id=16cfba074fcc42858fe4164826d75fca"},"name":"workflowURL","position":"-30,230","title":"Set Workflow URL","transitions":[{"id":182,"inputs":{},"position":"90,290 90,500","sourceConnector":"bottom","target":{"id":114}}]}]},{"id":154,"steps":[{"id":156,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":164,"inputs":{},"position":"90,60 90,110","target":{"id":158}}]},{"action":"gcx:wf:core::CreateValue","id":158,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[]","source":"[]"}},"name":"availableTemplates","position":"-30,110","title":"Available Print Templates","transitions":[{"id":166,"inputs":{},"position":"90,180 90,240","target":{"id":160}}]},{"action":"gcx:wf:core::AddItem","id":160,"inputs":{"collection":{"accessors":["$availableTemplates"],"annotations":[{"count":19,"index":0,"kind":"idref"}],"code":"$availableTemplates.result","source":"$availableTemplates.result"},"item":{"accessors":[],"annotations":[],"code":"{ \"name\": \"8.5x11 Landscape\", \"id\": \"52ce0d6ac96b45df97983470092382b0\" }","source":"{\"name\": \"8.5x11 Landscape\", \"id\": \"52ce0d6ac96b45df97983470092382b0\"}"}},"position":"-30,240","title":"Add 8.5x11 Landscape","transitions":[{"id":168,"inputs":{},"position":"90,270 90,320","target":{"id":162}}]},{"action":"gcx:wf:core::AddItem","id":162,"inputs":{"collection":{"accessors":["$availableTemplates"],"annotations":[{"count":19,"index":0,"kind":"idref"}],"code":"$availableTemplates.result","source":"$availableTemplates.result"},"item":{"accessors":[],"annotations":[],"code":"{ \"name\": \"11x17 Landscape\", \"id\": \"8c1ff98cfd304500b9be065b8d0cea6b\" }","source":"{\"name\": \"11x17 Landscape\", \"id\": \"8c1ff98cfd304500b9be065b8d0cea6b\"}"}},"position":"-30,320","title":"Add 11x17 Landscape"}]},{"id":170,"steps":[{"id":172,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":178,"inputs":{},"position":"90,60 90,140","sourceConnector":"bottom","target":{"id":174}}]},{"action":"gcx:wf:core::CreateValue","id":174,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[]","source":"[]"}},"name":"availableScales","position":"-30,140","title":"Available Scales","transitions":[{"id":180,"inputs":{},"position":"90,210 90,280","target":{"id":176}}]},{"action":"gcx:wf:core::AddItem","id":176,"inputs":{"collection":{"accessors":["$availableScales"],"annotations":[{"count":16,"index":0,"kind":"idref"}],"code":"$availableScales.result","source":"$availableScales.result"},"item":{"accessors":[],"annotations":[],"code":"{ \"name\": \"1:5,000\", \"scale\": \"5000\" }","source":"{\"name\": \"1:5,000\", \"scale\": \"5000\"}"}},"position":"-30,280","title":"Add Item","transitions":[{"id":188,"inputs":{},"position":"90,310 90,360","target":{"id":187}}]},{"action":"gcx:wf:core::AddItem","id":187,"inputs":{"collection":{"accessors":["$availableScales"],"annotations":[{"count":16,"index":0,"kind":"idref"}],"code":"$availableScales.result","source":"$availableScales.result"},"item":{"accessors":[],"annotations":[],"code":"{ \"name\": \"1:10,000\", \"scale\": \"10000\" }","source":"{\"name\": \"1:10,000\", \"scale\": \"10000\"}"}},"position":"-30,360","title":"Add Item"}]}],"deploymentConfig":{"supportedApps":{"VSW":true}},"designerVersion":"5.40.1+4","forms":[{"defaults":{},"elements":{"buttonBar1":{"enabled":true,"index":6,"items":{"0":{"index":0,"label":{"markdown":"__Print__"},"value":"print"},"1":{"index":1,"label":{"markdown":"__Cancel__"},"value":"cancel"}},"rowIndex":0,"rowNumber":6,"section":{"name":"sectionPrintOptions"},"titleLocation":"above","type":"ButtonBar"},"dropDownLayout":{"current":"0","enabled":true,"index":3,"items":{},"require":true,"rowIndex":0,"rowNumber":3,"section":{"name":"sectionPrintOptions"},"title":{"markdown":"__Layout__"},"type":"DropDownList"},"dropDownScale":{"current":"0","enabled":true,"index":4,"items":{},"prompt":"","require":true,"rowIndex":0,"rowNumber":4,"section":{"name":"sectionPrintOptions"},"title":{"markdown":"__Scale__"},"type":"DropDownList"},"footer":{"enabled":true,"items":{},"section":"footer","type":"ButtonBar","visible":false},"header":{"section":"header","title":{"markdown":""},"type":"Header"},"notes":{"enabled":true,"index":5,"prompt":"Enter notes","rowIndex":0,"rowNumber":5,"section":{"name":"sectionPrintOptions"},"title":{"markdown":"__Notes__"},"type":"TextArea","wrap":"soft"},"sectionPrintOptions":{"enabled":true,"index":1,"rowIndex":0,"rowNumber":1,"title":{"markdown":"__Print Options__"},"type":"Section"},"text1":{"description":{"markdown":"This is intended as an example of how you might use Workflow to provide users with form elements of your choosing to populate an eventual print output.\n\nTo begin, throw some inputs in the form elements below.  "},"enabled":true,"index":0,"rowIndex":0,"rowNumber":0,"title":{"markdown":"__Example - Custom Print Dialog__"},"type":"Text"},"titleEntry":{"enabled":true,"index":2,"prompt":"Enter title","rowIndex":0,"rowNumber":2,"section":{"name":"sectionPrintOptions"},"title":{"markdown":"__Title__"},"titleLocation":"above","type":"TextBox"}},"id":87}],"licenseInfo":{"licenseeId":"88cb61d6-af47-9b3e-5181-ed674c4c0815"},"references":[{"id":84,"path":"https://unpkg.com/@vertigis/workflow-activities-web-apis@3.0.0","suite":"uuid:9f74ca74-c74e-4951-9a57-03c3781c73e4"}],"start":{"id":2},"transitions":[{"branch":"populate$dropDownLayout","id":93,"inputs":{},"source":{"id":89},"target":{"id":57}},{"branch":"populate$dropDownScale","id":95,"inputs":{},"source":{"id":89},"target":{"id":43}},{"branch":"content","id":216,"inputs":{},"source":{"id":214},"target":{"id":104}},{"branch":"content","id":222,"inputs":{},"source":{"id":114},"target":{"id":172}},{"branch":"content","id":224,"inputs":{},"source":{"id":116},"target":{"id":156}}]}