New CPM Logging Tools

CX Version: 

Some long-awaited CPM logging features have arrived in recent versions of Service Cloud. Now it's possible to inspect the health of CPMs in two ways, and collections of CPMs can be imported and exported.

CPM Error Log & CPM Import/Export

A simple report is available from within the Process Designer to inspect whether any CPMs are failing (due to PHP errors or unhandled exceptions). No longer is the SPM queue an impenetrable black box! Sadly, this report view is not available in analytics, but we hope this is on the roadmap so that automatic report notifications can be sent to an administrator upon failure.

Additionally, CPMs and handler configurations can now be imported and exported from within the Process Designer, saving time when migrating functionality from one site to another.

CPM Custom Logging (i.e. "CPM Probes")

Now, rather than having to roll your own logging solution, Oracle provides a logging system to be utilized within CPM logic. Basically, you use a new Terminal class in your CPM and create log entries via a static method: \RightNow\Connect\v1_3\Terminal::logger("MyCustomLogTerminal", 8, "Finally, CPM logging is available in the core product!"); (where 8 = Debug severity, severities range from 1 (Fatal) to 8 (Debug), with 4 being a standard Error)

Then "query" the logs that are generated by the CPM by setting up a so-called "Probe" in the Probe Designer (only available in the Browser User Interface).

Despite the mental images conjured up by its questionable naming, this feature is incredibly useful: it is much more efficient than manually logging to a database, requires less code, and—most importantly—the log entries persist even in case of an error such that a DB rollback would occur.

Please see more details in Oracle's official documentation. These tools help alleviate some of the biggest pain points when integrating with Oracle Service Cloud, we hope to see more developer-friendly features like this in the future!

2018-07-12 UPDATE: Logging Consistency Issues

As-of 18B, when the system is under any amount of load, the CPM probe logs do not capture the logs for a large percentage of CPM runs, so cannot be relied upon as a logging mechanism. Oracle support states that the CPM Probe Logging functionality is not designed to be used as custom logging for CPMs. (Forgive me for thinking that was the whole purpose of this functionality.) Our team has a drop-in solution that handles both flat-file and database logging for CPMs and CP. Please connect with us at 45northsolutions.com for details.

Zircon - This is a contributing Drupal Theme
Design by WeebPal.