How to set up geoprocessing tool and geoprocessing service to produce downloadable output in Web AppBuilder

3673
1
Jump to solution
12-07-2015 02:02 AM
MarcinKowalski
New Contributor

I want to create a simple application in ArcGIS Web AppBuilder which uses geoprocessing service to generate output file.

I have a simple Python script which generates a TIFF image from a complex map document. I created a script tool which successfuly generates an image when running from ArcMap

My question is how to set up script tool parameters and geoprocessing service parameters to be able to configure geoprocessing widget in Web AppBuilder. 

My intention is to have a download link as an output.

0 Kudos
1 Solution

Accepted Solutions
MarcinKowalski
New Contributor

I've managed to set up a gp service.

Here're the most important settings:

Script:

- output image is written to default scratch folder (outDir = arcpy.env.scratchFolder)

- script parameter: arcpy.SetParameter(0,tif_path)

Script tool:

- Parameter: Data Type - file; Type - Derived; Direction - Output

GP Service:

Default settings.

Web AppBuilder:

Geoprocessing widget's parameters are populated automatically after poining to the service.

View solution in original post

1 Reply
MarcinKowalski
New Contributor

I've managed to set up a gp service.

Here're the most important settings:

Script:

- output image is written to default scratch folder (outDir = arcpy.env.scratchFolder)

- script parameter: arcpy.SetParameter(0,tif_path)

Script tool:

- Parameter: Data Type - file; Type - Derived; Direction - Output

GP Service:

Default settings.

Web AppBuilder:

Geoprocessing widget's parameters are populated automatically after poining to the service.