<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WAB Geoprocessing: how to add feature layer output to map in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1473941#M70598</link>
    <description>&lt;P&gt;When I change the output parameter data type from GPFeatureLayer to GPLayer,&amp;nbsp; the WAB widget starts allowing me to set the symbology and allows me to "&lt;SPAN&gt;Add result as operational layer" without "View result with a map service" which is progress and I think is what I want (I'm not sure of the pros and cons of viewing with a map service - do I need it?). However when I run it this way the widget completes with a message "The result is empty."&amp;nbsp; There are no errors in the service log, and from the browser network trace I see this being returned from the server&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{jobId: "jd972954c64554cecaab51457add1b7df", jobStatus: "esriJobSucceeded",…}
inputs
: 
{}
jobId
: 
"jd972954c64554cecaab51457add1b7df"
jobStatus
: 
"esriJobSucceeded"
messages
: 
[,…]
0
: 
{type: "esriJobMessageTypeInformative", description: "Start Time: Thursday, May 16, 2024 10:25:41 AM"}
description
: 
"Start Time: Thursday, May 16, 2024 10:25:41 AM"
type
: 
"esriJobMessageTypeInformative"
1
: 
{type: "esriJobMessageTypeInformative", description: "Start Time: Thursday, May 16, 2024 10:25:41 AM"}
description
: 
"Start Time: Thursday, May 16, 2024 10:25:41 AM"
type
: 
"esriJobMessageTypeInformative"
2
: 
{type: "esriJobMessageTypeInformative", description: "Running script States..."}
description
: 
"Running script States..."
type
: 
"esriJobMessageTypeInformative"
3
: 
{type: "esriJobMessageTypeInformative", description: "Completed script States..."}
description
: 
"Completed script States..."
type
: 
"esriJobMessageTypeInformative"
4
: 
{type: "esriJobMessageTypeInformative",…}
description
: 
"Succeeded at Thursday, May 16, 2024 10:25:44 AM (Elapsed Time: 2.67 seconds)"
type
: 
"esriJobMessageTypeInformative"
5
: 
{type: "esriJobMessageTypeInformative",…}
description
: 
"Succeeded at Thursday, May 16, 2024 10:25:44 AM (Elapsed Time: 2.68 seconds)"
type
: 
"esriJobMessageTypeInformative"
results
: 
{states: {paramUrl: "results/states"}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 15:51:58 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2024-05-16T15:51:58Z</dc:date>
    <item>
      <title>WAB Geoprocessing: how to add feature layer output to map</title>
      <link>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1473757#M70596</link>
      <description>&lt;P&gt;I have a&amp;nbsp; ArcGIS Pro 2.9.12&amp;nbsp; python toolbox tool that adds a feature layer to a map. A simplified version is below. It works fine in ArcGIS Pro, but when I publish it to my ArcGIS 10.6 Server I can't figure out how to achieve the same effect where the user runs an AGOL WAB geoprocessing widget and the result is a new layer in the map.&amp;nbsp; Here are the relevant parts of the tool&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    def getParameterInfo(self):
        return [arcpy.Parameter(displayName="States", name="states",  datatype="GPFeatureLayer",  parameterType="Derived",  direction="Output")]

    def execute(self, parameters, messages):
        db_dir = r'C:\Users\dmorri28\Documents\ArcGIS\Projects\MyProject\CC-SQL2k16-ERC-SDE.sde'
        feature_class = os.path.join(db_dir, "ROW_Habitat.SDE.USA_States_Generalized_Trimmed")
        
        layer_name = "States"                                  
        lyr = arcpy.MakeFeatureLayer_management(feature_class, layer_name)[0]
        
        arcpy.SetParameter(0, lyr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the publishing options&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonMorrison1_0-1715861164423.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104347i12C2F28611ED414C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonMorrison1_0-1715861164423.png" alt="DonMorrison1_0-1715861164423.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I've tried various combinations and nothing works. I do see various errors in the server manager log:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Can not open file c:\arcgisserver\directories\arcgisjobs\testing_only\states_gpserver\j8ca6a20d8a324d2dbbfad9bccb56cd79\Results.msd. The system cannot find the file specified. Probable cause: The file is inaccessible to Server.&amp;nbsp; &amp;nbsp;&lt;EM&gt;(that file does not exist at the location)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Failed to find the map.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Instance of the service 'TESTING_Only/States.GPServer' crashed. Please see if an error report was generated in 'C:\arcgisserver\logs\ERC-ROW01.AD.UIC.EDU\errorreports'. To send an error report to Esri, compose an e-mail to ArcGISErrorReport@esri.com and attach the error report file. (&lt;EM&gt;nothing there&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Do anybody know the secret to making this work?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 15:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1473757#M70596</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-05-16T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: WAB Geoprocessing: how to add feature layer output to map</title>
      <link>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1473941#M70598</link>
      <description>&lt;P&gt;When I change the output parameter data type from GPFeatureLayer to GPLayer,&amp;nbsp; the WAB widget starts allowing me to set the symbology and allows me to "&lt;SPAN&gt;Add result as operational layer" without "View result with a map service" which is progress and I think is what I want (I'm not sure of the pros and cons of viewing with a map service - do I need it?). However when I run it this way the widget completes with a message "The result is empty."&amp;nbsp; There are no errors in the service log, and from the browser network trace I see this being returned from the server&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{jobId: "jd972954c64554cecaab51457add1b7df", jobStatus: "esriJobSucceeded",…}
inputs
: 
{}
jobId
: 
"jd972954c64554cecaab51457add1b7df"
jobStatus
: 
"esriJobSucceeded"
messages
: 
[,…]
0
: 
{type: "esriJobMessageTypeInformative", description: "Start Time: Thursday, May 16, 2024 10:25:41 AM"}
description
: 
"Start Time: Thursday, May 16, 2024 10:25:41 AM"
type
: 
"esriJobMessageTypeInformative"
1
: 
{type: "esriJobMessageTypeInformative", description: "Start Time: Thursday, May 16, 2024 10:25:41 AM"}
description
: 
"Start Time: Thursday, May 16, 2024 10:25:41 AM"
type
: 
"esriJobMessageTypeInformative"
2
: 
{type: "esriJobMessageTypeInformative", description: "Running script States..."}
description
: 
"Running script States..."
type
: 
"esriJobMessageTypeInformative"
3
: 
{type: "esriJobMessageTypeInformative", description: "Completed script States..."}
description
: 
"Completed script States..."
type
: 
"esriJobMessageTypeInformative"
4
: 
{type: "esriJobMessageTypeInformative",…}
description
: 
"Succeeded at Thursday, May 16, 2024 10:25:44 AM (Elapsed Time: 2.67 seconds)"
type
: 
"esriJobMessageTypeInformative"
5
: 
{type: "esriJobMessageTypeInformative",…}
description
: 
"Succeeded at Thursday, May 16, 2024 10:25:44 AM (Elapsed Time: 2.68 seconds)"
type
: 
"esriJobMessageTypeInformative"
results
: 
{states: {paramUrl: "results/states"}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 15:51:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1473941#M70598</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-05-16T15:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: WAB Geoprocessing: how to add feature layer output to map</title>
      <link>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1507486#M71095</link>
      <description>&lt;P&gt;After working with &lt;A href="https://my.esri.com/#/support/cases/tech-cases?caseNumber=03638817" target="_self"&gt;ESRI customer support&lt;/A&gt; we determined that this could be fixed by upgrading the ArcGIS Pro client and the ArcGIS Server to the latest releases (3.3 and 11.3)&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 23:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wab-geoprocessing-how-to-add-feature-layer-output/m-p/1507486#M71095</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-07-19T23:18:18Z</dc:date>
    </item>
  </channel>
</rss>

