Connect

Synthèse

Establishes a connection to a Workflow Manager (Classic) database.

Discussion

To begin using ArcPy for Workflow Manager (Classic), a connection to a Workflow Manager (Classic) database must be created. This can be done through Connect to a .jtc file stored on disk or to the Workflow Manager (Classic) connection in the Project if no .jtc file is specified.

Syntaxe

Connect ({jtc_path})
ParamètreExplicationType de données
jtc_path

The path to the Workflow Manager (Classic) .jtc connection file. If no file is specified, the current Workflow Manager (Classic) connection in the Project will be used.

String
Valeur renvoyée
Type de donnéesExplication
WorkflowConnection

Returns the Workflow Manager (Classic) connection as a WorkflowConnection.

Exemple de code

The following script creates a connection to a Workflow Manager (Classic) database using a .jtc file.

import arcpy

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

The following script creates a connection to the Workflow Manager (Classic) database defined in the Project.

import arcpy

#Establish a connection to a Workflow database
conn = arcpy.wmx.Connect()