Melissa,
In asynchronous gp tasks, when a client(in your case flex app) submits a request with input parameters, the server validates the input parameters.
If the parameters are valid, server creates a jobid, starts execution of the tool and sends the client the jobid.
Using the jobid, the client makes subsequent request for the status of the job.
When the job status is 'esrijobcompleted', the client downloads the results(output parameters) from the server.
From your error message, it sounds like the task is progressing but fails half-way through..
Here's some suggestions to troubleshoot failed gp services.
1. Using ArcGIS Manager or ArcGIS Desktop, turn on Show Messages option for your geoprocessing service.
2. Run your gp task from flexviewer application. Note down the job id.
3. In your server machine, go to arcgisjobs directory. (C:\arcgisserver\arcgisjobs, if you have installed server with default location ).
4. Look for the folder with you gp service name and underneath it, you will find a folder with job id.
5. The geoprocessing task writes all outputs and messages to this directory.
6. Find messages.dat file. All geoprocessing tool messages will be written in it and it will help you troubleshoot further.
7. Look into the scratch folder. If the tool has succeeded, you will find a zip file.
Hope this helps...