US English (US)
ES Spanish

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Log in
English (US)
US English (US)
ES Spanish
  • Home
  • Help & Support
  • Support
  • Deep Dive
  • RIO Education Modules
  • RIO Reporting
  • Generic Reporting Engine

Custom Data Holder Generation Apex Class

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • RIO Certification
    RIO Certification Program RIO Academy RIO Challenge RIO Recipe Training
  • Releases
    Release Notes
  • Help & Support
    Install RIO Education RIO Insights RIO Recipe Support
  • About Us
    Who is RIO Education? Start Your RIO Journey Housekeeping
  • Experience RIO in action
+ More

Table of Contents

Custom Data Holder Generation Apex Class Data Holder Executable Class Status logging Set Class Name on Reporting Export

Custom Data Holder Generation Apex Class


The RIO Education - Reporting Engine allows you to override the standard data holder generation behavior. There are two required setup:

  1. Develop a data holder executable Apex class.
  2. Define the class name on the related Reporting Query.


Data Holder Executable Class

You need to create an Apex class that extends the rio_edrept.REPT_DataHolderExecutable class and override the run() method.


global without sharing class REPT_DataHolder_EXE extends rio_edrept.REPT_DataHolderExecutable {
    
    /**
     * @description Method to be implemented by the classes that extend this abstract class. This is the method that will be called by the REPT_Data_Manager
     */
    public override void run(rio_edrept.DataHolderInfo dataHolderInfo) {


        if (rio_edrept.UTIL_AppSetting.isDataGeneratorBatchMode()) {
            REPT_CustomJob_BATCH dhJob = new REPT_CustomJob_BATCH(
                dataHolderInfo.dataHolderQuery, 
                dataHolderInfo.reportType, 
                dataHolderInfo.reportVariant, 
                dataHolderInfo.reportingExport.Id, 
                dataHolderInfo.reportingExport.rio_edrept__Report_Version__c, 
                dataHolderInfo.reportingExport.rio_edrept__Reporting_Year__c, 
                dataHolderInfo.targetObjectName, 
                dataHolderInfo.fileType, 
                dataHolderInfo.fileSection
            );


            Database.executeBatch(dhJob, rio_edrept.UTIL_AppSetting.getDataGeneratorBatchSize());


        } else if (rio_edrept.UTIL_AppSetting.isDataGeneratorQueueableMode()) {
            REPT_CustomJob_QUEUE dhJob = new REPT_CustomJob_QUEUE(
                dataHolderInfo.dataHolderQuery, 
                dataHolderInfo.reportType, 
                dataHolderInfo.reportVariant, 
                dataHolderInfo.reportingExport.Id, 
                dataHolderInfo.reportingExport.rio_edrept__Report_Version__c, 
                dataHolderInfo.reportingExport.rio_edrept__Reporting_Year__c, 
                dataHolderInfo.targetObjectName, 
                dataHolderInfo.fileType, 
                dataHolderInfo.fileSection
            );
            
            if (!Test.isRunningTest()) {
                System.enqueueJob(dhJob);
            }
        }
        
    }
}


Status logging

It is recommended to implement a proper status logging in your custom batchable or queueable Apex class to allow the RIO Education - Reporting Engine to track the status correctly.

To log the status for an asynchronous job, you can use the following methods from rio_edrept.UTIL_Logging class.

rio_edrept.UTIL_Logging.logJobStarted(rExportId, jobId, jobName, jobType, jobRef, logMessage);
rio_edrept.UTIL_Logging.logJobCompleted(rExportId, jobId, jobName, jobType, jobRef, logMessage);
rio_edrept.UTIL_Logging.logJobFailed(rExportId, jobId, jobName, jobType, jobRef, logMessage);



Set Class Name on Reporting Export

Once the custom Apex class is created, you can define the Apex class name on the Reporting Query's Data Holder Generation Class Name.



Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Setup Reporting Export
  • Setup Reporting Configuration and Query
  • Setup System and Dynamic Merge Fields
  • What is RIO Education - Reporting Engine
RIO Education

RIO Education, a WDCi Company. This information is proprietary, confidential and protected by copyright ©2024.

CONTACT

Get in touch

  • Privacy
  • Terms of service

Knowledge Base Software powered by Helpjuice

Definition by Author

0
0
Expand