Select to view content in your preferred language

Evaluate validation rules on a version programmatically

64
0
yesterday
SeanPerkins
New Contributor

Hi all. I've been trying to create a script to fire the validation rules on a given FeatureServer specifically on a non-default version.

Right now my process looks something like this.

gis = my_gis_object
connection= "https://myserver.com/webadaptor/path_to_service/VersionManagementServer"
# get version manager
version_manager = VersionManager(connection,gis)
# define version parameters
version_name = "daily_validation_version"
version_owner = "administrator_account"
# create version
version = version_manager.create(name=version_name, permission="PRIVATE")
# get Validation Server for the version
validation = version.validation
# evaluate validation rules
eval = validation.evaluate(evaluation=['validationRules'], changes_in_version=True, return_edits=True)

 When I try to run this script I get Error:160902 I'm at a loss as to where I go from here.

In the debugger I see that the version, and the validation server are being properly created and accessed, so I know that the issue arises when I try to call the validation.evaluate method, which leads me to believe it's an argument issue

I know that arcpy.management.EvaluateRules exists, but that specifies that it runs against the default version.

0 Kudos
0 Replies