| OpenLexicon Brokers |
|
|
|
|
OpenLexicon has incorporated some powerfull information processes into the openLexicon concept of the 'Broker' Brokers model and manage process behavior., A broker is a process adapted to be centrally administered. You can think of a broker as a "Process container”. The solution manages common characteristics shared by processes. Identifying common characteristics enables automation of process management. LexiconFileProcessor =============================================================================== This broker reads data from an input file and processes it according to a Lexicon Process List. The broker will determine if the entire file can be read into memory, and will process the file one line at a time if it is too large. The input file may be archived to a directory. The archived file name will be determined by this broker, and will be of the format: [timestamp]_[object name]_archive.txt If it is desired, the input file may be compared to the most recently archived input file, and only the diffs between the two will be processed. Broker Inputs: 1. Input Data File Path (String) The path to the data file to be processed. 2. XML Descriptor Path (String) The path to the XML descriptor file which describes the data format of the Input Data File. For details on how to create an XML descriptor file, please see the "XML Descriptor Excerpt" document, which is taken from Part 2 of the downloadable Lexicon Tutorial. 3. Process List Alias (String) The name of the process list to execute. The name of the business object associated with this process list is defined in the XML Descriptor, in the ParentObjectDescriptor's name field. There must be a process list defined for the business object that has this field's alias. 4. Torque config dir (String) The path to the directory containing a Torque.properties file. 5. torque db name (String)The name of one of the database connections defined in the Torque.properties file. 6. cache file path (String) Optional. Set to null if not needed. The path to a cache file containing the necessary metadata. This metadata cache file should contain all metadata associated with the business object and non-ignored parameters referenced by the XML descriptor file, as well as all process lists, rules lists, and business rules associated with the process list being executed. If this value is not defined, the metadata will be read from the database connection defined by input values 4 and 5. 7. archive directory (String) The directory in which to archive input files. Note that this broker will save the input file under a different file name so that the time of processing is recorded. 8. flag - use diff of previous file (String - TRUE or FALSE) If TRUE, the input file will be diffed with the most recently archived file, and only new or changed data lines will be processed. The input file will then be archived. If there is no archive file, all data lines will be processed. =============================================================================== LexiconProcessBroker =============================================================================== Queries for data from a database table in one of two ways: 1. The query is constructed by the broker based on an input table name and LexiconBean. The attributes defined in the LexiconBean are included in the WHERE clause of the query. 2. The query is fully defined in a Lexicon Business Rule, and WHERE clause values are provided by an input LexiconBean. The business rule must be a Transform Lexicon Relation business rule - these rules contain a segment of SQL that is written by the user. The values for any attributes referenced by this business rule will be supplied from the input LexiconBean. The resulting data set according to a Lexicon Process List. Processed data can be written to an output file if desired. Broker Inputs: 1. Input Values (LexiconBean) The attributes defined in this LexiconBean will be used in the initial database query's WHERE clause. If method 1 is used, all attributes defined in this bean will be used in the WHERE clause. If method 2 is used, only those attributes referenced in the Lexicon Relation rule will be used. 2. Fetch Table Name (String, optional) For method 1 only. The name of the database table to query. 3. Fetch Business Rule Name (String, optional) For method 2 only. The name of the Lexicon Relation business rule to execute as the initial query. 4. Process Alias (String) The name of the process list to execute. The name of the business object associated with this process list is defined in the input LexiconBean. 5. Perform automatic status update (Boolean) Deprecated input value - requires the presence of the "jbr_sys_status" attribute in the business object being processed. Please reference the code if you are interested in using this feature. 6. Output file xml format (optional) If processed data is to be saved to an output file, this XML descriptor file defines the structure of the output file. For details on how to create an XML descriptor file, please see the "XML Descriptor Excerpt" document, which is taken from Part 2 of the downloadable Lexicon Tutorial. Output file descriptors are almost exactly like input file descriptors. 7. Output File directory (optional) If processed data is to be saved to an output file, this defines the directory to which they will be saved. 8. Records to process at one time (Integer) For method 1 only, this limits the size of the returned data set. Multiple queries will be made if the number of rows matching the given WHERE clause is greater than this value. 9. config directory (String) Defines the directory where a Torque.properties file is located. 10. torque db name (String) The name of the database defined in the Torque.properties file to connect to. 11. cache file path (String) Optional. Set to null if not needed. The path to a cache file containing the necessary metadata. This metadata cache file should contain all metadata associated with the business object and non-ignored parameters referenced by the XML descriptor file, as well as all process lists, rules lists, and business rules associated with the process list being executed. If this value is not defined, the metadata will be read from the database connection defined by input values 9 and 10. =============================================================================== ProcessTableBroker =============================================================================== This is a 'bare bones' broker that processes an entire table according to a Lexicon Process List. No WHERE clause is used in the initial query. No output file operations are supported. Broker Inputs: 1. Object Name (String) The name of the Lexicon Business Object associated with the process list being executed. Each row in the target table will be modeled as this business object. 2. Fetch Table Name (String, optional) The name of the table from which to fetch data. If this value is not defined, input value 1 will be used as the table name to query. 3. Commit Count (Integer, optional) Processing will commit changes after this many rows are processed. 4. Process Alias (String) The alias of the Lexicon Process List to execute. There must be a process list by this alias associated with the object name defined in input value 1. 5. config directory (String) Defines the directory where a Torque.properties file is located. 6. torque db name (String) The name of the database defined in the Torque.properties file to connect to. 7. Cache file path (String) Optional. Set to null if not needed. The path to a cache file containing the necessary metadata. This metadata cache file should contain all metadata associated with the business object and non-ignored parameters referenced by the XML descriptor file, as well as all process lists, rules lists, and business rules associated with the process list being executed. If this value is not defined, the metadata will be read from the database connection defined by input values 5 and 6. =============================================================================== LexiconFileLoader =============================================================================== This broker reads an input data file and stores it in the database. No pre-processing is performed. Broker Inputs: 1. Input file path 2. XML descriptor file path The path to the XML descriptor file which describes the data format of the Input Data File. For details on how to create an XML descriptor file, please see the "XML Descriptor Excerpt" document, which is taken from Part 2 of the downloadable Lexicon Tutorial. 3. Commit threshold How many lines of data to insert between executing database commit statements. This value will depend on how wide your data file is (how many attributes), and how large your input files can be. 4. Configuration directory The path to your Torque directory where a Torque.properties file is located. 5. Database name The name of the database within your Torque.properties file to connect to. 6. Cache file path (String) Optional. Set to null if not needed. The path to a cache file containing the necessary metadata. This metadata cache file should contain all metadata associated with the business object and non-ignored parameters referenced by the XML descriptor file, as well as all process lists, rules lists, and business rules associated with the process list being executed. If this value is not defined, the metadata will be read from the database connection defined by input values 4 and 5. 7. Archive directory The file loader saves a copy of your input file to this directory. It is renamed based on the processing date and time, and the name of the object being loaded. 8. Flag- use diff TRUE: only load file data that is new as compared to the last archived file. FALSE: load all data in the incoming file and perform no diff operation. |
OpenLexicon.org | Home