{"id":2273,"date":"2011-04-01T07:57:15","date_gmt":"2011-04-01T05:57:15","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=2273"},"modified":"2011-04-01T13:01:15","modified_gmt":"2011-04-01T11:01:15","slug":"identify-problems-with-opalis-and-service-manager","status":"publish","type":"post","link":"https:\/\/contoso.se\/blog\/?p=2273","title":{"rendered":"Identify problems with Opalis and Service Manager"},"content":{"rendered":"<p>I have created a Opalis workflow that checks number of active incidents related to a business service. If there are more the X (in my example 4) incidents active a problem work item will be generated. The problem work item will be assign to the problem managers Active Directory group.<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2276\" title=\"20110401_Opalis_Problem01\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem01-300x51.jpg\" alt=\"\" width=\"300\" height=\"51\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem01-300x51.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem01-1024x176.jpg 1024w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem01.jpg 1349w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The policy is divided into three parts. Part one will find the business service and active related incidents.<a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem021.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2280\" title=\"20110401_Opalis_Problem02\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem021-300x104.jpg\" alt=\"\" width=\"300\" height=\"104\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem021-300x104.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem021.jpg 387w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\u00c2\u00a0<\/p>\n<ol>\n<li><span>Starts at 6 am every day<\/span><\/li>\n<li><span>Deletes the temporary file if it exists. The link after &#8220;Delete temp file&#8221; is configure to continue even if the &#8220;Detete temp file&#8221; activity fail, becurse\u00c2\u00a0there is no file to delete.<\/span><\/li>\n<li><span>Gets the business service, in my example &#8220;Contoso &#8211; Extranet&#8221;<\/span><\/li>\n<li><span>Gets related incidents to the business service<\/span><\/li>\n<li><span>Gets the incident workitem for each incident that is in relationship with the business service<\/span><\/li>\n<li><span>If the incident status is equals active, the policy continue over the link, else nothing more will happen<\/span><\/li>\n<\/ol>\n<p>Part two will count number of active incidents and see if there are more incidents then the threshold. In my example the threshold is 4.<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem032.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2283\" title=\"20110401_Opalis_Problem03\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem032-300x102.jpg\" alt=\"\" width=\"300\" height=\"102\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem032-300x102.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem032.jpg 426w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ol>\n<li>\u00c2\u00a0If the status of the related incident in the first part of the policy is active, the GUID of the incident will be echo to a temporary file.<\/li>\n<li>The Junction activity is used to combine multiple threads to one. As multiple incidents can get back from &#8220;get related incidents&#8221; we need to make sure the rest of the policy is not ran in multiple threads, we use a junction activity for that.\u00c2\u00a0\u00c2\u00a0<\/li>\n<li>The combine activity is configure not to publish any data, that why we need to get the business service again. If we choose to publish data the policy\u00c2\u00a0might run multiple times and\u00c2\u00a0we dont want multiple problem work items.<\/li>\n<li>This activity count the number of lines in the temporary file<\/li>\n<li>\u00c2\u00a0Checks if number of lines in the file (number of active related incidents) are equal or more then the incident threshold<\/li>\n<li>If there are enough with related incidents the policy will move on<\/li>\n<\/ol>\n<p>Part three will create a problem and assign it to problem managers. It will also link the problem to the business service and all the incidents to the problem.<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem04.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2285\" title=\"20110401_Opalis_Problem04\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem04-300x216.jpg\" alt=\"\" width=\"300\" height=\"216\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem04-300x216.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem04.jpg 403w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ol>\n<li>Created a problem work item with some dynamic text depending on the settings in the rest of the policy<\/li>\n<li>Link the new problem work item to the business service<\/li>\n<li>Query Active Directory to get the Problem Managers (in my example) security group<\/li>\n<li>Writes a platform even with the problem work item ID<\/li>\n<li>Assign the problem work item to the Active Directory group found in &#8220;Get Problem Managers from AD&#8221; activity<\/li>\n<li>Reads each line in the temporary file. Each line is a GUID of a related and active incident<\/li>\n<li>Link each active and related incident from the temporary file to the problem work item<\/li>\n<\/ol>\n<p>The following two images show the problem work item created in Service Manager. Note that all incidents are related to the problem work item and that it is assign to problem managers.<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem05.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2289\" title=\"20110401_Opalis_Problem05\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem05-300x221.jpg\" alt=\"\" width=\"300\" height=\"221\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem05-300x221.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem05.jpg 443w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem06.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2290\" title=\"20110401_Opalis_Problem06\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem06-300x218.jpg\" alt=\"\" width=\"300\" height=\"218\" srcset=\"https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem06-300x218.jpg 300w, https:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/20110401_Opalis_Problem06.jpg 442w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>To save some data processing you could move the &#8220;Get Business Service GUID&#8221; activity to the other side of &#8220;Compare Values&#8221; activity. Then you could not contact Service Manager a second time if there was not enough with incidents. The &#8220;Get Business Service GUID&#8221; result is used in the &#8220;Link Problem to Service&#8221; activity.<\/p>\n<p>This export file have meet &#8220;<a title=\"Export of Policies\" href=\"http:\/\/contoso.se\/blog\/?p=2200\">mr Wolf<\/a>&#8221; so it should not contain any unnecessary settings or objects.<\/p>\n<p>You can download my policies here,\u00c2\u00a0<a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2011\/04\/21-Problem-Management-clean.zip\">21 Problem Management clean<\/a>, please note that this is provided \u00e2\u20ac\u0153as is\u00e2\u20ac\u009d with no warranties at all. Also please read <a href=\"http:\/\/contoso.se\/blog\/?p=2200\">this<\/a> blog post about export and import of policies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have created a Opalis workflow that checks number of active incidents related to a business service. If there are more the X (in my example 4) incidents active a problem work item will be generated. The problem work item will be assign to the problem managers Active Directory group. The policy is divided into &hellip; <a href=\"https:\/\/contoso.se\/blog\/?p=2273\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[58,25],"tags":[],"_links":{"self":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2273"}],"collection":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2273"}],"version-history":[{"count":10,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2273\/revisions"}],"predecessor-version":[{"id":2295,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2273\/revisions\/2295"}],"wp:attachment":[{"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}