LinkedProperty

Zusammenfassung

ArcPy class that provides access to the group of linked property rows associated with the job. It is comprised of 0 or more ExtendedProperty objects.

Auswertung

Linked properties store business-specific information as part of the job that is not covered by the default job properties. Linked properties have one-to-many (1-many) cardinality, and there are zero or more sets of properties associated with the job. To configure and use linked properties in your job types, you must create a new geodatabase table in the Workflow Manager (Classic) Repository. Then configure Workflow Manager (Classic) to recognize this table as an extension to the rest of the system tables.

Eigenschaften

EigenschaftErklärungDatentyp
alias
(Nur lesen)

The alias of the extended property or linked property table associated with the job.

String
cardinality
(Nur lesen)

The cardinality of the extended property or linked property table associated with the job.

String
jobID
(Nur lesen)

The ID of the job with which the extended property or linked property table is associated.

Integer
name
(Nur lesen)

The name of the extended property or linked property table associated with the job.

String

Methodenübersicht

MethodeErklärung
createRecord ()

Creates a new linked property record associated with the job, as an ExtendedProperty object.

deleteRecord (record)

Deletes one linked property record associated with the job.

Methoden

createRecord ()
Rückgabewert
DatentypErklärung
ExtendedProperty

The new linked property record associated with the job, as an ExtendedProperty object.

Linked property records are created after job creation as required. A job can have zero or more linked property records.

The following script creates a linked property record associated with the job and updates the value of cells.

import arcpy

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

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

#Get the linked properties table associated with the job
prop_table = job.getExtendedPropertyTable('wmx.linked_properties')

#Create new record in the linked property table
new_record = prop_table.createRecord()

#Update value of cells for the new record
new_record['parcel_number'].data=10001
new_record['requestor_name'].data='Fire Department'
new_record['request_date'].data=datetime.datetime(2015, 4, 30, 12, 30, 45)
job.save()
deleteRecord (record)
ParameterErklärungDatentyp
record

The linked property record as an ExtendedProperty object.

ExtendedProperty

Linked property records can be deleted as required.

The following script deletes a record from the linked property table.

import arcpy

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

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

#Get the linked properties table associated with the job
prop_table = job.getExtendedPropertyTable('wmx.linked_properties')

#Delete a linked property record
record = prop_table[0]
prop_table.deleteRecord(record)
job.save()

Codebeispiel

The following script gets a linked property table associated with the job and prints the name of all the linked property cells along with the column sorted by display order.

import arcpy

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

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

#Get the linked properties table associated with the job
prop_table = job.getExtendedPropertyTable('wmx.linked_properties')

#Iterate over linked properties and print name of all linked property cells with columns sorted by display order
for row in prop_table:
    for(name,value) in (sorted(row, key=lambda x: x[1].displayOrder)):
        print("{0} = {1}" .format(name,value.data))