Question
Virtusa
LK
Last activity: 5 Apr 2020 15:54 EDT
DB Query to get Activities calling Java
Hi All,
I need to retrieve activities calling java in the database.
How can i archive this.
Urgent issue
Thank you.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
BPM Company
NL
hmm, mate, could you please tell us more, because "retrieve activities calling java in the database" means almost nothing :\
Pegasystems Inc.
FR
Yes I was going to say, you need a JavaScript code to run an SQL query to get an activity list.
That sounds over complex why do you need this for?
Virtusa
LK
Actually I do not have the access to the application but the admin has the access to the database.
I want a query to run to get the activities which has calling Java .
Thank You
Pegasystems Inc.
FR
Ok, why don't you just run a Report Definition like Rule-Obj-Activity.pxGetMayStartActivitiesForClass
BPM Company
NL
as far as I understood, he has an access only to the DB
BPM Company
NL
So you want to make a DB query to get a list of all activities who have a Java-step in at least one of the steps?
Virtusa
LK
yes correct. :)
Virtusa
LK
IS this possible
BPM Company
NL
Here're the starting points for you:
1. Every activity is an instance of Rule-Obj-Activity class
2. These instances are stored in the pr4_rule data table.
3. If an activity contains java step, it will be reflected in the messages on that instance.
4. You could use the DB function pr_read_from_stream, to read a property (which contains the warning messages) of an activity from pzpvstream blob column.
Virtusa
LK
Hi Thnx for the reply vaspoz,
I need to get the all the records in the database which has the warning message.
Is this possible with this function.As i saw this function asks for pzInsKey as a param.
Thank You.
BPM Company
NL
pzInsKey is a column in this table. You could get it there.
Just iterate through all the records, check only the ones with class Rule-Obj-Activity.
Indication for an activity with Java would be a page list property pxWarnings().pxWarningName = "Java step"
SSA
US
you can use the below query
select *
FROM [pega].[PegaRULES].[pr_index_warnings] where pxInsIndexedClass='Rule-Obj-Activity' and pxWarningName = 'Java step'