Attachment

Zusammenfassung

The Attachment object provides access to the attachments associated with the job.

Auswertung

A document representing information related to the job can be associated with the job as an attachment. Examples of attachments include the following:

  • Word documents of instructions
  • Proposals for work
  • Scanned maps for digitizing
  • TIFFs to georeference
  • Web URL for the external help system

Eigenschaften

EigenschaftErklärungDatentyp
ID
(Nur lesen)

The ID of the job attachment.

Integer
name
(Nur lesen)

The visible name of the job attachment displayed in an application.

String
type
(Nur lesen)

The storage type of the attachment.

  • EMBEDDEDThe file is stored in the Workflow Manager (Classic) database.
  • LINKEDThe link to the file path is stored in the Workflow Manager (Classic) database.
  • URLThe URL link is stored in the database.
String

Codebeispiel

The following script creates a job and adds a linked file attachment. It also gets a list of all linked file attachments associated with the job.

import arcpy

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

#Create a Workflow Job of Data Edits job type
job = conn.createJob(job_type_name="Data Edits")

#Add a linked file attachment
job.addAttachment('LINKED',r'c:\test\Requirements.doc')

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

#Get the list attachments associated with the job
attachments = job1.getAttachments()

#Print the names of Linked file attachments associated with the job
for attach in attachments:
     if(attach.type=='Linked'):
         print(attach.name)