cancel
Showing results for 
Search instead for 
Did you mean: 

Code control room

SalmanAhmed
Level 4
Hi

Can anyone help me with code to get my process ran for last 30 days from control room. 

Thanks
Salman Ahmed
Asia/Kolkata
Salman Ahmed System Engineer Asia/Kolkata
5 REPLIES 5

BenKirimlidis
Level 7

Hi Salman,

If you are i nthe control you can filter processes to the last X days using the provided dropdowns.

If you mean to get a copy of the data from the SQL Databasse, make sure you have a mirror DB set up as you should never query a Production database directly.

Set the default DB to whatever the naem of your  DB is on your SQL Server and ru nthe query below to get everything fomr thlast 30 days:

DECLARE @StartDate as Date

set @StartDate = convert(date,getdate()-30)

SELECT

P.Name as ProcessName
,S.StartDateTime
,S.EndDateTime
,S.StopRequested
,S.LastUpdated
,S.LastStage
 
FROM [dbo].[BPASession] as S

inner join [dbo].[BPAProcess] as P
on P.[processid] = S.[processid]
and P.[ProcessType] = 'P'

where convert(date,S.StartDateTime) >= @StartDate
;



------------------------------
Ben Kirimlidis
RPA Developer and Data Analyst
PTSB
Europe/London
------------------------------

SalmanAhmed
Level 4
@Ben Kirimlidis thanks for your response.

Is it possible that I can get that process ran information from c# or vb.net code?
​​

------------------------------
Salman Ahmed
System Engineer
Asia/Kolkata
------------------------------
Salman Ahmed System Engineer Asia/Kolkata

If you're using C# or VB you'll need to make a DB connection and then execute the query.  You'd just be adding steps.

What is your end goal?  Is it to have the data for:
1.1) Reporting outside of Blue Prism
1.2) Use in a Blue Prism process​
1.3) To simply see the info from a control room perspective
1.4) Something else entirely

Depending on your experience/familiarity with SQL databases these ones might make no sense to you, let me know if you want an explanation of what any of these are.
Do you:
2.1) Have access to a mirror of the database supporting the environment you want process data for?
2.2) Know about the permissions (AD groups) to allow someone to query the database?

Sorry if this seems a bit confused.  I am not certain what exactly you're looking for



------------------------------
Ben Kirimlidis
RPA Developer and Data Analyst
PTSB
Europe/London
------------------------------

​Basically I need it for two scenarios

1) Need information from control room, which are the process ran for respective dates.
2) Need for reporting,


------------------------------
Salman Ahmed
System Engineer
Asia/Kolkata
------------------------------
Salman Ahmed System Engineer Asia/Kolkata

Control Room:
On Blue Prism, go to the 'Control' tab.  Clcik on 'Session Management' (top left). From sessions there are filters you can use, Set start date to 'Last 31 Days'. and you will see everything fro mthe last 31 one days.

For Reporting:
Get in touch with your IT department to set up a MIRROR for your PRODUCTION (PROd) Blue Prism (BP) environment.  This means getting a copy of the MS SQL Database that is sitting behind the BP Application server for PROD.  When that is done, you will be able to query the MIRROR DB directly with the query above and gets lots of useful info.

IMPORTANT: Never query the PROD DB directly.  Get IT to set up a MIRROR.  Using the DB you can simplify a lot of reporting, both in terms of Process that ran and individual qork items that were completed.

I have a whole library of queries I'm working for reporting to complement the basic stuff available on BP.  All the DB queries myself or other would work on will be largely compatible with everyone elses but you would need to have a MIRROR set up.  It wmight be hard to do first but it will be well worth it.  As it is I have a report which can be sued for every production process and can pull out the same info available from the control room and also pull out individual line item data like inputs and processing details stored inside the data itme (other than tags)



------------------------------
Ben Kirimlidis
RPA Developer and Data Analyst
PTSB
Europe/London
------------------------------