02-11-22 08:15 AM
02-11-22 11:08 AM
02-11-22 11:23 AM
In order to get the processes, objects and environment variables first you can use the below SQL query in your Get collection action:
For fetching list of processes:
SELECT P.name,P.description,P.version,P.createdate,P.lastmodifieddate, G.name AS [Folder Name]
FROM BPAProcess P INNER JOIN BPAGroupProcess GP ON P.processid = GP.processid INNER JOIN BPAGroup G ON GP.groupid = G.id
WHERE ProcessType = 'P'
For fetching list of objects:
SELECT P.name,P.description,P.version,P.createdate,P.lastmodifieddate, G.name AS [Folder Name]
FROM BPAProcess P INNER JOIN BPAGroupProcess GP ON P.processid = GP.processid INNER JOIN BPAGroup G ON GP.groupid = G.id
WHERE ProcessType = 'O'
For fetching list of environment variables:
SELECT name, datatype, value, description
FROM BPAEnvironmentVar
Explanation:
Environment Variables are stored in one table only are pretty straightforward to fetch from BPAEnvironmentVar table.
However, for BPAProcess we have a 'ProcessType' column which indicates whether the stored record is for a process or an object since we have both processes and objects stored under one table which are categorized by either the value 'O' or 'P' for the 'ProcessType' column in this table.
When we consider the folder groups to be also picked up, they reside in a separate table called as BPAGroup and the mapping for each group to a process resides in BPAGroupProcess table so what I am essentially doing is matching the 'processid' field from BPAProcess table to any reference in BPAProcessGroup table and then from there I again create a reference to BPAGroup table using 'groupid' field this time.
Coming to the last part ideally few features were introduced that I can recall directly such as queue snapshots and error screenshots between these versions I think so you may have additional tables and fields to incorporate those. Maybe someone from Blue Prism team might have a document handy to capture all these details.
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
02-11-22 01:33 PM
16-06-23 04:52 PM
I Know its old thread but I have a question around the App Modeller elementes.
I want to make sure no object keep any value for "Web Page Address" element.
what will be the DB query or any alternate solution to find that? ( Navigating manually is big no)
20-06-23 11:21 AM
Hi Suhas,
Don't know about the SQL, but as an alternative you could make a release including all of your objects and then scan the XML for 'https' or for the element you mention.
Happy coding!
---------------
Paul
Sweden
20-06-23 02:27 PM
I don't recall the actual element name in the XML, but if you export a VBO with an app model and that element populated you'll be able to find it by looking at the XML in a text editor. From there, you can craft a SQL query to run against the database. Something like this:
SELECT [dbo].[BPAProcess].[processxml] FROM [dbo].[BPAProcess] WHERE ([dbo].[BPAProcess].[ProcessType] = 'O' AND [AttributeID] <> 1) AND ([processxml] LIKE 'INSERT ELEMENT NAME HERE');
Cheers,
Eric
21-06-23 08:49 AM
Thank Paul and Eric,
@ewilson Thank you for query however that gives me minimal details.
At the end, I was able to capture the attribute and object names, but I was unable to capture the precise element name in which the attribute was present.
DROP TABLE IF EXISTS #tempWorkQueueItem1;
SELECT
CONVERT(XML, P.processxml) AS 'xmldata' INTO #tempWorkQueueItem1
from
bpaprocess P
WHERE
processtype = 'O'
and P.NAME like '% YOUR OBJECT NAME %'
SELECT
*
from
(
SELECT
[xmldata].query(N'(//element)') AS [AllElemets],
[xmldata].value(N'(//element/@name)[1]', 'nvarchar(max)') AS [ElementName],
[xmldata].query(
N'(//attribute[@name="wPageAddress"]/ProcessValue[@value !=""])'
) as [WebAddress]
FROM
#tempWorkQueueItem1
) T
where
[WebAddress] is not null
and cast([WebAddress] as varchar(max)) != ''
DROP TABLE #tempWorkQueueItem1