13-03-23 08:09 AM
I am looking for a way to find all Objects that are not referenced by any processes. I assume the best way would be a SQL query on the BP database, but after a bit of searching around in the tables I couldn't find an obvious way to achieve this. Does anyone know which tables to query to get this result?
Answered! Go to Answer.
13-03-23 12:42 PM
Hi Felix,
maybe try this:
SELECT
p.name,
p.description,
p.createdate
FROM BPAProcess p
left join BPAProcessIDDependency d on p.processid=d.processID
left join BPAProcess p2 on p2.processid = d.refProcessID
where p.ProcessType = 'O'
--retired objects are not taken into acount (AttributeID= 1)
and p.AttributeID <> 1
and d.id is null
and p.name not in (
select refProcessName
from BPAProcessActionDependency)
order by p.name
There will be probably better queries, but I am using them.
Best Regards
Jan
13-03-23 12:01 PM
Hi Felix - the BPAProcessNameDependency table records relationships between processes and objects, so objects not in this table will be unreferenced.
This tool may also be of interest too you: https://digitalexchange.blueprism.com/dx/entry/3439/solution/business-object-library-snapshot-generator
13-03-23 12:42 PM
Hi Felix,
maybe try this:
SELECT
p.name,
p.description,
p.createdate
FROM BPAProcess p
left join BPAProcessIDDependency d on p.processid=d.processID
left join BPAProcess p2 on p2.processid = d.refProcessID
where p.ProcessType = 'O'
--retired objects are not taken into acount (AttributeID= 1)
and p.AttributeID <> 1
and d.id is null
and p.name not in (
select refProcessName
from BPAProcessActionDependency)
order by p.name
There will be probably better queries, but I am using them.
Best Regards
Jan
02-05-24 02:28 PM
@JanPiwowarski Thank you for your working solution, the query worked great!
@John__Carter Thanks for the tip on the snapshot creation tool. For this use case it looks a bit of a sledgehammer to crack a nut, but it looks very interesting. I can see possibilities for it on another use case already.