none
Addressing multiple affected CI in a runbook RRS feed

  • Question

  • I mentioned this one in a previous, related thread but I thought I'd post it as a separate question:

    Is it possible to address two different affected CIs in a runbook activity that get added in the portal from query results?  In my case I want to ask the portal user for a person they would like the outgoing users mail to be forwarded to.  I can easily pull a single affected CI (in this case the user being disabled) from the ticket in my runbook activity.  But how do I pull a second, different one (the user whose mailbox I want the outgoing user's mail forward to?

    I'm using Travis Wrights example here to build my runbook, etc, only subbing a user for a group.  But he's only adding one query result as an affected CI and using it in his runbook.  I'd like to also use a second user added as an affected CI but I don't see any way of distinguishing between the two affected CIs and getting them into the runbook.

     A solution would be to extend/inherit the Service Request class with a new field and make the new  field input a query result.  Map it all though the portal to the runbook and pass the variable into a script.  But it would be nice if you could do it without having to extend/inherit the Service Request class.

    Wednesday, May 16, 2012 5:40 PM

Answers

  • So your service request has two user objects related to it as "affected configuration items" or something. How can we distinguish between them over in Orchestrator? (Heck, how can you distinguish them in Service Manager? :) )

    You're right..the dinstinction, at the relationship level, is essentially lost. The distinction still exists elsewhere (specifically in the UserInput field of the Service Request). But that's difficult to utilize (you'd have to parse xml inside orchestrator..that might be a little cumbersome).

    One possible solution: Create a new relationship type between the service request class and the user class. Then, using the technique Patrik shared (http://blogs.litware.se/?p=1300 ) add your new relationship as a target in the question's configuration. What does this do for you? It distinguishes the two users by how they are related to the service request. Question 1 is configured to relate a user through Relationship.XYZ and question 2 is configured to relate a user through Relationship.ABC, you can use orchestrator to pull a related object by relationship type.

    I'm not clear what you meant when you said "make the new field input a query result".

    • Marked as answer by JayScovill Tuesday, June 12, 2012 6:58 PM
    Wednesday, May 16, 2012 7:18 PM

All replies

  • So your service request has two user objects related to it as "affected configuration items" or something. How can we distinguish between them over in Orchestrator? (Heck, how can you distinguish them in Service Manager? :) )

    You're right..the dinstinction, at the relationship level, is essentially lost. The distinction still exists elsewhere (specifically in the UserInput field of the Service Request). But that's difficult to utilize (you'd have to parse xml inside orchestrator..that might be a little cumbersome).

    One possible solution: Create a new relationship type between the service request class and the user class. Then, using the technique Patrik shared (http://blogs.litware.se/?p=1300 ) add your new relationship as a target in the question's configuration. What does this do for you? It distinguishes the two users by how they are related to the service request. Question 1 is configured to relate a user through Relationship.XYZ and question 2 is configured to relate a user through Relationship.ABC, you can use orchestrator to pull a related object by relationship type.

    I'm not clear what you meant when you said "make the new field input a query result".

    • Marked as answer by JayScovill Tuesday, June 12, 2012 6:58 PM
    Wednesday, May 16, 2012 7:18 PM
  • Ok, I actually read Patrik's article about that and I figured it would have something to do with what I'm trying to accomplish.  Now I just have to figure out exactly what his article means and apply it :P

    What I was referring to was inheriting a new Service Request class for this specific request type and adding a new field using the user picker data type to populate a field in the form with the user whom I want to forward email to.  Like what I did for my previous solution for requesting new employee account.  That way I would have an actual field in the form I can map to through the portal and Orchestrator. 

    But I'm really trying to avoid making another change to the Service Request class, forms, etc as it just makes things more complicated.  So if I can make sense of Patrik's article that may be the simpler route!

    Thanks!

    Wednesday, May 16, 2012 7:46 PM
  • One other approach I was thinking about was maybe adding the second user to the Service Request template as an affected CI.  That way I should be able to pull the GUID and object in the runbook from the Service Request class (instead of the Runbook Activity class which is how Travis added the affected CI in his example).

    This still only lets me add one affected CI to work on for to each class so it may not be the best long term solution assuming it'll work at all. 

    • Edited by JayScovill Wednesday, May 16, 2012 7:56 PM
    Wednesday, May 16, 2012 7:55 PM
  • Well I've been delving into the article by Patrik and I'm having a hard time figuring out how to apply his example to my scenario.

    Unfortunately my plan of attack adding the affected CI to the service request template instead of the runbook activity didn't work so I'm back trying to do this through come kind of custom relationship/query.

    Tuesday, May 22, 2012 3:10 PM
  • Hey Aaron,

    Any pointers for me on how I would go about actually creating these relationships?  I've investigating doing it through the Authoring Tool but I'm not exactly sure the steps involved.  Also took a look at the New-SCSMRelationshipObject smlet but that one's a little confusing as well.

    Tuesday, May 29, 2012 4:01 PM
  • Sure thing :)

    Just to be clear on the distinction, there are relationships, and there are relationship instances (just like classes and class instances). So, New-SCSMRelationshipObject is unecessary. (It's used to create a relationship instance between two cmdb class instances using an existing relationship)

    For your mail request offering, you probably already have a custom service request class? (I'll assume you do)

    In the authoring tool, add two new relationships to it. Pick a name for each..like "Forwarder" and "Receiver"..(I'm not great at coming up with names ;) ). In their "Details" pane, you'll find "Target Class". You'll want to select your user class (Probably System.Domain.User).

    These relationship definitions now allow an instance of your custom service request class (the relationship source) and an instance of a system.domain.user (the relationship target) to be related. You'll use those new relationships with Patrik's technique.

    Tuesday, May 29, 2012 4:43 PM
  • Ok, I thought that as maybe how you did it.  Nice to know I was on the right track.

    I've done all that but I don't see my user objects get added to the service request with my custom relationships (in the service request history).

    Step-by-step, this is what I did.

    1. Created a new MP and inherited from the System Work Item Service Request Library class with a new class, DisableEmployeeServiceRequest

    2. Created two new reference relationships in this new inheritied class, DisableUser and ForwardToUser and set their targets class as 'Active Directory User'

    3. Imported the MP

    4. Created new service request and runbook templates for the service request and saved them in the MP

    5. Created a Request Offering for the service request mapping the prompts to query results and set them to add the results as affected CIs to the service request

    6. Looked up the relationship IDs of the to new relationships I created using Get-SCSMRelationshipClass

    7. Exported the MP, added the two relationships to my MP as described in Patriks article, incremented the MP version and re-impported

    I just re-exported the MP and noticed that the custom relationships I added are now missing so now I'm wondering if I did something wrong and the changes aren't sticking when I import it.

    Edit: OK, odd. I just made the changes again and reimported and then exported and they were still there so they seem to be staying this time.

    However, when I sumbit a service request the portal spazes with some error so definitely didn't do something right:


    • Edited by JayScovill Tuesday, May 29, 2012 7:00 PM
    Tuesday, May 29, 2012 6:43 PM
  • Here's a cap of what my relationships look like:

    And the Request Offerings section of the MP where I've added them (in bold/underline/italics)

    <RequestOffering ID="Offering11229d45673c4e5d89ae281587a45e9a" InstanceName="Disable Employee" Title="Disable Employee" PublishDate="2012-05-29T18:11:30-04:00" Status="System.Offering.StatusEnum.Published" TargetTemplate="Template.05bb670411784bf1866956c23c171a58" HideGotoRequestButton="false">
          <PresentationMappingTemplate>
            <Sources>
              <Source Id="00000000-0000-0000-0000-000000000000" Ordinal="0" ReadOnly="false" Optional="false" ControlType="System.SupportingItem.PortalControl">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="Token: Portal User Name" OutputType="string" />
                  </AddressableOutputs>
                </ControlConfiguration>
                <Targets />
              </Source>
              <Source Id="e36ad2e1-d252-489a-80d7-0f8298350dda" Ordinal="1" Prompt="Please select a user to disable:" ReadOnly="false" Optional="false" ControlType="System.SupportingItem.PortalControl.InstancePicker">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="DisplayName" OutputType="string" />
                  </AddressableOutputs>
                  <Configuration>
                    <Details IsMultiSelectAllowed="false" HideDetailsView="true">
                      <ClassOrProjection Id="10a7f898-e672-ccf3-8881-360bfb6a8f9a" IsProjection="false" />
                      <ViewModelSettings>&lt;SettingsBundle&gt;&lt;ColumnSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/ColumnSettings&gt;&lt;CriteriaSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/CriteriaSettings&gt;&lt;/SettingsBundle&gt;</ViewModelSettings>
                      <Columns>
                        <Column Name="DisplayName" Type="string" DisplayName="Display Name" />
                      </Columns>
                      <Criteria />
                      <RelationshipConfiguration AddSelectedItemsAsRelatedItems="true" RelatedItemRelationshipPath="" AddSelectedItemsAsAffectedConfigItems="true" AffectedItemRelationshipPath="" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                    </Details>
                  </Configuration>
                </ControlConfiguration>
                <Targets>
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="B73A6094-C64C-B0FF-9706-1822DF5C2E82" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="26ca1f65-f5e8-7ded-5778-ec2544632ea2" />
                </Targets>
              </Source>
              <Source Id="bf5c2013-1e26-472f-985e-41b54a542cf4" Ordinal="2" Prompt="Do you want to forward mail to another user?" ReadOnly="false" Optional="true" ControlType="System.SupportingItem.PortalControl.Boolean">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="True / False" OutputType="bool" />
                  </AddressableOutputs>
                </ControlConfiguration>
                <Targets>
                  <Target Path="Description" OutputName="True / False" />
                </Targets>
              </Source>
              <Source Id="1f7dd85a-f4f2-42f8-be40-8a9fd7af8213" Ordinal="3" Prompt="Please select a user to forward mail to:" ReadOnly="false" Optional="true" ControlType="System.SupportingItem.PortalControl.InstancePicker">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="DisplayName" OutputType="string" />
                  </AddressableOutputs>
                  <Configuration>
                    <Details IsMultiSelectAllowed="false" HideDetailsView="true">
                      <ClassOrProjection Id="10a7f898-e672-ccf3-8881-360bfb6a8f9a" IsProjection="false" />
                      <ViewModelSettings>&lt;SettingsBundle&gt;&lt;ColumnSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/ColumnSettings&gt;&lt;CriteriaSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/CriteriaSettings&gt;&lt;/SettingsBundle&gt;</ViewModelSettings>
                      <Columns>
                        <Column Name="DisplayName" Type="string" DisplayName="Display Name" />
                      </Columns>
                      <Criteria />
                      <RelationshipConfiguration AddSelectedItemsAsRelatedItems="true" RelatedItemRelationshipPath="" AddSelectedItemsAsAffectedConfigItems="true" AffectedItemRelationshipPath="" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                    </Details>
                  </Configuration>
                </ControlConfiguration>
                <Targets>
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="B73A6094-C64C-B0FF-9706-1822DF5C2E82" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="5f502fb8-63f4-7132-5df5-6973bf3897ea" />
                </Targets>
              </Source>
            </Sources>
          </PresentationMappingTemplate>
        </RequestOffering>
      </Extensions>
    </ManagementPack>


    • Edited by JayScovill Tuesday, May 29, 2012 7:11 PM
    Tuesday, May 29, 2012 7:07 PM
  • Looks like you did everything right. Did you make any changes to the request offering in the console after you imported it? Using the console wizard to modify the request offering will probably wipe out any customizations you make to it outside of the console.

    I just tried this scenario and it worked ok. So, just a little debugging should clear this up.

    Can we see your class and relationship definitions? (From the MP)

    Heck, if you can, post the whole MP :)

    Tuesday, May 29, 2012 9:03 PM
  • The whole shebang.  This time I didn't make any changes after I imported it just to be sure that nothing got wiped out.

    <ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>CustomDisableEmployeeServiceRequest</ID>
          <Version>1.0.0.3</Version>
        </Identity>
        <Name>CustomDisableEmployeeServiceRequest</Name>
        <References>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>7.5.8501.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Console">
            <ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e">
            <ID>System.WorkItem.ServiceRequest.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Alias_0720214f_f214_41f9_91a0_5acfa8fc0716">
            <ID>Microsoft.Windows.Library</ID>
            <Version>7.5.8501.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CustomMicrosoft_SystemCenter_Orchestrator">
            <ID>Microsoft.SystemCenter.Orchestrator</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CustomSystem_WorkItem_Activity_Library">
            <ID>System.WorkItem.Activity.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CustomSystem_WorkItem_Library">
            <ID>System.WorkItem.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="RunbookActivity">
            <ID>ServiceManager.RunbookActivity.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="CustomServiceManager_ServiceRequest_Library">
            <ID>ServiceManager.ServiceRequest.Library</ID>
            <Version>7.5.1561.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="DisableEmployeeServiceRequest" Accessibility="Public" Abstract="false" Base="Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e!System.WorkItem.ServiceRequest" Hosted="false" Singleton="false" Extension="false" />
          </ClassTypes>
          <RelationshipTypes>
            <RelationshipType ID="DisableUser" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="Source_fc5c2b8d_3527_4e36_91b2_4a2cf52d4a04" MinCardinality="0" MaxCardinality="2147483647" Type="DisableEmployeeServiceRequest" />
              <Target ID="Target_a2b20aca_1f97_47b3_a1fc_cc128efad602" MinCardinality="0" MaxCardinality="1" Type="Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.User" />
            </RelationshipType>
            <RelationshipType ID="ForwardToUser" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="Source_20c35b6c_2983_42b9_81d3_4ebf96416699" MinCardinality="0" MaxCardinality="2147483647" Type="DisableEmployeeServiceRequest" />
              <Target ID="Target_605e4cb6_9b70_4171_bd04_87d08d81415a" MinCardinality="0" MaxCardinality="1" Type="Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.User" />
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinitions>
      <Categories>
        <Category ID="CustomDisableEmployeeServiceRequest.Category" Value="Console!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
          <ManagementPackName>CustomDisableEmployeeServiceRequest</ManagementPackName>
          <ManagementPackVersion>1.0.0.0</ManagementPackVersion>
        </Category>
      </Categories>
      <Templates>
        <ObjectTemplate ID="Template.8d393233280545cab5b7e71ade8be6a8" TypeID="RunbookActivity!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Projection">
          <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/RunbookId$">0715a04f-b4c3-4060-aa78-e534de898b17</Property>
          <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/TemplateId$">Template.8d393233280545cab5b7e71ade8be6a8</Property>
          <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/IsReadyForAutomation$">True</Property>
          <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/PropertyMapping$">&lt;?xml version="1.0" encoding="utf-16"?&gt;
    &lt;ParameterMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;ParameterList&gt;
        &lt;RunbookParameterItem&gt;
          &lt;Name&gt;ActivityID&lt;/Name&gt;
          &lt;Id&gt;c94a7f4b9c91429698d85c1f18b35188&lt;/Id&gt;
          &lt;Type&gt;String&lt;/Type&gt;
          &lt;Value&gt;Generic::Id&lt;/Value&gt;
          &lt;Direction&gt;In&lt;/Direction&gt;
          &lt;ContextInfo /&gt;
        &lt;/RunbookParameterItem&gt;
      &lt;/ParameterList&gt;
      &lt;RunbookId&gt;0715a04f-b4c3-4060-aa78-e534de898b17&lt;/RunbookId&gt;
    &lt;/ParameterMapping&gt;</Property>
          <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Skip$">False</Property>
          <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$">Disable Employee Runbook Activity</Property>
        </ObjectTemplate>
        <ObjectTemplate ID="Template.05bb670411784bf1866956c23c171a58" TypeID="CustomServiceManager_ServiceRequest_Library!System.WorkItem.ServiceRequestProjection">
          <Property Path="$Context/Property[Type='Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e!System.WorkItem.ServiceRequest']/Priority$">$MPElement[Name='CustomServiceManager_ServiceRequest_Library!ServiceRequestPriorityEnum.Low']$</Property>
          <Property Path="$Context/Property[Type='Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e!System.WorkItem.ServiceRequest']/Urgency$">$MPElement[Name='CustomServiceManager_ServiceRequest_Library!ServiceRequestUrgencyEnum.Low']$</Property>
          <Property Path="$Context/Property[Type='Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e!System.WorkItem.ServiceRequest']/Source$">$MPElement[Name='CustomServiceManager_ServiceRequest_Library!ServiceRequestSourceEnum.Portal']$</Property>
          <Property Path="$Context/Property[Type='Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e!System.WorkItem.ServiceRequest']/Area$">$MPElement[Name='CustomServiceManager_ServiceRequest_Library!ServiceRequestAreaEnum.Security.AccountManagement']$</Property>
          <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$">Disable Employee Service Request</Property>
          <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']$">
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/ApprovalCondition$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ApprovalEnum.Unanimous']$</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/ApprovalPercentage$">100</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/LineManagerShouldReview$">False</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity.ReviewActivity']/OwnersOfConfigItemShouldReview$">False</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/SequenceId$">0</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/ChildId$">577</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Stage$">8f76a43c-2ad0-acc8-6d71-789f2bd12762</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Skip$">False</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$">Disable Employee Service Request Review Activity</Property>
            <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.ReviewActivityHasReviewer' TypeConstraint='CustomSystem_WorkItem_Activity_Library!System.Reviewer']$">
              <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.Reviewer']/Decision$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!DecisionEnum.NotYetVoted']$</Property>
              <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.Reviewer']/Veto$">False</Property>
              <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.Reviewer']/MustVote$">False</Property>
              <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.ReviewerIsUser' TypeConstraint='Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.User']$">
                <Property Path="$Context/Property[Type='Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.UserBase']/DistinguishedName$">CN=Administrator,CN=Users,DC=wire,DC=pvt</Property>
                <Property Path="$Context/Property[Type='Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.UserBase']/ObjectGuid$">30ac1438-3606-6c4a-a93d-e8eb8d3be011</Property>
                <Property Path="$Context/Property[Type='Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.UserBase']/SID$">S-1-5-21-3705039954-1737674709-651852923-500</Property>
                <Property Path="$Context/Property[Type='Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.UserBase']/FQDN$">wire.pvt</Property>
                <Property Path="$Context/Property[Type='Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.UserBase']/UPN$">administrator@wire.pvt</Property>
                <Property Path="$Context/Property[Type='System!System.Domain.User']/Domain$">WIRE</Property>
                <Property Path="$Context/Property[Type='System!System.Domain.User']/UserName$">Administrator</Property>
                <Property Path="$Context/Property[Type='System!System.User']/FirstName$">Administrator</Property>
                <Property Path="$Context/Property[Type='System!System.ConfigItem']/ObjectStatus$">$MPElement[Name='System!System.ConfigItem.ObjectStatusEnum.Active']$</Property>
                <Property Path="$Context/Property[Type='System!System.Entity']/DisplayName$">Administrator</Property>
              </Object>
            </Object>
          </Object>
          <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity']$">
            <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/RunbookId$">0715a04f-b4c3-4060-aa78-e534de898b17</Property>
            <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/TemplateId$">Template.05bb670411784bf1866956c23c171a58</Property>
            <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/IsReadyForAutomation$">True</Property>
            <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/PropertyMapping$">&lt;?xml version="1.0" encoding="utf-16"?&gt;
    &lt;ParameterMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;ParameterList&gt;
        &lt;RunbookParameterItem&gt;
          &lt;Name&gt;ActivityID&lt;/Name&gt;
          &lt;Id&gt;c94a7f4b9c91429698d85c1f18b35188&lt;/Id&gt;
          &lt;Type&gt;String&lt;/Type&gt;
          &lt;Value&gt;Generic::Id&lt;/Value&gt;
          &lt;Direction&gt;In&lt;/Direction&gt;
          &lt;ContextInfo /&gt;
        &lt;/RunbookParameterItem&gt;
      &lt;/ParameterList&gt;
      &lt;RunbookId&gt;0715a04f-b4c3-4060-aa78-e534de898b17&lt;/RunbookId&gt;
    &lt;/ParameterMapping&gt;</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/SequenceId$">1</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/ChildId$">579</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Skip$">False</Property>
            <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$">Disable Employee Runbook Activity</Property>
          </Object>
        </ObjectTemplate>
      </Templates>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="CustomDisableEmployeeServiceRequest">
              <Name>Custom - Disable Employee Service Request</Name>
            </DisplayString>
            <DisplayString ElementID="DisableEmployeeServiceRequest">
              <Name>Custom - Disable Employee Service Request</Name>
              <Description>Creates two relationships to be used in the Disable Employee Service Request.</Description>
            </DisplayString>
            <DisplayString ElementID="ForwardToUser">
              <Name>Forward To User</Name>
            </DisplayString>
            <DisplayString ElementID="DisableUser">
              <Name>Disable User</Name>
            </DisplayString>
            <DisplayString ElementID="DisableUser" SubElementID="Source_fc5c2b8d_3527_4e36_91b2_4a2cf52d4a04">
              <Name>Source_fc5c2b8d_3527_4e36_91b2_4a2cf52d4a04</Name>
            </DisplayString>
            <DisplayString ElementID="DisableUser" SubElementID="Target_a2b20aca_1f97_47b3_a1fc_cc128efad602">
              <Name>Target_a2b20aca_1f97_47b3_a1fc_cc128efad602</Name>
            </DisplayString>
            <DisplayString ElementID="ForwardToUser" SubElementID="Source_20c35b6c_2983_42b9_81d3_4ebf96416699">
              <Name>Source_20c35b6c_2983_42b9_81d3_4ebf96416699</Name>
            </DisplayString>
            <DisplayString ElementID="ForwardToUser" SubElementID="Target_605e4cb6_9b70_4171_bd04_87d08d81415a">
              <Name>Target_605e4cb6_9b70_4171_bd04_87d08d81415a</Name>
            </DisplayString>
            <DisplayString ElementID="Template.8d393233280545cab5b7e71ade8be6a8">
              <Name>Custom - Disable Employee Runbook Activity Template</Name>
            </DisplayString>
            <DisplayString ElementID="Template.05bb670411784bf1866956c23c171a58">
              <Name>Custom - Disable Employee Service Request</Name>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
      <Extensions>
        <RequestOffering ID="Offering11229d45673c4e5d89ae281587a45e9a" InstanceName="Disable Employee" Title="Disable Employee" PublishDate="2012-05-29T18:11:30-04:00" Status="System.Offering.StatusEnum.Published" TargetTemplate="Template.05bb670411784bf1866956c23c171a58" HideGotoRequestButton="false">
          <PresentationMappingTemplate>
            <Sources>
              <Source Id="00000000-0000-0000-0000-000000000000" Ordinal="0" ReadOnly="false" Optional="false" ControlType="System.SupportingItem.PortalControl">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="Token: Portal User Name" OutputType="string" />
                  </AddressableOutputs>
                </ControlConfiguration>
                <Targets />
              </Source>
              <Source Id="e36ad2e1-d252-489a-80d7-0f8298350dda" Ordinal="1" Prompt="Please select a user to disable:" ReadOnly="false" Optional="false" ControlType="System.SupportingItem.PortalControl.InstancePicker">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="DisplayName" OutputType="string" />
                  </AddressableOutputs>
                  <Configuration>
                    <Details IsMultiSelectAllowed="false" HideDetailsView="true">
                      <ClassOrProjection Id="10a7f898-e672-ccf3-8881-360bfb6a8f9a" IsProjection="false" />
                      <ViewModelSettings>&lt;SettingsBundle&gt;&lt;ColumnSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/ColumnSettings&gt;&lt;CriteriaSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/CriteriaSettings&gt;&lt;/SettingsBundle&gt;</ViewModelSettings>
                      <Columns>
                        <Column Name="DisplayName" Type="string" DisplayName="Display Name" />
                      </Columns>
                      <Criteria />
                      <RelationshipConfiguration AddSelectedItemsAsRelatedItems="true" RelatedItemRelationshipPath="" AddSelectedItemsAsAffectedConfigItems="true" AffectedItemRelationshipPath="" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                    </Details>
                  </Configuration>
                </ControlConfiguration>
                <Targets>
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="B73A6094-C64C-B0FF-9706-1822DF5C2E82" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="26ca1f65-f5e8-7ded-5778-ec2544632ea2" />
                </Targets>
              </Source>
              <Source Id="bf5c2013-1e26-472f-985e-41b54a542cf4" Ordinal="2" Prompt="Do you want to forward mail to another user?" ReadOnly="false" Optional="true" ControlType="System.SupportingItem.PortalControl.Boolean">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="True / False" OutputType="bool" />
                  </AddressableOutputs>
                </ControlConfiguration>
                <Targets>
                  <Target Path="Description" OutputName="True / False" />
                </Targets>
              </Source>
              <Source Id="1f7dd85a-f4f2-42f8-be40-8a9fd7af8213" Ordinal="3" Prompt="Please select a user to forward mail to:" ReadOnly="false" Optional="true" ControlType="System.SupportingItem.PortalControl.InstancePicker">
                <ControlConfiguration>
                  <Dependencies />
                  <AddressableOutputs>
                    <AddressableOutput OutputName="DisplayName" OutputType="string" />
                  </AddressableOutputs>
                  <Configuration>
                    <Details IsMultiSelectAllowed="false" HideDetailsView="true">
                      <ClassOrProjection Id="10a7f898-e672-ccf3-8881-360bfb6a8f9a" IsProjection="false" />
                      <ViewModelSettings>&lt;SettingsBundle&gt;&lt;ColumnSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/ColumnSettings&gt;&lt;CriteriaSettings&gt;&amp;lt;ComponentTreeViewItemSettings&amp;gt;&amp;lt;Alias /&amp;gt;&amp;lt;BackgroundColor&amp;gt;&amp;lt;A&amp;gt;0&amp;lt;/A&amp;gt;&amp;lt;R&amp;gt;0&amp;lt;/R&amp;gt;&amp;lt;G&amp;gt;0&amp;lt;/G&amp;gt;&amp;lt;B&amp;gt;0&amp;lt;/B&amp;gt;&amp;lt;ScA&amp;gt;0&amp;lt;/ScA&amp;gt;&amp;lt;ScR&amp;gt;0&amp;lt;/ScR&amp;gt;&amp;lt;ScG&amp;gt;0&amp;lt;/ScG&amp;gt;&amp;lt;ScB&amp;gt;0&amp;lt;/ScB&amp;gt;&amp;lt;/BackgroundColor&amp;gt;&amp;lt;ComponentClassId&amp;gt;10a7f898-e672-ccf3-8881-360bfb6a8f9a&amp;lt;/ComponentClassId&amp;gt;&amp;lt;ChildSettings /&amp;gt;&amp;lt;/ComponentTreeViewItemSettings&amp;gt;&lt;/CriteriaSettings&gt;&lt;/SettingsBundle&gt;</ViewModelSettings>
                      <Columns>
                        <Column Name="DisplayName" Type="string" DisplayName="Display Name" />
                      </Columns>
                      <Criteria />
                      <RelationshipConfiguration AddSelectedItemsAsRelatedItems="true" RelatedItemRelationshipPath="" AddSelectedItemsAsAffectedConfigItems="true" AffectedItemRelationshipPath="" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                    </Details>
                  </Configuration>
                </ControlConfiguration>
                <Targets>
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="D96C8B59-8554-6E77-0AA7-F51448868B43" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="B73A6094-C64C-B0FF-9706-1822DF5C2E82" />
                  <Target Path="" OutputName="$InstanceValue$" RelationshipId="5f502fb8-63f4-7132-5df5-6973bf3897ea" />
                </Targets>
              </Source>
            </Sources>
          </PresentationMappingTemplate>
        </RequestOffering>
      </Extensions>
    </ManagementPack>

    Wednesday, May 30, 2012 12:52 PM
  • The error in the Silverlight log:

    The object could not be added to the combination class because the parent is not of the proper class as specified by the role.

    Wednesday, May 30, 2012 1:44 PM
  • I noticed in Patrik's example MP the definitions of the relationship were a bit different:

    <TypeDefinitions>
        <EntityTypes>
          <RelationshipTypes>
            <RelationshipType ID="CustomRelationShipSingle" Accessibility="Public" Abstract="false" Base="Alias_db2520df_13c7_492e_8e87_f11bed962bf3!System.Reference">
              <Source ID="Source_0c1d6909_f627_41ff_b6e1_78a847efae7f" MinCardinality="0" MaxCardinality="2147483647" Type="SRLib!System.WorkItem.ServiceRequest" />
              <Target ID="Target_ffd03869_cd6d_49cb_a6c6_c30c9962702c" MinCardinality="0" MaxCardinality="1" Type="Alias_db2520df_13c7_492e_8e87_f11bed962bf3!System.ConfigItem" />
            </RelationshipType>
            <RelationshipType ID="CustomRelationshipMultiple" Accessibility="Public" Abstract="false" Base="Alias_db2520df_13c7_492e_8e87_f11bed962bf3!System.Reference">
              <Source ID="Source_129b61df_e607_433c_9e25_5130cb3e0feb" MinCardinality="0" MaxCardinality="2147483647" Type="SRLib!System.WorkItem.ServiceRequest" />
              <Target ID="Target_b140a2b6_58fd_4076_95d6_6fbf8b04b0de" MinCardinality="0" MaxCardinality="2147483647" Type="Alias_db2520df_13c7_492e_8e87_f11bed962bf3!System.ConfigItem" />
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinitions>
      <Categories>

    Notice his Target ID Type is System.ConfigItem for both is custom relationships.  Mine are Microsoft.AD.User:

     <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="DisableEmployeeServiceRequest" Accessibility="Public" Abstract="false" Base="Alias_5ad616c4_ac62_41bf_a30a_e10eeb8ade4e!System.WorkItem.ServiceRequest" Hosted="false" Singleton="false" Extension="false" />
          </ClassTypes>
          <RelationshipTypes>
            <RelationshipType ID="DisableUser" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="Source_fc5c2b8d_3527_4e36_91b2_4a2cf52d4a04" MinCardinality="0" MaxCardinality="2147483647" Type="DisableEmployeeServiceRequest" />
              <Target ID="Target_a2b20aca_1f97_47b3_a1fc_cc128efad602" MinCardinality="0" MaxCardinality="1" Type="Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.User" />
            </RelationshipType>
            <RelationshipType ID="ForwardToUser" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="Source_20c35b6c_2983_42b9_81d3_4ebf96416699" MinCardinality="0" MaxCardinality="2147483647" Type="DisableEmployeeServiceRequest" />
              <Target ID="Target_605e4cb6_9b70_4171_bd04_87d08d81415a" MinCardinality="0" MaxCardinality="1" Type="Alias_0720214f_f214_41f9_91a0_5acfa8fc0716!Microsoft.AD.User" />
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinition

    So as a test I recreated my relationships using "Configuration Item" as the target.  Unfortunately it results in the same error.

    <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="CustomDisableEmployeeServiceRequestClass" Accessibility="Public" Abstract="false" Base="Alias_e410dd44_188c_4f29_8b94_d1880fd55ef9!System.WorkItem.ServiceRequest" Hosted="false" Singleton="false" Extension="false" />
          </ClassTypes>
          <RelationshipTypes>
            <RelationshipType ID="DisableUser" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="Source_47621d44_145f_490e_a162_682ee865ca80" MinCardinality="0" MaxCardinality="2147483647" Type="CustomDisableEmployeeServiceRequestClass" />
              <Target ID="Target_538d5cb6_4f68_4335_99a5_d989c886865c" MinCardinality="0" MaxCardinality="1" Type="System!System.ConfigItem" />
            </RelationshipType>
            <RelationshipType ID="ForwardToUser" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="Source_02b0daf0_3041_4a14_8775_8245e5891b60" MinCardinality="0" MaxCardinality="2147483647" Type="CustomDisableEmployeeServiceRequestClass" />
              <Target ID="Target_53c30cff_c64f_4ed0_aeb1_8a3e0edf1202" MinCardinality="0" MaxCardinality="1" Type="System!System.ConfigItem" />
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinitions>


    • Edited by JayScovill Wednesday, May 30, 2012 4:30 PM
    Wednesday, May 30, 2012 4:28 PM
  • OK! I've been mostly successful.  Finally!

    I had no luck inheriting from the SR class and creating my relationships.

    But I opened up Patrik's MP in the Authoring Tool and noticed that he didn't inherit or extend any classes.  The relationships simply appeared in the MP.  You have to extend or inherit a class to create a new relationship through the Authoring Tool (otherwise the Create Relationship button is greyed out).

    So what I ended up doing was copying Patrik's MP, removing all of the Request Offering elements and stripping it down to just the XML that creates the relationships.  I then changed all names, etc to reflect my environment, imported, re-created the request offerings, exported and added in my relationships for the queries.

    Bingo, my two users now get added to the service request using my custom relationships.

    One issue I am having now is that the average user gets an access denied when trying to submit a request using that offering.  This was in the past caused by the fact that I hadn't created Catalog Groups, included the offerings/catalog items in that group and assigned the group to a user role that the user was a member of.  However I've done that this time and it still throws an access denied trying submit a request (and only that request; I have another request under the same offering/Catalog Group and it works fine for the average user).  So I don't know if that is related to the custom relationships somehow or if there is something else going on.

    Now I just have to figure out that and fight with Orchestrator to pull those users out of the SR using the relationships I created.

    And I'd still like to know why I couldn't get it working by creating the relationships through the Authoring Tool.

    Again, thanks for all your help Aaron!


    • Edited by JayScovill Wednesday, May 30, 2012 7:41 PM
    Wednesday, May 30, 2012 7:38 PM
  • I just wanted to update this to say that I was able to create the custom relationships using a copy of the MP by Patrik.  I was also able to pull the configuration items in my runbook activity using those custom relationships.  I found everything I needed to do this in Travis's post here.

    I would still like to figure out why I was unable to submit a request using the relationships I created via the Authoring Tool, though.  That one is still nagging me

    And I still haven't figured out why a user who is a member of a catalog group that has access to the service and request offerings still gets an access denied (in the Silverlight log) when trying to submit a request using the offering.

    But hey, at least my runbook works! ;)

    Monday, June 4, 2012 2:06 PM
  • It's nagging me, too, since I didn't have any trouble when I tried it myself. I'm going to load your MP to see if I can reproduce that error..(as soon as I get a little of that "free time" that I hear other people talk about :) )
    Monday, June 4, 2012 4:53 PM
  • I was thinking about how to apply this to a scenario where you want to add a user to more than one group.  In the query results constraints you can enable or disable the ability to select multiple objects.  This option is pretty useless if you are going to add the objects as affected CIs since you can't distinguish between multiple CIs  without defining custom relationships.  And how can you define a custom relationship for every selection if you don't know know how many selections the user is gong to make?

    Wednesday, June 6, 2012 3:50 PM