Freigeben über


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.

clip_image003

Instead I want it to look like this; After an RA is rejected the remaining activities are cancelled.

clip_image004

 This is accomplished by the following runbook:

clip_image006

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:

image

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)

clip_image001

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.

clip_image007

clip_image008

(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.

clip_image009

clip_image010

(Kommentarer = Comments)

I then load the related Service Request and call a sub-policy to cancel the remaining activities.

clip_image012

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.

clip_image013

(Fuldført = Complete)

I then load the requesting user from Service Request and only return the affected user to the the users mail address.

clip_image014

clip_image015

(Berørt Bruger = Affected User)

I then prepare to send a mail to the user, based on the manager input.

clip_image016

The mail is formatted like this:

clip_image017

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:

clip_image018

I’ve attached the runbook for you to download and use.

ReviewActivities.ois_export