Send a mail and cancel remaining activities when a RA is rejected.
A common challenge with SCSM is that a rejected Review Activity leaves all remaining activities on pending state and out of the box its rather difficult to send a mail to the requesting user, with a comment on why the request was rejected.
For that reason I have created a couple of runbooks to help with this scenario.
The setup for my customers are:
When a review activity is 'In Progress', the manager gets a mail with instructions to either reply to a mail or enter the Portal to accept or deny the request. Normally the managers preferre to use the mail, as that is easy and can be done remotely.
When the manager rejects the request, the RA and SR is changed to Failed and the remaining activities are left pending.
Instead I want it to look like this; After an RA is rejected the remaining activities are cancelled.
This is accomplished by the following runbook:
I normally configure the flow so when a user creates a Service Request that requires a manager approval, I have configured a workflow that sends a mail to the manager:
When to manager decides to Deny the request, via clicking the hyperlink in the mail, a new mail is opened and he/she can add a comment. (optionial)
Then by using the Exchange connector and the keywords, it is possible to get the Review activity updated accordingly.
So lets have a look at the runbooks:
The first Monitor Object, is looking for Review Activites that are changed to the status of Failed.
(Gennemsynsaktivitet = Review Activity), (Mislykket = Failed)
The next activities loads the reviewers and their comments and only forwards the reviewers that has added a comment. (This is usefull in the case of more than one reviewer). Since my customer is replying via mail (Exchange Connector) I assume there always is some content in the comments field of the rejection.
(Kommentarer = Comments)
I then load the related Service Request and call a sub-policy to cancel the remaining activities.
In order not to change the status of already completed activities, the load of both the MA and RA are filtered by status not being Completed.
(Fuldført = Complete)
I then load the requesting user from Service Request and only return the affected user to the the users mail address.
(Berørt Bruger = Affected User)
I then prepare to send a mail to the user, based on the manager input.
The mail is formatted like this:
Since I know the mail the manager has replied to has the following content:
Any additional comments regarding the request [Rejected]:
I use the Field manipulation to only include the text after the ‘:’ and send a mail like the following to the user:
I’ve attached the runbook for you to download and use.