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 established. This can be done through Connect to a .jtc file stored on disk or to the default Workflow Manager database if no .jtc is specified.
Syntax
Connect ({jtc_path})
Parameter | Explanation | Data Type |
jtc_path | The path to the Workflow Manager .jtc connection file. If no connection file is specified, the current default Workflow Manager database will be used. | String |
Return Value
Data Type | Explanation |
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
import arcpywmx
#Establish a connection to a Workflow database
conn = arcpywmx.Connect(r'c:\test\Workflow.jtc')
The following script creates a connection to the current default Workflow Manager database.
import arcpy
import arcpywmx
#Establish a connection to a Workflow database
conn = arcpywmx.Connect()