ArcGIS Desktop

  • Documentación
  • Soporte

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS for Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

WorkflowExecutionStepError

  • Resumen
  • Debate
  • Muestra de código

Resumen

Se produce la excepción WorkflowExecutionStepError si un paso del flujo de trabajo detecta un error de ejecución.

Debate

Se produce la excepción WorkflowExecutionStepError si no es posible ejecutar el paso del flujo de trabajo. Por ejemplo, se producirá el error si se intenta ejecutar un paso incompatible, como DefineAOI, EditExtendedProperties, LaunchArcMap, LaunchGP, OpenMap y SelectDataWorkspace.

Muestra de código

La excepción WorkflowExecutionStepError se utiliza abajo para manejar los errores derivados de intentar ejecutar un paso del flujo de trabajo.

import arcpy, sys, traceback

#Define the callback response function. In this case it will prompt the user using the console to respond.
def callback(question, responses):

    # Print out the expected responses
    for resp in responses:
        print "[%i] %s" + (resp[1], resp[0])
		
    # Prompt the user to respond
    val = int(input("%s - %s: " % (question[1], question[0])))
	
    # Return their response. Currently only returning the value, but could also return a note (for questions) and the name of the response
    return (val, "", "")

#Establish a connection to a Workflow database
conn = arcpy.wmx.Connect(r'c:\test\Workflow.jtc')

#Get a Job for Execution
job = conn.getJob(77601)

try:
	#Execute the current Step in the Job - a LaunchArcmap step without Proceed to Next enabled
	result = job.executeStep(callback=callback)
	
	#A LaunchArcmap step will not finish automatically it will be complete after the user indicates it is.
    if not(result.finished): 
        t = input("Please press any key and hit enter when finished step") 
		
		#Finish the step and Mark as Complete
        result.finishStep(callback=callback) 
        job.markStepAsComplete(callback=callback)
    
	#Run the next step in the workflow
        result = job.executeStep(callback=callback) 
	
    print "Executing a 2nd step returned %i" + result.returnCode
    
	#Mark the step as complete
	job.markStepAsComplete(callback=callback) 
	
except wmx.WorkflowExecutionStepError as e:
    print "Step failed to execute:"
    print "-"*60
    traceback.print_exc()

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

Plataforma ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog interno
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacidad | Legal