I have a model designded in Model Builder to process raster datasets. It embraces a whole bunch of processes such as raster calcualtion, BlockStatistics and Kriging. I am wondering how I can put in success validation for each of the process in the model in Model Builder to detect if the process has successfully run.

Is it possible without converting the model to python?

p.s. The Model will be eventually published as Geoprocessing Service by ArcGIS Server 10.1 so that the web browse calls the service and then gets a Result as the output in JSON if the Model rans successfully or on which process it failed. The success validation component should be part of the Model and generate result as parameter of the model.

Thanks in advance.

Cheers, Alex


I use code like this within my Python scripts that get exposed as Geoprocessing Services.

arcpy.SetParameterAsText(9, "SUCCEEDED")


arcpy.SetParameterAsText(9, "FAILED")

I think the ModelBuilder equivalent would be to use an output parameter.

It shows up at the top of the returned JSON as something like this (for failure):

  "results" : [
      "paramName" : "MapRequestResult",
      "dataType" : "GPString",
      "value" : "FAILED"
  "messages" : [
  • Thanks PolyGeo. The "SetParameterAsText" you suggested requires the model to be exported to Python before any custom codes can be inserted. Output parameter is also for a Python script. Is there any equivalent to "arcpy.SetParameterAsText" in Model Builder? – alextc Jul 29 '13 at 23:45
  • I think you can create a model variable, that you set to be a parameter, and then on the model's parameters tab you set its direction to be output. – PolyGeo Jul 30 '13 at 0:46
  • Hi PolyGeo. The variable can only be set to Required or Optional, no Output can be selected on the Parameter tab – alextc Jul 30 '13 at 5:29
  • The output option is also called Derived - this page on Setting script tool parameters talks about it. – PolyGeo Jul 30 '13 at 7:26

You can creat a model report :

To create a model report, do the following: Steps:

  1. Choose from the menu by clicking Model > Report.
  2. Choose either Report on your screen or Save it to a file as the way you will view the report.
  3. If you choose to save, navigate to the location you want to save the report, type in a new name, then click Save.

    Reports are saved to an XML file. You can view this file in your browser, such as Internet Explorer.

or you can use validation script By adding Python code You can provide custom behavior for your script tool dialog box, such as enabling and disabling parameters, providing default values, and updating string keywords.

  • Thanks Geog for the info. I think I might have mis-expressed my idea. My plan was to eventually expose the model as a geoprocessing service so that the service pvovides a result in JSON or XML so that the client knows on which process the model failed. – alextc Jul 29 '13 at 6:12

Just bring up the results window. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Using_the_Results_window/002100000013000000/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.