Update: This discussion has been summarized and condensed into a single document:
XREQ objects.
If you have worked with the Automation Engine for a while, you will no doubt have seen references to “XREQ” objects in error messages, logs, or traces. The UC_OTYP table refers to these objects as “Xrequests”. Although the XREQ table documentation page says the table is for storing “Memory distribution”, the table actually contains information about these objects. XREQs appear to be used internally by the Automation Engine, mostly for functions that require user interaction.
https://us.v-cdn.net/5019921/uploads/editor/d1/hun8vitjac9j.gif" width="32">
The XREQ icon, from the ucdj.jar file in the Java User Interface.
Although there is no XREQ_OH_IDNR column, bytes 6 through 15 of XREQ_Name correspond to OH_IDNR entries in OH, and all of these have the OH_OType XREQ. With a join, it is possible to list the objects by name. Here’s an Oracle SQL query that will do the trick.
WITH XREQ_OBJECTS
AS ( SELECT OH_IDNR,OH_NAME,OH_OTYPE,XREQ_NAME,
SUBSTR (XREQ_NAME, 1, 4) AS XREQ_SUBTYPE,
CASE SUBSTR (XREQ_NAME, 1, 4)
WHEN 'ODOC' THEN SUBSTR (XREQ_NAME, 17, 4)
ELSE ' '
END AS ODOC_SUBTYPE, XREQ_CONTENTLEN,XREQ_CONTENT
FROM UC4.XREQ LEFT JOIN UC4.OH ON SUBSTR (XREQ_NAME, 6, 10) = OH_IDNR
ORDER BY OH_Name, SUBSTR (XREQ_NAME, 19, 4))
SELECT OH_IDNR, OH_OTYPE,OH_NAME,XREQ_NAME,XREQ_SUBTYPE,ODOC_SUBTYPE,
XREQ_CONTENTLEN,XREQ_CONTENT,
FROM XREQ_OBJECTS
WHERE ROWNUM < 200
ORDER BY
OH_NAME, XREQ_NAME
The first four bytes of XREQ_Name are some sort of sub-type. The subtype is always either XREQ or ODOC. XREQ_CONTENT contains binary data — what, I’m not sure.
As with many other object types, a lot of the content of XREQ objects is stored in other tables, including OT and ODOC. Here’s my best guess of what these two sub-types mean:
XREQ sub-type | Description |
---|
XREQ | Scripting tab content stored in OT table |
ODOC | Documentation tab content stored in ODOC table |
The ODOC tables also includes binary data in ODOC_CONTENT. (ODOC contains the contents of Documentation tabs of AE objects.)
The BLOB fields in the DB are not directly readable, and I did not have much success in decoding their contents. However, the scripting content in OT is readable, and it seems like ordinary AE scripting, with a few additional Automic-internal commands. Also, XREQ objects are included in the initial data, e.g., in db/general/8.0/uc_ini.txt and db/general/12.0/uc_ini.txt. If you browse these files, you will find a bunch of AE scripting and XML related to Xrequests.
It is very interesting to learn a bit more about how the Automation Engine works. The next time I encounter an error message related to an XREQ, I will know how to do a bit more investigation to identify the root of the problem. And more generally, I find it fascinating to see how many of the higher-level functions of the Automation Engine and its various user interfaces are built using AE scripting and XML under the hood.