Getting Running Control Room Processes from a Process
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-06-16 12:00 AM
I'm wondering if anyone has found a way to pull the currently running VMs from the active environment into a Process.
For instance, if a process could pull in a collection of
Running Processes:
ID___|___Process___|___Resource___|___Start Time
11___Web_Srch_____Res_1_________6/23/2016
12___Data-Query____Res_5_________6/23/2016
13___Web_Srch_____Res_4_________6/23/2016
14___Web_Kill_______Res_2_________6/23/2016
Of what's currently running.
The reason I ask is that we have a few processes that run in parallel with multiple copies of itself, and it can be tricky to integrate them without a way to have an overview the running pool as a whole from inside the process. Additionally if would be nice if there was a "GetProcessName()" option from the 'Environment' section of a calculation stage for the process to identify itself by default rather than setting it via a variable.
Currently, we can figure out what's running on our pool through 'creative' measures, but it'd be nice to get control room information directly into a BP object or project.
Any ideas?
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-06-16 05:34 PM
As yet there is no way for a process to know it's own name, other than to hard code it in a data item, and neither can you pull information on other machines and processes. But both are worth suggesting.One possible workaround is to have all processes register their activity in a queue ('I am machine X running process Y') and refer to that to see what is going on. Using an object to do the 'clock in/clock out' would centralise the logic but you'd have to remember to refer to it in every process, so not fool-proof. It would also be a (rare) opportunity to make use of CleanUp to record process terminations. The command line and HTTP interfaces also provide other useful functionality, but it still falls into the 'creative' category.But our guys do pay attention to the Ideas & Enhancements thread of the forum, so feel free to post your thoughts.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-06-16 09:13 PM
Could you link me to any docs on the HTTP interface? I'm not sure if what I have locally is the same as to what you referenced, but I'd like to poke around.
The 'Heart Beat Monitor' is actually what the current 'creative solution' is, actually, so we can distribute directives to each alive bot, and likewise with the Cleanup Methodology. So we're one for one in our thinking on that level.
Some of our processes are handling either large volumes, or have run times that require bots running in parallel, each doing a 'part' of a much bigger job without doubling up. It was a fun project to integrate a communications protocol to keep them all working as a team, but some sort of process level access to control room statistics would have been very helpful.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-06-16 07:33 PM
Agreed, the ability 'see' what is going on outside of the current process scope would be useful.The Help files contain info on Command Line and HTTP, just search and you'll find it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-06-16 09:34 PM
BuzzaT,
Have your process execute the below SQL script. You will just need to replace 'DATABASE' with the name of your Blue Prism database.
SELECT P.name AS [PROCESS],
R.name AS [RESOURCE],
S.startdatetime AS [START_TIME]
FROM [DATABASE].[dbo].[BPASession] AS S
LEFT JOIN [DATABASE].[dbo].[BPAProcess] as P
ON S.processid = P.processid
LEFT JOIN [DATABASE].[dbo].[BPAResource] AS R
ON S.runningresourceid = R.resourceid
WHERE enddatetime IS NULL
I've ran a basic test and it seems to produce the output you desire.
Obviously it is very basic and I would consider running some tests of your own to establish if the script doe's need amending as it currently only check if the end time of the session is NULL.
- Tom.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
30-06-16 02:04 AM
Thank you for the ideas.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-07-16 03:41 PM
Guys - just a word of warning on querying the DB directly. I know the information is in there but please don't forget it is the hub around which all activity revolves; it's precious and without it everything stops. One of the key roles of BP Server is to improve security by restricting direct DB access, so be aware of your Security Policy/Logical Access Model. Lastly, consider the potential impact of ad hoc queries on the DB, you wouldn't want Prod BAU work being affected.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-05-20 08:24 PM
This aboslutely works, maybe its not the perfect solution because of all the access rights and security topics,
but sadly there's no other way to achieve this.
------------------------------
Miguel Carrillo
------------------------------
but sadly there's no other way to achieve this.
------------------------------
Miguel Carrillo
------------------------------
