ArcGIS Desktop

  • Dokumentation
  • Support

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS for Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

WorkflowConnection

  • Zusammenfassung
  • Beschreibung
  • Methodenübersicht
  • Methoden
  • Codebeispiel

Zusammenfassung

The WorkflowConnection object provides access to methods for creating or getting a Workflow Manager job.

Beschreibung

Jobs are created from a job type template. All of the properties for the new job are automatically inherited from the job type and can be updated after creation using the Job methods.

Methodenübersicht

MethodeErläuterung
createJob ({job_type_id}, {job_type_name}, {job_type_description}, {callback})

Creates a new job based on a job type.

getJob (jobID)

Return a single job using its job ID.

Methoden

createJob ({job_type_id}, {job_type_name}, {job_type_description}, {callback})
ParameterErläuterungDatentyp
job_type_id

The ID of the job type from which to create a new job.

Integer
job_type_name

The name of the job type from which to create a new job.

String
job_type_description

The properties of the job type that can be customized and assigned to a new job being created, provided as the JobTypeDescription object.

JobTypeDescription
callback

The callback argument is used when job is set to automatically execute after being created. It passes a function that prompts the user for a response based on input from the step type. When executing a question step, for example, the callback takes the possible step response options and allows the user to choose the next step. It is also used when the next step in the workflow cannot be determined so a user can select the path to follow.

Function

Rückgabewert

DatentypErläuterung
Job

Returns the job created as a Job. A python list of Job objects is returned when multiple jobs are created by providing a list of Polygon objects in the JobTypeDescription and the AOI are not set to be unioned.

To create a new job requires a job type name, a job type ID, or a job type description.

The following script creates two jobs in the Workflow Managerdatabase: one defined by the job type name and the other by the job type ID.

import arcpy
import arcpywmx

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

#Create a Workflow Job of type Data Edits
job = conn.createJob(job_type_name="Data Edits")

#Create a Workflow Job of type 5
job2 = conn.createJob(job_type_id = 5)

The following script creates a job in the Workflow Manager database using the customized job type description. The customized job description provides the AOI, assigns the job to a user, assigns a data workspace to the job, assigns a parent using the ID, assigns a parent job version, adds a prefix to the job, and assigns a version for the job.

import arcpy
import arcpywmx

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

#Create a polygon geometry for LOI
coordList = [[-105.0, 39.0], [-100.0, 39.0], [-100.0, 35.0], [-105.0, 35.0]]
array = arcpy.Array([arcpy.Point(x, y) for x, y in coordList])
loi = arcpy.Polygon(array)

#Create a job type description with customized properties
desc = {'loi': loi, 'assigned_to':'amiller' , 'assigned_type': 'User', 'data_workspace_id':'{DB245005-0D1E-47B8-AE39-CC08530A6C9D}', 'job_type_name':'Quality Control', 'parent_job_id': 9999, 'parent_version_name': 'sde.Default', 'prefix':'QA_', 'version_name':'QA_QC'}

#Create a Workflow Job of type Data Edits
job = conn.createJob(job_type_description=desc)
getJob (jobID)
ParameterErläuterungDatentyp
jobID

The ID of the job to return.

Integer

Rückgabewert

DatentypErläuterung
Job

Returns the job as a Job.

Provides an easy way to retrieve a job.

Get a job from a Workflow Manager database.

import arcpy
import arcpywmx

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

#Access a Workflow Job
job = conn.getJob(99999)

Codebeispiel

The following script creates one job and gets another from a Workflow Manager database.

import arcpy
import arcpywmx

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

#Create a Workflow Job of type Data Edits
job = conn.createJob(job_type_name="Data Edits")

#Access a Workflow Job
job = conn.getJob(99999)

ArcGIS Desktop

  • Startseite
  • Dokumentation
  • Support

ArcGIS Plattform

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

Über Esri

  • Über uns
  • Karriere
  • Insider-Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Datenschutz | Rechtliches