Hold

Zusammenfassung

The Hold object provides access to the hold associated with the job.

Auswertung

Holds suspend the job activity for an indefinite amount of time until it is released. A hold can be applied to a job for the following reasons:

  • Insufficient funding
  • Technical problems
  • Missing data
  • Lack of resources
The information about a Hold is never deleted from the system and can be queried.

Eigenschaften

EigenschaftErklärungDatentyp
active
(Nur lesen)

Indicates whether the hold is currently active or has been released.

Boolean
comment
(Nur lesen)

The comment stored as a reason for adding the hold.

String
holdDate
(Nur lesen)

The date and time when the hold was added to the job.

DateTime
ID
(Nur lesen)

The ID of the hold associated with the job.

Integer
releaseDate
(Nur lesen)

The date and time when the hold was released.

DateTime
releaseBy
(Nur lesen)

The user name of the user who released the hold.

String
type
(Nur lesen)

The name of the HoldType template used to create the job hold.

String
typeID
(Nur lesen)

The ID of the HoldType template used to create the job hold.

Integer

Codebeispiel

Hold example

The following script gets the hold types in the Workflow Manager (Classic) database and adds a budget hold to a job.

import arcpy

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

#Get a list of Hold types in Workflow database
hold_types = conn.config.getHoldTypes()

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

#Find the id of Budget Hold hold type and add a hold on the job
for hold in hold_types:
     if(hold.name=='Budget Hold'):
         job.addHold(hold.id,comment="Insufficient funds for digitization.")