I am trying to publish a geoprocessing service that takes an input file from a web application, does a custom field calculation based on user defined integer inputs, and outputs a feature service that can be viewed and exported from the web application.
However, when I publish my geprocessing service and bring it into Web AppBuilder using the geoprocessing tool widget, I cannot choose the option "Add result as operational layer" and the output has the error "Can not set renderer because of unknown geometry type."
This is the REST URL for my geoprocessing service: WetlandPrioritization/WetlandPrioritizationTool_Ac (GPServer), and the screen shot below show my output parameter as having no geometry type.
Question 1) Does anybody know why I cannot see the geometry type? I am assuming this is the reason I cannot add my result as an operational layer.
Question 2) I am assuming the error above is why the tool will not run. But I also realized that I am using the python math module in my python script....Is that a problem? Do I need to download that module somehow onto my server, or can I assume the math module will work in the gp service?
My workflow for creating the Geoprocessing Service:
I created a script tool with a Feature Layer as the input, and a Feature Class as a derived output.
I then ran the tool in ArcMap (10.5) and published the geoprocessing service onto my organization's server (version 10.5). For Parameters in the Service Editor, I chose "Asynchronous" and "View results with map service," as I believe I can view the gp service results as a map service in addition to whatever my normal outputs are (such as an operational layer). I also specified maximum number of records returned by the server as 3000 because I have 2313 features in the input feature class that will be used by the tool. I then published the tool.
I have attached the source code that my web tool is running.