The Opalis 6.3 Integration Pack for Microsoft System Center Service Manager provides a mechanism for uploading attachments into Service Manager. The workflow activity “Upload Attachment” has been designed to support uploading different types of content into Service Manager. An attachment could be a File Attachment to an Incident or Change. It could also be a Knowledge Article (end user or analyst content). This activity can be a little tricky to use since. Service Manager treats this content somewhat differently based on the type of content. File Attachments (such as would be associated with Incidents and Changes) is dealt with somewhat differently than for Knowledge Articles. We’ll cover both in this blog post.
…by the way, you can review this content in the help documents installed with the product (click the “Help” button when you are authoring “Upload Attachment”) or by visiting Technet @ http://technet.microsoft.com/en-us/library/gg440728.aspx. I hope to provide some more concrete examples in this post to make working with attachments easier for workflow authors.C
Creation of a file attachment is a two-step process. First, one must create a File Attachment object that is connected to the parent record (the Incident, Change, etc). Then one must upload the content into the File Attachment object. This sample will use a “Change” class object as a sample parent record, however this approach is valid for any class that can accept a File Attachment as a related object (such as an “Incident” or any custom class you create in the SM Authoring tool).
The basic workflow structure is show below:
The configuration of “Create File Attachment” needs to be reviewed. This is a “Create Related Object” that I renamed so it’s clear what I am doing. Again, this creates both a File Attachment object as well as a relationship to the parent object… in this example an object from the Change class. So the “Source Object GUID” is going to be the GUID of the parent Change object. Then we select “File Attachment” as the Target Class. Opalis filters out and presents the appropriate Relationship Types, in this case “Has File Attachment”.
A set of properties will need to be populated. The list will initially be blank (since none are mandatory, but in reality most are). Select “Selectio optional fields…” and select all the properties offered. These need to be populated with data needed by Service Manager so it’s client-side business logic can manipulate the attachment (i.e. you can open it up, see the file size, etc.). These will all be the same for a Change, Incident, as well as other classes since they are associated with the “File Attachment” object and not the parent record it’s related to.
I could use feedback on how well this all works as soon as you can provide it. It’s the last feature in the IP. Note there is no “Get Attachment” planned for this release. It didn’t make the cut. There wasn’t enough time for the testing. So you won’t see a “Get Attachment”, unfortunately.
The process is a little different for Knowledge Articles. The process is a little different because Knowledge Articles are not created with “Create Related Object” as is the case with File Attachments. The basic process for working with Knowledge Articles is similar, however. Again, here is a sample workflow that outlines the process one would use.
The “Create Relationship” configuration is detailed below. Notice in the screen capture how the source class is “Change Request” and the “Target Class” is “Knowledge Article”. Then we select the pre-filtered Relationship type of “Links to Knowledge Article”. The remainder is supplying the Object GUIDS of the parent (source) and child (target) objects… in this case the Change Request and Knowledge Article respectively.
What GUID are you passing into the Upload Attachment task? I'm passing in the GUID from the Create Relationship task and its saying cannot find an object with that guid.