Summary
The Configuration object provides access to the configuration elements in the Workflow Manager database.
Discussion
The Configuration object provides access to the configuration elements in the Workflow Manager database.
Method Overview
Method | Explanation |
getActivityTypes () | Returns all activity types in the Workflow Manager database as a list of ActivityType objects. |
getHoldTypes () | Returns all the hold types in the Workflow Manager database, as a list of HoldType objects. |
getJobTypeDescription ({job_type_id}, {job_type_name}) | Returns the job type properties that can be customized before creating a job, using either the job type id or job type name. |
getJobTypes () | Returns a list of all job types in the Workflow Manager database filtered by applied job filters. |
getMaps () | Returns a list of the names of maps in the Workflow Manager database. |
getNotificationTypes () | Returns a list of all the notification types in the Workflow Manager database. |
getPriorities () | Returns a list of priorities in the Workflow Manager database. |
getPrivileges ({username}) | Returns a list of privileges assigned to a user. If no argument is given, the privileges for the current user are returned. |
getStatusTypes () | Returns all status types in the Workflow Manager database as a list of StatusType objects. |
getUserGroups ({username}) | Returns a list of the name of user groups a user belongs to in the Workflow Manager database. If no argument is given, the user groups the current user belongs to are returned. |
getUsers () | Returns a list of user names of all the users in the Workflow Manager database. |
retrieveMap (map_name, destination_location) | Retrieves a map from the Workflow Manager database to a specified folder. |
storeMap (map_name, source_location, {storage_type}, {overwrite}) | Stores a map in the Workflow Manager database. Only .mxd can be stored in the Workflow Manager database. |
Methods
getActivityTypes ()
Return Value
Data Type | Explanation |
ActivityType | A list of activity types returned as a list of ActivityType objects. |
The activity types are templates for the activity logged in history during the life cycle of a job.
The following example returns the activity types in the database.
import arcpy
import arcpywmx
# Establish a connection to a Workflow database
conn = arcpywmx.Connect(r'c:\test\Workflow.jtc')
# Get the activity types in Workflow database
activityTypes = conn.config.getActivityTypes()
getHoldTypes ()
Return Value
Data Type | Explanation |
HoldType | The list of hold types returned as a list of HoldType objects. |
The hold types are a template for the holds used to suspend the job activity for an indefinite amount of time.
The following example returns a list of hold types in the Workflow Manager database.
import arcpy
import arcpywmx
# Establish a connection to a Workflow database
conn = arcpywmx.Connect(r'c:\test\Workflow.jtc')
# Get list of Hold types in Workflow database
holdTypes = conn.config.getHoldTypes()
getJobTypeDescription ({job_type_id}, {job_type_name})
Parameter | Explanation | Data Type |
job_type_id | The ID of the job type whose properties will be returned. | Integer |
job_type_name | The name of the job type whose properties will be returned. | String |
Return Value
Data Type | Explanation |
JobTypeDescription | The properties of the job type that can be customized and assigned to a new job being created, returned as the JobTypeDescription object. |
The job type description can be customized to set the job properties before its creation.
The following script gets the job type description using the job type id, job type name.
import arcpy
# Establish a connection to a Workflow database
conn = arcpywmx.Connect(r'c:\test\Workflow.jtc')
# Get the Job Type description of type Data Edits
desc = conn.config.getJobTypeDescription(job_type_name="Data Edits")
# Get the Job Type description of type 5
desc2 = conn.config.getJobTypeDescription(job_type_id=5)
The following script gets the job type description and updates two extended property table values prior to job creation.
# coding: utf-8
import arcpy<