XBRL Rendering Engine Systems Documentation
Short Description
Download XBRL Rendering Engine Systems Documentation...
Description
U.S. Securities and Exchange Commission
XBRL Software Engine and Associated Services Solicitation Number: SECHQ1-08-C-8210-0002 Agency: Securities and Exchange Commission
Systems Documentation
1|P a g e
Table of Contents Introduction.................................................................................................................................................3 High Level Process Flow and System Architecture...........................................................................................4 High Level Processing Components................................................................................................................7 Dispatcher................................................................................................................................................9 Report Builder........................................................................................................................................11 “R” Files..............................................................................................................................................13 Rule-Based Engine...............................................................................................................................14 Logging...............................................................................................................................................17 Appendix A. “R” File Example ....................................................................................................................20 Appendix B. Rendering Engine Rules ..........................................................................................................23 Appendix C. Error Messages......................................................................................................................26
2|P a g e
Introduction For the past several years, the U.S. Securities and Exchange Commission (“SEC” or “Commission”) has been evaluating the use of interactive data as a tool to improve the timeliness and accessibility of information contained in filings with the Commission under federal securities laws. In 2005, the SEC introduced the XBRL Voluntary Filing Program (VFP) to encourage companies to furnish unofficial financial statements and other reports using Extensible Business Reporting Language (XBRL). Building on experiences with the VFP, the Commission has deployed software tools on its Web site to (1) allow public users to view rendered versions of disseminated EDGAR XBRL documents that contain Exhibit 101 attachments; (2) allow EDGAR users to preview rendered versions of XBRL documents prior to live submission to EDGAR. Common to these viewing tools is a rendering engine whose function is to generate a human-readable document from raw XBRL content. This paper is an overview of the rendering engine software. It provides some design and implementation details for a technical audience who may decide to take advantage of the open source license and incorporate the SEC’s rendering engine into their own XBRL applications. Those who do so must note that the rendering engine software is subject to design and implementation changes. Subsequent versions of this document will reflect these changes as appropriate and as needed. Currently, the rendering engine is based on the following technologies: • • • • •
Microsoft .NET 2.0 application programming model; Windows Server 2003 operating system; Visual Studio 2005 development tool; C# programming language; and NxBRE 3.1.0 open source rule engine.
High Level Process Flow and System Architecture gives an overview of the rendering engine and the web applications that it services; High Level Processing Components gives an overview of the three services of the rendering engine (ReportDispatcher, ReportBuilderPreview, and ReportBuilderSEC); Dispatcher and Report Builder give some implementation details for these two components of the rendering engine; Rule-Based Engine discuss the major functional areas of ReportBuilder; and Logging briefly discusses the rendering engine utility to record events of interest. The appendices provide additional information: Appendix A gives an example of an “R” file; Appendix B lists the rendering rules implemented by the ReportBuilder and the contents of the master rule configuration file; and Appendix C lists the rendering engine error messages.
3|P a g e
High Level Process Flow and System Architecture The rendering engine is a backend process that synthesizes information from raw XBRL documents to generate meaningful human-friendly displays of information that are accessible to the public by the Viewer and Pre-viewer applications on the SEC website (see Figure 1). The rendering engine also generates an Excel workbook (2003 format) version of the same information.
Figure 1 Conceptual Diagram of XBRL Viewing and Previewing Capabilities
The process flow for the Viewer (see Figure 2) starts when an EDGAR submission is disseminated to the SEC website. If the submission contains Exhibit 101 attachments (XBRL company instance and extension files), the rendering engine transforms the raw XBRL to an XML representation (also called “R” or “report” files). When a user on the SEC website requests to view a disseminated EDGAR XBRL 4|P a g e
filing, the XBRL Web Server accesses the “R” files of the requested filing, applies a stylesheet to it and displays the rendered results in the Viewer. The Pre-Viewer differs from the Viewer in that the raw XBRL document submitted by the user is not an EDGAR submission, the resulting “R” files are not stored on the SEC website for more than a day, and the rendered results can only be previewed by the submitter of the XBRL document.
Figure 2 System Integration Diagram
The rendering engine was designed to have a scalable services-oriented architecture. It consists of two processing components; a dispatcher and a builder. The dispatcher monitors the builder; the builder performs the work.
Although each installation of the rendering engine has only one
dispatcher, it can be configured for multiple builders (see Figure 3). When a builder starts, it registers 5|P a g e
itself with the dispatcher using Microsoft .NET Remoting technology. This allows the dispatcher to communicate with the builders regardless of physical location as long as the servers upon which they reside are connected by a network. This gives the rendering engine a scalable architecture that is capable of accommodating future growth needs.
' LVSDW FKHU
%XLOGHU
%XLOGHU
Figure 3 Rendering Engine Components
6|P a g e
High Level Processing Components The current SEC installation has a preconfigured dispatcher, ReportDispatcher, and two preconfigured builders; ReportBuilderSEC to process disseminated filings; and ReportBuilderPreview to process filings submitted through the Pre-Viewer. When the StartServices batch file is run by the “SYSTEM” user account, three Windows Services are started; ReportDispatcher, ReportBuilderPreview, and ReportBuilderSEC (see Figure 4).
Figure 4 Task Manager
ReportDispatcher monitors the two builders (Figure 5). The two builders, ReportBuilderSEC and ReportBuilderPreview, monitor their respective directory locations for documents to process. If documents are present, one or more threads are invoked to generate XML “R” files, package them in zipped format, and deposit them in a directory location known to the XBRL Web Server. Upon receiving a request from the Viewer or Pre-Viewer to view a document, the XBRL Web Server applies a stylesheet to the “R” files of the requested document then displays the resulting HTML on the SEC website.
7|P a g e
Figure 5 Process Flow Diagram
The dispatcher is the first service started and last to shutdown. If the hosting server is rebooted, the dispatcher will restart automatically, but the builders would need to be restarted manually (remote builder services must first be shutdown before being restarted). If a service shutdown command is received by a builder in the middle of processing files, the builder will delay shutting down until it completes processing. Each of the rendering engine Windows Services is installed in its own directory and can be configured separately.
8|P a g e
Dispatcher
The dispatcher is the central controller of the rendering engine. It maintains a list of available builders and their statuses by registering a builder when it starts and unregistering it when the builder shuts down. The dispatcher does not directly perform work to render XBRL documents. The dispatcher uses a configuration file (see Figure 6) to allow customization of port and server information through which the dispatcher communicates with its builder services.
These
configuration properties are described in Figure 7.
Figure 6 Example of Dispatcher Configuration (Aucent.XBRLReportBuilder.Dispatcher.exe.config)
Property PortNumber ServerKey EndPoint
Description Remoting property. Specify the port number used for communication. Remoting property. Specify the server name used for communication. Remoting property. Specify the endpoint server name used for communication.
Figure 7 Description ofConfiguration Items for Dispatcher
The dispatcher is a Windows Services program that is started by StartServices.bat. It is the first service started and the last to shutdown. When the StartServices batch file is executed, the Aucent.XBRLReportBuilder.Dispatcher.exe process starts by invoking the Main() method of the FilingDispatcherService class. The sole purpose of Main() is to provide the entry point to the dispatcher service by passing FilingDispatcherService as a parameter to the ServiceBase.Run () 9|P a g e
method. The ServiceBase class, the base class for all Window Services developed with the .NET Framework, calls the OnStart() method in FilingDispatcherService to implement the startup code in FilingDispatcherManager.StartUp(). The dispatcher is now ready to receive requests from the builders.
Figure 8 High Level Dispatcher Class Diagram
10 | P a g e
Report Builder
The report builder is the workhorse of the rendering engine. It begins by monitoring a directory location, as specified for FilingsFolder at a frequency determined by ProcessingFrequency in the builder configuration file (see Figures 9 and 10). If XBRL documents are found, they are added to a queue where a thread is invoked to process each document. The rendering engine parses the instance document and, through the discovery process, the company-extended and base taxonomies. An open source rule engine, NxBRE, then applies pre-defined SEC business rules to the parsed document to generate the “R” files.
A version of the “R” file information is also generated for an
Excel workbook where each report is stored in a separate worksheet tab.
Figure 9 Example of Builder Configuration File (Aucent.XBRLReportBuilder.Builder.exe.config)
11 | P a g e
Property FilingsFolder ProcessingFolder ReportsFolder Processing Frequency MaxExtractionAttempts MaxBuilderThreads DispatcherURI PortNumber ServerKey EndPoint
Description Root directory location where ReportBuilder will periodically examine for filings to process. Root directory location where ReportBuilder will move the filings that are ready to be processed. Root directory location where ReportBuilder will place completed reports. Length of time in seconds the service will wait before checking FilingsFolder for new filings. The maximum number of times the ReportBuilder will attempt to extract the contents of a zip file before treating the file as invalid. The maximum number of threads that can be used to build reports at a given time. The # of threads should be configured based on the CPU setting. Specified the location of the dispatcher. For example: Tcp://dev6:9501/ReportDispatcherServer Remoting property. Specify the port number used for communication. Remoting property. Specify the server name used for communication. Remoting property. Specify the endpoint server name used for communication.
Figure 10 Description of Configuration Items for a Builder
A builder is a Windows Services program that is started by StartServices.bat. The current SEC implementation of the rendering engine starts two builders, ReportBuilderSEC and ReportBuilderPreview, after starting ReportBuilderDispatcher. When the StartServices batch file is executed, the Aucent.XBRLReportBuilder.Builder.exe process begins by invoking the Main() method of the ReportBuilderService class. The sole purpose of Main() is to provide the entry point to the builder service by passing the ReportBuilderService parameter to the ServiceBase.Run () method. The ServiceBase class, the base class for all Window Services developed with the .NET Framework, calls the OnStart() method in ReportBuilderService to implement the startup code in FilingProcessorManager.StartUp().
12 | P a g e
Figure 11 High-Level Builder Class Diagram
A timer in FilingProcessorManager.StartUp() is set to periodically check for the presence of filings to process. If found, a builder thread in FilingProcessorManager.ProcessFilings() is used to perform the work of generating the “R” files and the Excel Workbook in ReportBuilder.BuildReports(). Since both the builder and the XBRL Web Server expect to receive files in zipped format, methods in ZipUtilities are used to uncompress files to be processed; and compress files generated by the builder.
“R” Files “R” files are intermediate XML report files created by the rendering engine that contain synthesized information from an instance document, company-extended and base taxonomies, and SEC business rendering rules in order to provide a structure useful for both rendering and analysis. By applying a style sheet, the “R” files can be transformed to HTML-formatted reports, Excel reports or PDF reports (see Appendix A. “R” File Example).
13 | P a g e
Rule-Based Engine The rendering engine uses an open source rule-based engine, NxBRE, to control the application of SEC business rules to the processing of XBRL filings. Although NxBRE offers code for two different approaches; the Inference Engine and the Flow Engine, the builder service implements the Flow Engine because of its use of XML configuration files to control the process flow (see Figure 12). These configuration files are constructed using the rule language as defined in xBusinessRules.xsd and contain instructions for the execution of custom rule-based adapters.
Figure 12 Overview of NxBRE (Flow Engine)
During initialization, NxBRE processes a master XML configuration file, ReportBuilder.rul, to create a context that loads the rules. Each rule object is, in turn, defined by a separate configuration file that, at
execution
time,
is
retrieved,
parsed,
and
its
custom
adapter
invoked
by
the
ObjectLookup.ExecuteRule() method. The advantage of implementing rules in this manner is the ability to change execution information in any of the rule object configuration files without having to recompile the source code to activate the change. Figures 13 and 14 show an example of how the CleanupFlowthroughColumns rule is declared in ReportBuilder.rul and how it is defined in the CleanupFlowthroughColumns.xml configuration file, respectively.
14 | P a g e
Figure 13 Excerpt from ReportBuilder.rulFigure 11. Excerpt from ReportBuilder.rul
Figure 14 CleanupFlowthroughColumns Rule Configuration File
When the builder applies a particular rule (for example the CleanupFlowthroughColumns rule) it first checks to ensure that the rule has been enabled (Figures 15 and 16). Then a call to the ProcessRule method of the RulesRepository class is made with the rule name (for example the CLEAN_FLOWTHROUGH_COLUMNS_RULE) as a parameter. The NxBRE engine then retrieves the rule configuration file (for example, CleanupFlowthroughColumns.xml) and executes the appropriate custom adapter (for example, ReportBuilder.CleanupFlowthroughColumns()).
15 | P a g e
)RU( DFK 5XOH 'HILQHG
1R ,V W KH 5 XO H( QDEO HG "
View more...
Comments