I'm creating a model in order to publish it as a geoprocessing service. The model runs successfull in ArcMap but it crashes when I run the published GPService.

The model has a parameter called FUSO, which can be equals to 23 or 24. This parameter selects for instance which geodatabase table I'll need to use as a route source.

The GPServer errror is Error executing tool.: The value does not exist.\nERROR 000732: Input Features: Dataset GEO.VWG_LOGRADOURO_LIN_%FUSO% does not exist or is not supported\nWARNING 000970: The join field id_logradouro_%fuso% in the join table TABELA_DISTANCIAS is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.

So I guess that despite of ArcMap be able to interprets %FUSO% as the value of the parameter FUSO, the GPServer does not.

Refer to images bellow to see how I built the model.

How can I pass throught it?

enter image description here enter image description here


I can understand why its not working, but its difficult to type out and explain the whole reason - so I'll just explain the better way to do what you want to do:

Make feature layer isn't required in your workflow. You're using it to help select a featurelayer on something that is already a layer. (You arent making a layer, nor using the expression) Instead of using MFL in your model, remove it. Also delete the FUSO variable.

Now drag both the featureclasses that could be used in the workflow into your Table of Contents and re-name them to 23 and 24 (or whatever convent makes sense because its going to replace the FUSO variable).

Have the input layer parameter to Add Join exposed as a parameter (make the P beside it).

When you run the model inside ArcMap, you'll select either 23 or 24 as the input layer.

And when you publish it, that particular parameter will be a choice list of layers: 23 and 24. When the person using the GP Service interacts with it, they choose 23 or 24 and the service knows what layer to pass into AddJoin.

Bonus: you removed 1 tool from the entire model and save that execution time. (which if the layers are large, could be a second or 2)

| improve this answer | |
  • Your answer is a great improvement to my model. After all, I figured out that my test environment was broken. My model worked fine once I published into production server. – Plinio.Santos Jan 27 '15 at 12:08

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.