A simple approach can be found in the following, and a good place to get started. What we want to do is simply get the Service Request with a specific ID. If none is found we wish to log the event.
Get SR will return sucess even if no objects was found with the given GUID. The link criteria logic is a double negative, for which I apologize. These are normally not easy to comprehend. |
If no objects are found we log an event. |
Let's try and run it. In my experience the Runbook Tester will not log events, and just clicking run will not work for some reason (if someone knows please tell me in the comments). Instead create yet another runbook as below.
An event in your log should appear after running this runbook, and look something like this:
That was easy! But what if the Get SR activity failed? And as you may have noticed, the runbook completed with success although we defined no Service Request found as a failure. In part 2 (posted soon) I will address these issues.
Ingen kommentarer:
Send en kommentar
Bemærk! Kun medlemmer af denne blog kan sende kommentarer.