locked
Help with a Relationship Subscription RRS feed

  • Question

  • I partially asked this question in a previos post: http://social.technet.microsoft.com/Forums/en-US/administration/thread/19036e46-c202-4bfa-aaad-2287fdd325d5

    I need it know if the Assigned To user is populated or not.  Im not sure what I am doing wrong or even really what I am looking for...?  Any advice please?

    I have been working on the XML and heres where Im at:

      <Monitoring>
        <Rules>
          <Rule ID="NotificationSubscription_7e3d5afc_3a20_4959_a62b_cabe0af0d896" Enabled="true" Target="SystemCenter!Microsoft.SystemCenter.SubscriptionWorkflowTarget" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>System</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="SystemCenter1!Microsoft.SystemCenter.CmdbInstanceSubscription.DataSourceModule">
                <Subscription>
                  <InstanceSubscription Type="a604b942-4c7b-2fb2-28dc-61dc6f465c68">
                    <UpdateInstance />
                  </InstanceSubscription>
                  <PollingIntervalInSeconds>60</PollingIntervalInSeconds>
                  <BatchSize>100</BatchSize>
                  <RelationshipSubscription RelType="$MPElement[Name='WorkItem!System.WorkItem.HasAssignedToUser']$" SourceType="$MPElement[Name='WorkItem!System.WorkItem.Incident']$" TargetType="$MPElement[Name='WorkItem!System.WorkItem.IncidentTierQueue']$">
                    <AddRelationship />
                  </RelationshipSubscription>
                </Subscription>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WA" TypeID="SystemCenter1!Microsoft.EnterpriseManagement.SystemCenter.Subscription.WindowsWorkflowTaskWriteAction">
                <Subscription>
                  <VisibleWorkflowStatusUi>true</VisibleWorkflowStatusUi>
                  <EnableBatchProcessing>true</EnableBatchProcessing>
                  <WindowsWorkflowConfiguration>
                    <AssemblyName>Microsoft.EnterpriseManagement.Notifications.Workflows</AssemblyName>
                    <WorkflowTypeName>Microsoft.EnterpriseManagement.Notifications.Workflows.SendNotificationsActivity</WorkflowTypeName>
                    <WorkflowParameters>
                      <WorkflowParameter Name="SubscriptionId" Type="guid">$MPElement$</WorkflowParameter>
                      <WorkflowArrayParameter Name="DataItems" Type="string">
                        <Item>$Data/.$</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="InstanceIds" Type="string">
                        <Item>$Data/BaseManagedEntityId$</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="TemplateIds" Type="string">
                        <Item>63ce1f7d-c134-2018-d7b2-dcffbeb368ed</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="PrimaryUserList" Type="string">
                        <Item>31292f93-cd7c-6c0d-0c6c-d170f0099417</Item>
                      </WorkflowArrayParameter>
                    </WorkflowParameters>
                    <RetryExceptions />
                    <RetryDelaySeconds>60</RetryDelaySeconds>
                    <MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
                  </WindowsWorkflowConfiguration>
                </Subscription>
              </WriteAction>
            </WriteActions>
          </Rule>
        </Rules>
      </Monitoring>


    - Get on the floor, do that dinosaur

    Wednesday, June 27, 2012 4:18 PM

All replies

  • Hi there,,

    This may be somewhat what you are looking for:

    http://scsmsource.blogspot.se/2011/04/work-item-assignmentreassignment.html

    This will notify when the field is changed.

    Not knowing what you are looking for, it may actually be that you want a view, to show you all the unassigned Incidents. tould be accomplished by using a criteria like Assigned to = empty.

    Does it make sense?

    Cheers

    Lasse

    Thursday, June 28, 2012 6:23 AM
  • Thanks, what i am actually looking for is workitem modification notifications.  If no assigned to user, than notififcain goes to Support group.  If work item has assigned to user than notififcation goes to assigned to user. 

    The support group being the Incident Tier Queue. 


    - Get on the floor, do that dinosaur

    Thursday, June 28, 2012 2:00 PM
  • Hi again,

    Ok, here is what I would do:

    1) Import the MP i linked to, that should take care of notifying the assigned to user

    2) Create a subscription when Incident is Created. Use the Cirteria "Support = Networking" or whatever group is relevante --> Send notification to the members of the Networking group (or use an AD group with their members, and make sure the AD group is email enabled)

    3) Create a subscription when Incident is Updated. Use the criteria From Support group not equal to Networking, To Support group equal networking. Then send notification to the above mentioned group of people.

    You will run into scenarios, where someone assigns the incident to networking and to a person at the same time. This will give the group a mail and the specific person also. Thats the only downside of this solution, but most people seem to handle this ok :-)

    Will this work?

    Cheers

    Lasse

    Thursday, June 28, 2012 2:20 PM
  • "This will give the group a mail and the specific person also"

    Thanks, but thats what I am trying to avoid.  The assigned to user will be a group member, so I would like to avoid duplicate emails. 


    - Get on the floor, do that dinosaur

    Thursday, June 28, 2012 4:24 PM