AnsweredAssumed Answered

Published GP service is not using data store

Question asked by jon.morris on Oct 7, 2015
Latest reply on Nov 20, 2015 by jon.morris

I published a GP tool to my server and it fails when I try and run it via Javascript API. The error is that it cannot find the input dataset - this is happening because the input workspace is a file GDB on a network share and the server does not have access to any network resources.

 

We've set up the data store (see screenshot) so that the network file GDB is duplicated locally, and I thought that the GP service would use the local workspace instead, but this clearly isn't happening.

 

DataStore.png

 

I remote desktopped onto the server and found the location of the python script and saw that the workspace had been converted to a global variable, but was still pointing to the network GDB. Should this have been changed to the local GDB?

 

# Esri start of added variables
g_ESRI_variable_1 = u'\\\\getech\\store\\UTILITIES\\Globe_Data\\2015_08_04\\globe20150804-134955.gdb'
# Esri end of added variables


...


INWorkspace = g_ESRI_variable_1
OUTWorkspace = arcpy.env.scratchGDB
arcpy.env.workspace = INWorkspace
arcpy.env.scratchWorkspace = OUTWorkspace


etc

 

When I edit the script and change

g_ESRI_variable_1 = u'\\\\getech\\store\\UTILITIES\\Globe_Data\\2015_08_04\\globe20150804-134955.gdb'

to

g_ESRI_variable_1 = r'd:\data'

it runs ok when called with Javascript.

 

cc Geoprocessing ArcGIS API for JavaScript

Outcomes