As any Mail Notification activity executes in a process flow, it sends a “Process Flow Summary” report (if selected in the Notification Type) to specified users.
This data is generated from the table AU_TRANSACTIONDATA
The "Process Instance Id” field (highlighted above) in the report comes from “AU_ACTIVITYPID" field (highlighted below) It is used as a key to retrieve Error details from AU_TRANSACTIONLOG table if the process flow is aborted.
Note: In Process flow you can get the Process Instance Id from process flow context as below:
String Process Instance Id = (String) context.get(“TransactionPID”);
To get error details you need to look up the field “AU_MSG” for an error message and the field “AU_THROWABLE” for the error stack trace from the table “AU_TRANSACTIONLOG” on the basis of field “AU_TRANSACTIONPID”. This field has the same value as “Process Instance Id”.
The query will be as below:
SELECT AU_MSG, AU_THROWABLE FROM AU_TRANSACTIONLOG WHERE AU_TRANSACTIONPID = 'transactionPID';
Note: AU_TRANSACTIONDATA and AU_TRANSACTIONLOG exist in the log database.