Home Service Manager

Activities stuck in pending for manual activities

Matthew_BrooksMatthew_Brooks Customer IT Monkey ✭

Hi all,

I've had a look around a lot of sites to fix this but we are generating service requests either using orchestrator (then applying a template to that service request) or by creating a SR through the Cireson portal and whatever we do, we always end up having activities stuck in pending. I refuse to believe that I have to now create another orchestrator process that puts the task into in progress and we do not want to add review or Runbook activities into the mix… seems like it adds unnecessary clutter.

Essentially we have a very simple template that is applied that has 1 (only 1!) manual activity on the service request. Another request has multiple activities run one after another and another example we have is a SR with a PA and multiple MAs added to the PA. Whatever scenario we have I can’t seem to get the MA or PA to start automatically.

I found some PowerShell I used to force the activity into active state but I’m hoping there is an easier way or something obvious we are missing to get this done. We don’t want to add any manual steps for users to have to review another activity or run a script or anything to get this activity started.

$SR = (get-scsmobject (Get-SCSMClass -name system.workitem.servicerequest | ?{$_.DisplayName -eq "Service Request"}) -Filter "ID -eq SR1234")

$ma = Get-SCSMRelationshipObject -Bysource $SR | ?{$_.SourceObject -like "MA*"}

Get-SCSMObject -class (Get-SCSMClass -name system.workitem.activity.manualactivity) | ?{$_.DisplayName -eq $ma.SourceObject.DisplayName} | Set-SCSMObject -Property status -Value active

Does anyone know how to work around this stupid problem?




  • Options
    James_AtanceJames_Atance Cireson Support Advanced IT Monkey ✭✭✭
    Hi Matt,

    Are you seeing any errors in the Activity Status Change Workflow ?


  • Options
    Matthew_BrooksMatthew_Brooks Customer IT Monkey ✭

    Just tested using create service request using template in the console and had no problems what-so-ever.

    The main process I am using when i get the issues are as follows:

    1. Orchestrator creates SCSM object (class 'service request). With a specific title

    2. Service Request event workflow runs and applies the template to the new SR. This template contains 1 single MA activity.

    3. Checking the workflow I can see it being initiated. The workflow seems to move the status from {blank} to 'Pending' and this is where it stays

    I compared the result to the one I created from the console and this one has more steps which seems to move the status from {blank} to 'Pending' and about 15 seconds later another entry shows it updating the status from 'Pending' to 'In Progress'

    Thanks. Started to point me in the right direction anyway, hopefully the above will help

  • Options
    Billy_WilsonBilly_Wilson Member Ninja IT Monkey ✭✭✭✭
    In the runbook Create Object activity for the new SR, do you specify a status?
  • Options
    Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
    Matt, it could be an issue with the sequence IDs listed in the template. Using the UI, SCSM can get confused with the sequence IDs and often doubles-up on some numbers. This has caused similar behaviour in our environments.

    If you open the MP, browse through the XML to check that the template's activities have a sequential "Sequence ID" that starts at 0. The way this works is that the activities within a container activity, like a PA or SA, start at 0 again.
  • Options
    Matthew_BrooksMatthew_Brooks Customer IT Monkey ✭

    Morning.  The runbook that creates the activity simply sets the ID with a prefix (SR{0}) and a basic title. The title is used to apply the template using the scsm workflow process.

    We get the same problem when i create a SR using an advanced service request offering. This doesnt call any runbook but uses a template to create a basic SR with a single MA inside.The ASRO simply populates the title of the SR again, nothing fancy.

    Do you think resetting the IDs would fix the problem even if I use the normal 'create Sr from Template' process in the console and that works?

    Thanks agian


  • Options
    David_Morris1David_Morris1 Member Advanced IT Monkey ✭✭✭
    can you send over a copy of the script your using to set the template using the SCSM workflow, does the template have the MAs inside? does your SRs go into a submitted state? 
    my best guess is that the MAs are added by this template workflow after the SR has already passed the workflow that would push the first activity into progress, this would explain why you see this when this template is applied based on the title either by SCORCH or using a RO but works fine if you request if directly using console
Sign In or Register to comment.