once I have the query to determine which process failed and the description of the failure, how do I send out action item with this information? Do I have to create a custom object to store the information?
You can create a GEL script to send out an email message. You'd want to put this GEL script in a process that is NOT associated with an object, then probably schedule the script to run on a regular basis. If you haven't looked at the website gelscripting.com I suggest you have a peek. It will describe the gel:email tag in a bit more detail. It's pretty easy to do - you create an HTML formatted email and you can include variables from your SQL query if you assign them to GEL variables. One caveat I've found is that the GEL email will fail if you have the same email address repeated twice in the recipient field, so just be aware of that.
select o.OBJECT_NAME, rp.STATUS_CODE, be.TYPE_CODE, be.MESSAGE_CODE, be.EXCEPTION_TRACE2, rp.created_date
from BPM_RUN_OBJECTS o
inner join bpm_run_processes rp
on o.object_id=rp.id and o.table_name='BPM_RUN_PROCESSES'
inner join BPM_ERRORS be
on rp.id= be.PROCESS_INSTANCE_ID
and o.OBJECT_NAME ='update_tasks'
and rp.STATUS_CODE='BPM_PIS_ERROR' and be.TYPE_CODE='BPM_PMT_ERROR'
Query to get the failed process is above. Once I get the information, I need to send out notification to a team with the information from the query.
What is the best approach?
Thank you Amy,
I used the core when and core otherwise to determine when to send out email. Got the GEL email from my previous script as well.
Retrieving data ...