Log in  \/ 
x
x
x
Register  \/ 
x

19
May
2015

Setting status of declined Service Requests to Rejected instead of Failed

Introduced in SCSM 2012, Service Request has lacked a Rejected status from the very beginning. If any Review Activity of a Service Request is declined, the Service Request gets a Failed status. It’s a very confusing behavior that also affects the reporting.

One of our customer wants to solve the situation but with a minimum impact on the system's performance. That means a Visual Studio project. And here I’m presenting the result.

The Rejected status has to be safe and I put it in the sealed management pack to avoid an accidental erase. A workflow setting a Service Request in the Rejected status is triggered when the Service Request gets the Failed status. It examines all Review Activities inside the Service Request and sets the Service Request’s status to Rejected if any internal Review Activity has been rejected.

RejectedSR
My first intension was to run the workflow when a Review Activity is set to the Rejected status but the default Service Manager workflow also uses this condition to set the Service Request’s status to Failed. So it was unpredictable which one would start the last and make the last change of the status.

In the attached archive, you can find a source code of the solution that could be used to add additional features like an action log's record for the status change, a support for Change Requests, etc.

To deploy the solution, copy SCUtils.SetServiceRequestToRejected.dll to the Service Manager installation folder (the default path is C:\Program Files\Microsoft System Center 2012\Service Manager or for SCSM R2 C:\Program Files\Microsoft System Center 2012 R2\Service Manager). Then import SCUtils.Rejected.ServiceRequest.mpb.

I also added in the solution a custom view, SCUtils.ServiceRequestView.Rejected.MP.xml, for Rejected Service Requests for those who are lazy enough but you can easily create your own view. Please excuse me, if you found that a name of the view has a wrong translation to your own language. Please advise me with the proper translation and we will make the world (the management pack actually) a bit better.

I hope that this small improvement will make your system based on Microsoft System Center 2012 Service Manager a bit more intuitive.

Download

Categories: System Center 2012 Service Manager

Marat Kuanyshev

Comments (19)

  • Martin

    Martin

    22 May 2015 at 16:55 |
    Perfect MP, but if SR are in Rejected state, we can not use Close task. Are SR with status Rejected automatically closed or is it a very small bug?

    Thanks

    reply

  • Marat Kuanyshev

    Marat Kuanyshev

    22 May 2015 at 17:02 |
    The default Close task has a filter for SR's statuses. It could be fixed. Give me couple of hours and I will try to post a remedy.

    reply

  • Marat Kuanyshev

    Marat Kuanyshev

    22 May 2015 at 22:25 |
    Martin, I managed to enable the Close task for rejected SRs but the task doesn't want to close rejected SRs. I will create a custom task that will resemble the default one but with a support for rejected SRs. Watch out blog.

    reply

    • Marat Kuanyshev

      Marat Kuanyshev

      23 May 2015 at 12:46 |
      The task's accomplished. Read http://bit.ly/1Hofbp7

      reply

      • nitramsk

        nitramsk

        23 May 2015 at 13:03 |
        Perfect, works like charm.

        reply

        • Marat Kuanyshev

          Marat Kuanyshev

          25 May 2015 at 13:00 |
          I've updated the solution for the custom Close task to hide the default tast in the SR form. Please download and use the updated version.

          reply

  • Mark

    Mark

    27 March 2017 at 23:13 |
    I'm trying to implement this (from latest version) but they are still going to closed status. I've imported the MP, XML saved the DLL to the correct location. is there anything else I need to be looking at?

    reply

    • Marat Kuanyshev

      Marat Kuanyshev

      27 March 2017 at 23:17 |
      Hi Mark,
      It might be a custom workflow that sets your SRs to Close status.

      reply

    • Marat Kuanyshev

      Marat Kuanyshev

      27 March 2017 at 23:22 |
      You might check the workflow status to see if there's something wrong.

      reply

      • Mark

        Mark

        27 March 2017 at 23:33 |
        Thanks for the reply! Should I be seeing a Workflow for this under the Workflows > Status section? Or should I see any reference to this MP anywhere else in the system. I have 2 Workflows on the Service Request side and they are just to send an email with survey once one is completed. (Criteria changed from Completed to = Completed) I have one workflow on Review Activity notice and this is to notify reviewers that a RA is ready (Criteria status In Progress to = In Progress).

        reply

        • Marat Kuanyshev

          Marat Kuanyshev

          28 March 2017 at 00:29 |
          Yes, pls check in Workflows -> Status the state of SetRejected workflow.

          reply

  • Mark

    Mark

    28 March 2017 at 02:20 |
    Ok, that must be the problem. That isn't listed. I'll try removing and re-importing the MPB. Thanks.

    reply

  • Mark

    Mark

    28 March 2017 at 02:42 |
    That is where the problem is. After a re-import, I'm still not getting that Workflow. I'm not sure what the reason is. Other MPs are importing successfully.

    reply

  • Mark

    Mark

    28 March 2017 at 04:14 |
    I got it. I didn't realize I needed both the MPB from this page and from the new one. I thought I just needed the updated one. My fault. Thanks for your help!

    reply

    • Marat Kuanyshev

      Marat Kuanyshev

      28 March 2017 at 08:19 |
      Excellent, Mark!

      reply

      • Mark

        Mark

        28 March 2017 at 21:04 |
        Should the rejected status SR stay within the Default "All Open Service Requests" view once it is in the "Rejected Service Requests" view?

        reply

        • Marat Kuanyshev

          Marat Kuanyshev

          28 March 2017 at 21:22 |
          The default 'All Open Service Requests' view is not aware of 'Rejected' status. If it's editable, you can adjust the conditions of that view.

          reply

  • Chris

    Chris

    17 August 2017 at 02:21 |
    Has this workflow been updated / tested with Service Manager 2016?

    reply

    • Marat Kuanyshev

      Marat Kuanyshev

      17 August 2017 at 09:33 |
      Not yet, but using the source code, you can easily rebuild the solution for SCSM 2016.

      reply

Leave a comment

You are commenting as guest.

This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.