Skip To Content

Connect

Summary

Establishes a connection to a Workflow Manager database.

Discussion

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

Syntax

Connect ({jtc_path})
ParameterExplanationData Type
jtc_path

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

String
Return Value
Data TypeExplanation
WorkflowConnection

Returns the Workflow Manager connection as a WorkflowConnection.

Code sample

The following script creates a connection to a Workflow Manager 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 database defined in the Project.

import arcpy

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