Extract Data Task (Clip and Ship) not honoring layerDefinitions

Discussion created by derekwicks on Mar 21, 2013
I am attempting to use the Extract Data geoprocessing task example to export features from a dynamic map service to a zipped shapefile. The export works but I have applied some filters using the layerDefinitions property of the map service layer and when I export the shapefile these definitions are not preserved and all of the features in the area of interest are exported. I have attempted to figure out a way to pass the definition query to the script tool used by the geoprocessing task but am stumped, any help would be much appreciated.