Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Debugging Mapping Out

Activating the debug logs in Force.com does not produce any trace of the data synchronization process happening when the user clicks on the Overview tab of the Quote detail page, or on the ‘Synchronize’ link from within content frame.

Even if the data synchronization triggers Apex code execution, the debug logs are received by CPQ server and are not available from the Force.com Monitoring menu. Furthermore, the debug statements of standard synchronization trigger code are filtered by Force.com as CPQ is a managed package. To ease the understanding of the synchronization process, especially when mapping sets are used, the Apex debug logs generated by the standard synchronization trigger are now available on the CPQ server.

However, to avoid the filtering of debug statements due to managed package restrictions, you must develop and deploy in your Force.com organization, an Apex class that will put off the restriction.

Below is an example of a local Apex class that will make visible the debug statements of standard synchronization trigger, along with allowing some debug settings to be parameterized.

global with sharing class MyDebugClass implements CameleonCPQ.CPQMappingSet.IDebug {

/* Debug is issued for the given logging level */

global yoid debug(String level, String msg) {

// level is the converted String value of Force.com logging level used in synchronization

// levels : ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST

if('ERROR'.equals(level))

System.debug(LoggingLevel.ERROR, msg);

else

if('WARN'.equals(level))

System.debug(LoggingLevel.WARN, msg);

else

if('INFO'.equals(level))

System.debug(LoggingLevel.INFO, msg);

else

if('DEBUG'.equals(level))

System.debug(LoggingLevel.DEBUG, msg);

else

if('FINE'.equals(level))

System.debug(LoggingLevel.FINE, msg);

else

if('FINER'.equals(level))

System.debug(LoggingLevel.FINER, msg);

else

if('FINEST'.equals(level))

System.debug(LoggingLevel.FINEST, msg);

else

System.debug(LoggingLevel.INFO, msg);

}

/* Debug is issued for the default logging level */

global yoid debug(String msg){

System.debug(msg);

}

/* Determine the logging level used for tracing the synchronization trigger

*/

// Must return the string representation of one of the Force.com logging levels

global String getLoggingLevel(){

return LoggingLevel.INFO.name();

}

/* Determine the name of the Apex debug file created on CPQ server */

global String getLoggingFileName(Id quoteId) {

return 'MyApexDebug.log';

}

}

The local class must implements the interface CameleonCPQ.CPQMappingSet.IDebug

And therefore provide an implementation for all of its methods

The following table lists the methods of the interface CameleonCPQ.CPQRequestFormatter.IMappingIN.

METHODRETURNED TYPEDESCRIPTION
debug(String level, String msg)The level in input gives the LoggingLevel for which the debug statement of synchronization trigger is intended for. level is the converted String value of one the Force.com Logging Levels available : ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST msg is the debug message issued by the standard synchronization trigger. The default implementation of this method in case no custom debug class is activated is shown in the example above.
debug(String msg)Used when the synchronization trigger issues the debug message for the default Logging Level assigned to the user. The default implementation of this method in case no custom debug class is activated is shown in the example above.
getLoggingLevel()StringReturns the Logging Level to be used for any category of debug (Database, Apex …) when the synchronization trigger is executed. The returned String must be a valid Force.com Logging Level: ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST We recommend that this method returns the "INFO" value to get the most useful messages from the synchronization process. Upper levels might produce of too detailed trace and could lead to debug log truncation. The default implementation of this method in case no custom debug class is activated returns null, which means no debug file will be created on CPQ server.
getLoggingFileName(Id quoteId)StringReturns the name of the debug file that will be created on the CPQ server. quoteId in input contains the Id of the current quote object, in case the name of the file should make reference to it or to one of its fields. The default implementation of this method in case no custom debug class is activated returns organizationId_quoteId.log. We recommend this value to be compatible with a multi-user context.

When the local class has been deployed in the Force.com organization, activate it by setting its name (without any extension) in the PROS custom settings:



The debug files are accessible via the Manage Files step of CPQ Designer (/log/ directory).