I am developing a Python tool script in ArcGIS 10.3.x that is meant to be later published as a GP service and consumed inside a web application (e.g. built with ESRI JS API). The tool script produces two output feature classes (see below) that I would like to automatically add to the display. Usually one would set the tool output to derived in order to accomplish that. In my tool properties, I have a derived output parameter, set to multivalue to accommodate multiple feature classes that are created in the script. However, once the script is done running, none of the two output feature classes (correctly written to my scratch GDB) show up in the TOC in ArcMap, which would be necessary before publishing it as a GP service. Anyone has an idea what am I doing wrong?
inTable = arcpy.GetParameterAsText(1)
startX_field = arcpy.GetParameterAsText(2)
startY_field = arcpy.GetParameterAsText(3)
endX_field = arcpy.GetParameterAsText(4)
endY_field = arcpy.GetParameterAsText(5)
lineType_str = arcpy.GetParameterAsText(6)
SpRef = arcpy.GetParameterAsText(7)
outList = 
# XY To Line
flowsOutputFC = os.path.join(arcpy.env.scratchGDB, "FlowLines")
nodesOutput = "DestNodes"
nodesOutputFC = os.path.join(arcpy.env.scratchGDB, "DestNodesFC")
results = ";".join(outList)
Just as a check ,In the geoprocessing, geoprocessing options, ensure that
results are temporary by default is toggled off
add results to display is toggled on
short of adding a few print statements in to ensure something is being created and received between steps, no. Those tools won't necessarily throw an error if nothing is being created or saved.