I have a geoprocess which runs fine in arc map/model builder and in REST. However when I use the geoprocess map service the process fails. I know why it fails but don't know how to correct it.
I have published many services before, but never with this issue.
In my model I'm using the 'make feature layer tool' with a default SQL parameter. The default SQL (or any other input at the tool level) works fine in arc map. I then share the results as a geoprocess service. The service works fine in REST. When I try to use the service in my flex web app the job fails. I've figured out that if I change my code in flex for the SQL parameter input to expression = "", the service works correctly.... except now I get all data. If I manually hard code a valid SQL as a parameter input for 'submitJob', it fails. I can use the same basic code for other geoprocess services and get the expected results. Something is happening with the parameter input. It seems to override the model builder default if its set to " ", but not if I try to provide the SQL.... going crazy.
Any ideas,
Eddie