ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

WorkflowExecutionResult

  • 概要
  • ディスカッション
  • プロパティ
  • コードのサンプル

概要

The WorkflowExecutionResult object provides the result of executing a step in the workflow.

ディスカッション

The WorkflowExecutionResult object provides the return code, which indicates the status of the step's execution. Each step has its own valid return codes and they can be used to guide the path of the workflow.

プロパティ

プロパティ説明データ タイプ
returnCode
(読み取り専用)

The code returned after executing a step in the workflow. It indicates whether the step was successful or failed and may be used to drive the workflow execution.

Integer

コードのサンプル

WorkflowExecutionResult example

The following script shows how a return code can be obtained from a step's execution.

import arcpy
import sys
import 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 Launch ArcMap 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

  • ホーム
  • ドキュメント
  • サポート

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2021 Esri. | プライバシー | リーガル