Upload Attachment
Applies To: System Center 2012 - Orchestrator, System Center 2012 R2 Orchestrator, System Center 2012 SP1 - Orchestrator
The Upload Attachment activity is used to upload a file to an existing Service Manager object.
The following published data elements are specific to Upload Attachment. Additional published data is generated based on the Class that you select when you define the activity. For a list of the data elements published by each Class, see Service Manager Published Data.
Upload Attachment Published Data
Element | Description |
---|---|
Object GUID |
The unique identifier (GUID) of the single attachment to be updated |
Number of Objects |
The number of files successfully uploaded by Upload Attachment |
Note
Be aware that the procedure to attach file attachments is different than the procedure to attach knowledge articles.
Configuring the Upload Attachment Activity Workflow for File Attachments
The Upload Attachment activity is dependent on other activities for the data that it requires.
For file attachments, the following activities will usually precede the Upload Attachment activity in a workflow:
A parent record must exist. For example, you could use Create Change with Template or Get Object to get the Object Guid of a parent record where the attachment is to be uploaded.
Use Get File Status to get information about the file to be uploaded. This activity retrieves the data needed to attach the file to the Service Manager object.
Use Create Related Object to create a File Attachment related to the parent record. This activity creates the File Attachment object where the attachment is to be uploaded. There are several critical fields that must be correctly populated in order for the attachment to behave correctly in Service Manager
To configure the file attachment prerequisite activities for the Upload Attachment activity
Create (or query for) a parent record where the attachment is to be associated. For example, from the Activities pane, drag a Create Change with Template activity to the active runbook.
Double-click the Create Change with Template activity.
Configure the Create Change with Template activity to update the Service Manager object to which you want to attach a file. For more information aboutusing this activity, see Configuring the Create Change with Template Activity.
From the File Management section of the Activities pane, drag a Get File Status activity to the active runbook.
Link the Create Change with Template activity to the Get File Status activity so that you can use data published by the Create Change with Template activity later in the workflow.
Double-click the Get File Status activity. On the Details tab, click the ellipsis button (...), and then select the file(s) that you want to attach to the Service Manager object. Define the File age filters, and then click Finish.
From the Activities pane, drag a Create Related Object activity to the active runbook.
Link the Create Related Object activity to the Get File Status activity so that you can use data published by the Get File Status activity later in the workflow.
Double-click the Create Related Object activity.
On the Details tab, in the Properties section, click the ellipsis button (...), and then select the Connection to the same Service Manager computer that you used for the previous activities in the workflow.
Click the Source Class ellipsis button (...), and then select Change Request.
Click the Target Class ellipsis button (...), and then select File Attachment.
Click the Relationship Type ellipsis button (...), and then select Has File Attachment.
Right-click the Source Object Guid field, point to Subscribe, and then click Published data. Click Object Guid published data element from the Create Change with Template activity, and then click OK.
Click Select Optional Fields. Select all of the optional fields, and then click OK.
In the ID field, subscribe to the Object GUID of the parent incident/change record published data from the Create Change with Template activity.
In the Size field, subscribe to the File Size (bytes) published data from the Get File activity.
In the Display Name field, subscribe to the File Name published data from the Get File activity. Do not specify a file path.
In the Description field, type a description of the attachment.
In the Added Date field, subscribe to the current and time. One way to do this is to subscribe to the Object Start Time published data from the Get File Status activity.
In the Extension field, enter a period ( . ) followed by the file name extension of the attachment to be added to the Service Manager object. For example, .txt. Alternatively, you can subscribe to the File Extension published data from the Get File Status activity. The File Extension published data element does not include the period so you will need to enter it manually prior to the published data link.
The published data for each activity depends on the class that was selected when the object was created. For a list of the data elements published by each class, see Service Manager Published Data. For information about the Common Published Data items, see Published Data in the System Center Orchestrator 2012 Runbook Guide.
From the Activities pane, drag an Upload Attachment activity to the active runbook.
Double-click the Upload Attachment activity.
Link the Upload Attachment activity to the Create Related Object activity.
Right-click the Object Guid field, point to Subscribe, and then click Published data. Click the Object Guid published data element from the Create Related Object activity, and then click OK.
In the Content field browse to find the file to upload as an attachment.
For information about the settings on the General and Run Behavior tabs for each activity, see Common Configuration Instructions for all Activities.
Click Finish.
Configuring the Upload Attachment Activity Workflow for Knowledge Articles
The Upload Attachment activity is dependent on other activities for the data that it requires. For knowledge articles, the following activities usually precede the Upload Attachment activity in a workflow:
A parent record must exist. For example, you could use Create Change with Template or Get Object to get an Object Guid of a parent record where the article is to be uploaded.
Use Get File Status to get information about the knowledge article to be uploaded. This activity retrieves the data needed to attach the knowledge article to the Service Manager object.
Use Create Object to create a knowledge article. This activity creates the knowledge article object where the article is to be uploaded.
To configure the knowledge article prerequisite activities for the Upload Attachment activity
Create (or query for) a parent record where the attachment is to be associated. For example, from the Activities pane, drag a Create Change with Template activity to the active runbook.
Double-click the Create Change with Template activity.
Configure the Create Change with Template activity to update the Service Manager object to which you want to attach a file. For information about using this activity, see Configuring the Create Change with Template Activity.
From the File Management section of the Activities pane, drag a Get File Status activity to the active runbook.
Link the Create Change with Template activity to the Get File Status activity, so that you can use data published by the Create Change with Template activity later in the workflow.
Double-click the Get File Status activity. On the Details tab, click the ellipsis button (...) and select the file or files that you want to attach to the Service Manager activity. Define the File age filters, and then click Finish.
From the Activities pane, drag a Create Object activity to the active runbook.
Link the Create Object activity to the Get File Status activity so that you can use data published by the Get File Status activity later in the workflow.
Double-click the Create Object activity.
On the Details tab, in the Properties section, click the ellipsis button (...), and then select the Connection to the same Service Manager computer that you used for the previous activities in the workflow.
Click Select optional fields and add fields that apply to the knowledge article.
From the Activities pane, drag a Create Relationship activity to the active policy.
In the Source Class field, click the source class of the parent object created in step 1 (in this example click Change Request).
In the Target Class field, click Knowledge Article.
In the Relationship Type field, click Links to Knowledge Article.
In the Source Object Guid field, click the object Guid from the source class of the parent object that you created in step 1 (in this example, click Change Request).
In the Target Object Guid field, click the object Guid from the knowledge article created by the Create Object in step 10.
In the Content field browse to find the knowledge article to upload as an attachment.
For information about the settings on the General and Run Behavior tabs for each activity, see Common Configuration Instructions for all Activities.
To configure the Upload Attachment activity
From the Activities pane, drag an Upload Attachment activity to the active policy.
Link the Upload Attachment activity to the Create File Attachment activity so that you can use data published by the previous activities in the workflow.
On the Details tab, in the Properties section, click the ellipsis button (...), and then select the Connection to the same Service Manager computer that you used for the previous activities in the workflow.
Click the Class ellipsis button (...), and then select File Attachment or Knowledge Article to indicate the upload type.
Right-click the Object Guid field, and then subscribe to the Target Object Guid published data element from the Create File Attachment activity.
In the Fields section, right-click the Content field, and then subscribe to the Object Guid published data element from the Create File Attachment activity.
For information about the settings on the General and Run Behavior tabs for each activity, see Common Configuration Instructions for all Activities.
Click Finish.
Other Activities
The Integration Pack for System Center Service Manager contains the following additional activities: