another technical blog...technically

Monday, July 2, 2018

Scheduler is locked?

Lately, lot of people talk about RPA but very few people talk about what happens when you have to scale and you have something like 20 robot working all together, synchronized, with a "time/resource filling" target.
Sometimes you could see the scheduled tasks forever "Pending", not responding to any delete or run requests.
The solution is: let's go to the DB and use this query to find out all the pending processes in a human readable way.

  SELECT 
       s.sessionid,
       r.name,
       p.name,
       s.startdatetime,
       st.statusid,
       st.description
  FROM 
  [BluePrism].[dbo].[BPASession] as s
  inner join BluePrism.dbo.BPAProcess as p
  on s.processid = p.processid
  inner join BluePrism.dbo.BPAResource as r 
  on r.resourceid = s.runningresourceid
  inner join BluePrism.dbo.BPAStatus as st
  on s.statusid = st.statusid
  
  where st.description = 'Pending'
  order by s.startdatetime

Then just change the end date from NULL to another value (maybe the same of the start one) and the statusid to "2", which stands for the Terminated status and the linked resource will be released ;)
Share:

Me, myself and I

My Photo
I'm just another IT guy sharing his knowledge with all of you out there.
Wanna know more?