Home Service Manager

Notification Trouble Ticket Analyst Comment

I create notification with class Trouble Ticket Analyst Comment. But I need have additional criteria sent notification only Parent workitem has field which a not null. Example I extended class service request field "category" and I want sent notification Trouble Ticket Analyst Comment when this field in parent workitem is not null it is possible? I add this criteria but notification not worked, in attachments is a screen maybe I'm doing something wrong?

Answers

  • Jeff_LangJeff_Lang Customer Ninja IT Monkey ✭✭✭✭

    try exporting the management pack, and finding the line that has the criteria on it and check it to see if it has a "seedrole="target"' on it.

  • Roman_NepomniashchiiRoman_Nepomniashchii Customer IT Monkey ✭
    edited February 2019
    Jeff_Lang said:

    try exporting the management pack, and finding the line that has the criteria on it and check it to see if it has a "seedrole="target"' on it.

    no, there is no such

    <Rule ID="NotificationSubscription_d3d68742_b2d7_4e86_93d9_e4a3301a0b55" 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="f14b70f4-878c-c0e1-b5c1-06ca22d05d40">
                    <AddInstance>
                      <Criteria>
                        <Expression>
                          <And>
                            <Expression>
                              <SimpleExpression>
                                <ValueExpression>
                                  <Property State="Post">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicket.AnalystCommentLog']/IsPrivate$</Property>
                                </ValueExpression>
                                <Operator>Equal</Operator>
                                <ValueExpression>
                                  <Value>False</Value>
                                </ValueExpression>
                              </SimpleExpression>
                            </Expression>
                            <Expression>
                              <UnaryExpression>
                                <ValueExpression>
                                  <Property State="Post">$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasParentWorkItem' TypeConstraint='CustomInfopulseServiceRequestExpansion!ClassExtension_f07ab478_e130_4b01_bd66_817252260419']/Property[Type='CustomInfopulseServiceRequestExpansion!ClassExtension_f07ab478_e130_4b01_bd66_817252260419']/Category$</Property>
                                </ValueExpression>
                                <Operator>IsNotNull</Operator>
                              </UnaryExpression>
                            </Expression>
                          </And>
                        </Expression>
                      </Criteria>
                    </AddInstance>
                  </InstanceSubscription>
                  <PollingIntervalInSeconds>60</PollingIntervalInSeconds>
                  <BatchSize>100</BatchSize>
                </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>3ec89284-ad78-ce1e-6041-93ef47f42f92</Item>
                      </WorkflowArrayParameter>
                      <WorkflowArrayParameter Name="PrimaryUserRelationships" Type="string">
                        <Item>$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='System!System.User']$</Item>
                      </WorkflowArrayParameter>
                    </WorkflowParameters>
                    <RetryExceptions />
                    <RetryDelaySeconds>60</RetryDelaySeconds>
                    <MaximumRunningTimeSeconds>7200</MaximumRunningTimeSeconds>
                  </WindowsWorkflowConfiguration>
                </Subscription>
              </WriteAction>
            </WriteActions>
          </Rule>

  • Roman_NepomniashchiiRoman_Nepomniashchii Customer IT Monkey ✭
    Jeff_Lang said:

    try exporting the management pack, and finding the line that has the criteria on it and check it to see if it has a "seedrole="target"' on it.

    Is only this
    <Item>$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAffectedUser' TypeConstraint='System!System.User']$</Item>

Sign In or Register to comment.