Hi there “Process Automation” fans,
Welcome to a new installment of “Process Automation” tips.
An interesting question passed my OPA explorations which is: Where does the platform save the definition (or the blue-print) of an entity!? Well, a great question that requires some research, although I can already guess where the save happens! Where? Well, probably the in the XML DataStore (XDS)
Let’s get right into it…
My first question would be: How can we quickly find answers for these kinds of questions? That would be via database logging and watching the INSERT/UPDATE statements for the saving of a new entity creation!
For this we first make sure to create an entity project
in our project. Add some interesting properties and prefix them with prj_
. It’s not needed, but it’s a good habit, and you can find things back at database level much easier.
Before you save the entity!…Enable PostgreSQL logging using these ‘Bash’-commands:
1 | sudo vi /var/lib/pgsql/data/postgresql.conf |
Now do a save action on the entity and watch these interesting statements passing by in the logging (it’s like magic filling the XDS database with entries):
1 | INSERT INTO xds_document(...) VALUES (...); |
Notes:
- Always make sure to also re-comment the
log_statement = 'all'
once you’re done (or set it back to the default level)!- You now see that the XDS location is just a separate set of tables in the same database as the runtime instances of your entities and all other types of documents of the platform!
Great! With this information we can now also query our entries…right? Yes, please give me the properties of my project
entity including the datatypes (in PostgreSQL format!):
1 | SELECT NAME, (xpath('//*[local-name() = "DataType"]/text()', content::xml))[1]::text AS data_type |
NICEEEE!! We can go on and on like this, but if you don’t need all the queries and only want to view or browse your details on the entity definitions there is a smarter way…
The “Management Console” view
In 2019, we wrote about the ‘Management Console’. It’s an older UI which you can start via this command in the Bash terminal of your VM: sh /opt/opentext/ProcessAutomationCE/defaultInst/bin/cmc.sh
Notes:
Once you have the CMC tool up and running, you can browse into a similar data structure as seen in the previous section:
Only, what fun is browsing if you can query it! 🤗
I give it a well “DONE” on the R&D for finding out the insight for an entity definition. Not only by SQL statements, but also from a UI perspective over an old (but solid tool!) called CMC. Let me know in the comments; what’s your question to find an answer for? Have a great weekend, and we see one another next week at “Process Automation Tips”!
Don’t forget to subscribe to get updates on the activities happening on this site. Have you noticed the quiz where you find out if you are also “The Process Automation guy”?