7 Replies Latest reply: Jun 25, 2013 3:54 AM by 846590 RSS

    Haley Determination Engine DataSource Connector

    846590
      Hi,

      Please refer me some sample codes regarding Haley Determination Engine DataSource Connector.


      Thanks,
      Abhishek

      Edited by: abhishek on Jun 4, 2013 1:08 AM
        • 1. Re: Haley Determination Engine DataSource Connector
          Frank.Hampshire-Oracle
          abhishek wrote:
          Hi,

          Please refer me some sample codes regarding Haley Determination Engine DataSource Connector.


          Thanks,
          Abhishek

          Edited by: abhishek on Jun 4, 2013 1:08 AM
          Hi Abhishek,

          What version do you need samples for. The Haley DSC has not been replaced recently by the Batch Processor in version 10.4.

          Cheers
          Frank
          • 2. Re: Haley Determination Engine DataSource Connector
            846590

            Hi Frank, Thanks for reply.

            Actually I am working on datasourceconnector  to process some csv files as an  input.

             

            But when I am executing the bat file. I am facing following issue in log.

             

            2013-06-20 11:26:25,893 [main] INFO com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\conf\configuration.xml.

            2013-06-20 11:26:26,020 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Started Working =====

            2013-06-20 11:26:26,088 [main] ERROR com.haley.determinations.connector.DataSourceConnector -

            java.sql.SQLException: no such table: emi

              at org.sqlite.DB.throwex(DB.java:291)

              at org.sqlite.NativeDB.prepare(Native Method)

              at org.sqlite.DB.prepare(DB.java:117)

              at org.sqlite.PrepStmt.<init>(PrepStmt.java:40)

              at org.sqlite.Conn.prepareStatement(Conn.java:223)

              at org.sqlite.Conn.prepareStatement(Conn.java:216)

              at org.sqlite.Conn.prepareStatement(Conn.java:205)

              at com.haley.determinations.connector.DatabasePreLoader.populateValues(Unknown Source)

              at com.haley.determinations.connector.DatabasePreLoader.loadCSVFile(Unknown Source)

              at com.haley.determinations.connector.DatabasePreLoader.loadFromConfig(Unknown Source)

              at com.haley.determinations.connector.DataSourceConnector.kickOff(Unknown Source)

              at com.haley.determinations.connector.DataSourceConnector.main(Unknown Source)

             

             

            I have already kept the emi.csv at appropriate location.

             

            Actually I am new in this era. please help me.

             

            Regards,

            Abhishek

            • 3. Re: Haley Determination Engine DataSource Connector
              Frank.Hampshire-Oracle

              Abhishek,

               

              The Haley DSC is very old and has been replaced by the Batch Processor, which is much easier to use and does exactly the same thing. I would suggest that, if possible, you upgrade to 10.4 and use the Batch Processor

               

              Can you let me know what version of the DSC you are using so I can try and track down some example.

               

              Cheers

              Frank

              • 4. Re: Haley Determination Engine DataSource Connector
                846590

                Hi Frank,

                 

                Thanks for the reply. I am working on a Project where they are using 9.2 Haley. we are calculating invoices in DSC. so I started learning the same.

                I am facing following issue while working on a example.

                 

                ===== Started Working =====

                2013-06-20 13:58:29,064 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Acquired SQL conncection jdbc:sqlite:1371707908864.dsc.db.

                2013-06-20 13:58:29,065 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\parent.xml.

                2013-06-20 13:58:29,082 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\emi.xml.

                2013-06-20 13:58:29,100 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE parent (DSC_ID Integer UNIQUE, "person_id")' has been executed.

                2013-06-20 13:58:29,134 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE emi (DSC_ID Integer UNIQUE, "emi", "emi_id", "interval", "totalemi")' has been executed.

                2013-06-20 13:58:29,135 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading headers.

                2013-06-20 13:58:29,135 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                2013-06-20 13:58:29,138 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 1

                2013-06-20 13:58:29,139 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 2

                2013-06-20 13:58:29,139 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 3

                2013-06-20 13:58:29,139 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table parent.

                2013-06-20 13:58:29,144 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                2013-06-20 13:58:29,145 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                2013-06-20 13:58:29,146 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3,

                2013-06-20 13:58:29,146 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 23, 2, 4,

                2013-06-20 13:58:29,147 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 23, 3, 4,

                2013-06-20 13:58:29,147 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table emi.

                2013-06-20 13:58:29,151 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                2013-06-20 13:58:29,151 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading values.

                2013-06-20 13:58:29,155 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_person_id_parent on parent ("person_id")' has been executed.

                2013-06-20 13:58:29,160 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_emi_id_emi on emi ("emi_id")' has been executed.

                2013-06-20 13:58:29,411 [main] INFO com.haley.determinations.connector.DataSourceConnector - Started processing

                2013-06-20 13:58:29,582 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - SELECT * FROM emi WHERE emi_id = '1'

                2013-06-20 13:58:29,606 [Thread-1] ERROR com.haley.determinations.connector.DataSourceConnector - Failed to create Relationship from emi to global called person's emi

                java.util.zip.DataFormatException: Failed to create Relationship from emi to global called person's emi

                  at com.haley.determinations.connector.RulebaseHandler.populateEntities(Unknown Source)

                  at com.haley.determinations.connector.RulebaseHandler.populateEntities(Unknown Source)

                  at com.haley.determinations.connector.RulebaseHandler.processSet(Unknown Source)

                  at com.haley.determinations.connector.DatabaseLoader.processRecords(Unknown Source)

                  at com.haley.determinations.connector.DatabaseLoader.run(Unknown Source)

                  at java.lang.Thread.run(Unknown Source)

                2013-06-20 13:58:29,607 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - The database loader thread with id 9 has ended normally.

                2013-06-20 13:58:29,607 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with id 8 has received 1 permits. Time to exit thread.

                2013-06-20 13:58:31,108 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with 8 has exited normally.

                2013-06-20 13:58:31,122 [main] INFO com.haley.determinations.connector.DataSourceConnector - Finished processing

                2013-06-20 13:58:31,122 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Finished Working =====

                 

                Image of data model

                https://lh4.ggpht.com/Gpv4dWzQzW4rq7uXNrfLxICDX1qVAb2YP9HBuSBrzNqa1O74IdNY38VK3NA1bfWqpBpxpQ=s147

                 

                 

                I will request you to please provide me your gmail id . so that I can ask a help from you. It will be really help for me and I am not getting any help from any other source.

                 

                Thanks,

                Abhishek

                +65 93543692

                • 5. Re: Haley Determination Engine DataSource Connector
                  846590

                  Hi Frank,

                      the above message is not coming when I removed the relationship tag from configuration.xml and I removed the relatiionship in rule also. Please help me to understand how it is working.

                   

                  Now there is no error but still what i want to perform is not happening.

                   

                  Configuration.xml

                  <?xml version="1.0" encoding="utf-8"?>
                  <configuration xmlns="http://haley.com/determinations/connector/data-source">
                     <threads value="1" />
                     <run-limit value="2" />
                     <time-out value="1500" />
                     <data-sources>
                        <tables type="csv" delimiter=',' sequential="false" include-headers="false">
                    <table location="..\data\parent.csv" />      
                    <table location="..\data\emi.csv" />
                        </tables>
                        <rulebase location="C:\haleyprojects\Development\output\RoundFunction.xml" global-table="parent" set-uncertain="true" />
                     </data-sources>
                     <data-mappings>
                    <attributes>
                    <attribute type="number" source-field="person_id" target-attr="person_id" source-table="parent" target-entity="global" output="false" />           
                    <attribute type="number" source-field="emi" target-attr="emi" source-table="emi" target-entity="emi" output="false" />
                    <attribute type="number" source-field="emi_id" target-attr="emi_id" source-table="emi" target-entity="emi" output="false" />
                    <attribute type="number" source-field="interval" target-attr="interval" source-table="emi" target-entity="emi" output="false" />
                    <attribute type="number" source-field="totalemi" source-table="emi" target-attr="totalemi" target-entity="emi" ordinality="4" output="true" />     
                    </attributes>
                    <relationships>
                             <relationship source-table="parent" target-table="emi" source-entity="global" target-entity="emi" type="1m" source-key="person_id" target-key="emi_id" name="the emi's" reverse-name="reverse_emi"/>
                        </relationships>
                     </data-mappings>
                     <output type="csv" location="..\output" overwrite="true" />
                  </configuration>



                  emi.csv

                  10,,3,5
                  10,,3,5
                  10,,3,5

                   

                  emi.xml

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <table name="emi" xmlns="http://haley.com/determinations/connector/data-source/table">
                     <columns>
                        <column header="emi" ordinality="1" />
                        <column header="emi_id" ordinality="2" />
                        <column header="interval" ordinality="3" />
                        <column header="totalemi" ordinality="4" />
                     </columns>
                  </table>

                   

                  parent.csv

                   

                  1

                  2

                  3

                   

                  parent.xml

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <table name="parent" xmlns="http://haley.com/determinations/connector/data-source/table">
                     <columns>
                        <column header="person_id" ordinality="1" />
                     </columns>
                  </table>

                   

                  RoundFunction.xml

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <rulebase xmlns="http://haley.com/determinations/engine/relational/rulebase">
                    <entity text="Global" name="global" singleton="true">
                      <attribute name="person_id" type="Number" />
                    </entity>
                    <entity text="the emi" name="emi" singleton="false">
                      <attribute name="emi" type="Currency" />
                      <attribute name="totalemi" type="Currency" />
                      <attribute name="emi_id" type="Number" />
                      <attribute name="interval" type="Number" />
                    </entity>
                    <relationship relationship-id="emis" relationship-text="the emi's" reverse-relationship-id="global_emis_rev" source="global" target="emi" type="OneToMany" is-implicit="false" />
                    <rules>
                      <conclude attr-id="totalemi" entity-id="emi">
                        <value>
                          <round>
                            <multiply>
                              <attribute attr-id="emi" />
                              <attribute attr-id="interval" />
                            </multiply>
                            <number-value>2</number-value>
                          </round>
                        </value>
                      </conclude>
                    </rules>
                  </rulebase>

                   

                   

                  Log:

                   

                  2013-06-21 16:00:40,770 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Started Working =====

                  2013-06-21 16:00:40,814 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Acquired SQL conncection jdbc:sqlite:1371801640469.dsc.db.

                  2013-06-21 16:00:40,815 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\parent.xml.

                  2013-06-21 16:00:40,826 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\emi.xml.

                  2013-06-21 16:00:40,843 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE parent (DSC_ID Integer UNIQUE, "person_id")' has been executed.

                  2013-06-21 16:00:40,850 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE emi (DSC_ID Integer UNIQUE, "emi", "emi_id", "interval", "totalemi")' has been executed.

                  2013-06-21 16:00:40,850 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading headers.

                  2013-06-21 16:00:40,851 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                  2013-06-21 16:00:40,853 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 1

                  2013-06-21 16:00:40,853 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 2

                  2013-06-21 16:00:40,853 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 3

                  2013-06-21 16:00:40,853 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table parent.

                  2013-06-21 16:00:40,859 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                  2013-06-21 16:00:40,860 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                  2013-06-21 16:00:40,861 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,861 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,861 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,861 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,862 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,862 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,862 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,862 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,862 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,863 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,863 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,863 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,863 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,863 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:00:40,863 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table emi.

                  2013-06-21 16:00:40,867 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                  2013-06-21 16:00:40,868 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading values.

                  2013-06-21 16:00:40,872 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_person_id_parent on parent ("person_id")' has been executed.

                  2013-06-21 16:00:40,878 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_emi_id_emi on emi ("emi_id")' has been executed.

                  2013-06-21 16:00:40,976 [main] INFO com.haley.determinations.connector.DataSourceConnector - Started processing

                  2013-06-21 16:00:43,237 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - SELECT * FROM emi WHERE emi_id = '1'

                  2013-06-21 16:00:43,249 [Thread-1] ERROR com.haley.determinations.connector.DataSourceConnector - Index: 0, Size: 0

                  java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

                    at java.util.ArrayList.rangeCheck(Unknown Source)

                    at java.util.ArrayList.get(Unknown Source)

                    at com.haley.determinations.connector.RulebaseHandler.populateEntities(Unknown Source)

                    at com.haley.determinations.connector.RulebaseHandler.processSet(Unknown Source)

                    at com.haley.determinations.connector.DatabaseLoader.processRecords(Unknown Source)

                    at com.haley.determinations.connector.DatabaseLoader.run(Unknown Source)

                    at java.lang.Thread.run(Unknown Source)

                  2013-06-21 16:00:43,251 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - The database loader thread with id 9 has ended normally.

                  2013-06-21 16:00:43,251 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with id 8 has received 1 permits. Time to exit thread.

                  2013-06-21 16:00:44,752 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with 8 has exited normally.

                  2013-06-21 16:00:44,766 [main] INFO com.haley.determinations.connector.DataSourceConnector - Finished processing

                  2013-06-21 16:00:44,768 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Finished Working =====

                  Objective of above example is to learn the round function on CSV. the output folder should have emi.csv with populated totalemi field.

                   

                  Help me to create this basic example,.

                  Update:

                  I changed the emi.csv as following and I am getting different error in log.Please help me understand this.

                  When I use the  follwoing emi.csv

                   

                  10,1,1,5

                  10,2,2,5

                  10,3,3,5

                  10,3,3,5

                  10,2,3,5

                  10,1,3,5

                  10,2,3,5

                  10,3,3,5

                  10,1,3,5

                  10,1,3,5

                  10,1,3,5

                  10,1,3,5

                  10,1,3,5

                  10,1,3,5

                   

                  Logs are following

                  2013-06-21 16:18:05,370 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Started Working =====

                  2013-06-21 16:18:05,395 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Acquired SQL conncection jdbc:sqlite:1371802685130.dsc.db.

                  2013-06-21 16:18:05,395 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\parent.xml.

                  2013-06-21 16:18:05,406 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\emi.xml.

                  2013-06-21 16:18:05,430 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE parent (DSC_ID Integer UNIQUE, "person_id")' has been executed.

                  2013-06-21 16:18:05,435 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE emi (DSC_ID Integer UNIQUE, "emi", "emi_id", "interval", "totalemi")' has been executed.

                  2013-06-21 16:18:05,435 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading headers.

                  2013-06-21 16:18:05,436 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                  2013-06-21 16:18:05,438 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 1

                  2013-06-21 16:18:05,438 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 2

                  2013-06-21 16:18:05,439 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 3

                  2013-06-21 16:18:05,439 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table parent.

                  2013-06-21 16:18:05,444 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                  2013-06-21 16:18:05,444 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                  2013-06-21 16:18:05,445 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 1, 5

                  2013-06-21 16:18:05,445 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 2, 2, 5

                  2013-06-21 16:18:05,446 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 3, 3, 5

                  2013-06-21 16:18:05,446 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 3, 3, 5

                  2013-06-21 16:18:05,446 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 2, 3, 5

                  2013-06-21 16:18:05,446 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,446 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 2, 3, 5

                  2013-06-21 16:18:05,446 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 3, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, 1, 3, 5

                  2013-06-21 16:18:05,447 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table emi.

                  2013-06-21 16:18:05,452 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                  2013-06-21 16:18:05,452 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading values.

                  2013-06-21 16:18:05,458 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_person_id_parent on parent ("person_id")' has been executed.

                  2013-06-21 16:18:05,462 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_emi_id_emi on emi ("emi_id")' has been executed.

                  2013-06-21 16:18:05,625 [main] INFO com.haley.determinations.connector.DataSourceConnector - Started processing

                  2013-06-21 16:18:05,635 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - SELECT * FROM emi WHERE emi_id = '1'

                  2013-06-21 16:18:05,647 [Thread-1] ERROR com.haley.determinations.connector.DataSourceConnector - Failed to create Relationship from emi to global called reverse_emi

                  java.util.zip.DataFormatException: Failed to create Relationship from emi to global called reverse_emi

                    at com.haley.determinations.connector.RulebaseHandler.populateEntities(Unknown Source)

                    at com.haley.determinations.connector.RulebaseHandler.populateEntities(Unknown Source)

                    at com.haley.determinations.connector.RulebaseHandler.processSet(Unknown Source)

                    at com.haley.determinations.connector.DatabaseLoader.processRecords(Unknown Source)

                    at com.haley.determinations.connector.DatabaseLoader.run(Unknown Source)

                    at java.lang.Thread.run(Unknown Source)

                  2013-06-21 16:18:05,648 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - The database loader thread with id 9 has ended normally.

                  2013-06-21 16:18:05,648 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with id 8 has received 1 permits. Time to exit thread.

                  2013-06-21 16:18:07,150 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with 8 has exited normally.

                  2013-06-21 16:18:07,168 [main] INFO com.haley.determinations.connector.DataSourceConnector - Finished processing

                  2013-06-21 16:18:07,169 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Finished Working =====

                   

                  when I use the following emi.csv

                   

                  10,,1,5

                  10,,2,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                  10,,3,5

                   

                  2013-06-21 16:19:56,192 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Started Working =====

                  2013-06-21 16:19:56,218 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Acquired SQL conncection jdbc:sqlite:1371802795941.dsc.db.

                  2013-06-21 16:19:56,219 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\parent.xml.

                  2013-06-21 16:19:56,235 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Processing file C:\haleyprojects\Development\Examples\RoundFunction\bin\..\data\emi.xml.

                  2013-06-21 16:19:56,258 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE parent (DSC_ID Integer UNIQUE, "person_id")' has been executed.

                  2013-06-21 16:19:56,264 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE TABLE emi (DSC_ID Integer UNIQUE, "emi", "emi_id", "interval", "totalemi")' has been executed.

                  2013-06-21 16:19:56,264 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading headers.

                  2013-06-21 16:19:56,264 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                  2013-06-21 16:19:56,267 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 1

                  2013-06-21 16:19:56,267 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 2

                  2013-06-21 16:19:56,267 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO parent VALUES (?, ?) values 3

                  2013-06-21 16:19:56,267 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table parent.

                  2013-06-21 16:19:56,271 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                  2013-06-21 16:19:56,272 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Started Reading Set -

                  2013-06-21 16:19:56,273 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 1, 5

                  2013-06-21 16:19:56,273 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 2, 5

                  2013-06-21 16:19:56,273 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,273 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,274 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,274 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,274 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,274 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,275 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,275 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,275 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,275 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,276 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,276 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - INSERT INTO emi VALUES (?, ?, ?, ?, ?) values 10, , 3, 5

                  2013-06-21 16:19:56,276 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The rows are inserted to table emi.

                  2013-06-21 16:19:56,280 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - - Finished Reading Set -

                  2013-06-21 16:19:56,280 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - Finished loading values.

                  2013-06-21 16:19:56,285 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_person_id_parent on parent ("person_id")' has been executed.

                  2013-06-21 16:19:56,289 [main] DEBUG com.haley.determinations.connector.DataSourceConnector - The sql 'CREATE INDEX IDX_emi_id_emi on emi ("emi_id")' has been executed.

                  2013-06-21 16:19:56,447 [main] INFO com.haley.determinations.connector.DataSourceConnector - Started processing

                  2013-06-21 16:19:56,459 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - SELECT * FROM emi WHERE emi_id = '1'

                  2013-06-21 16:19:56,470 [Thread-1] ERROR com.haley.determinations.connector.DataSourceConnector - Index: 0, Size: 0

                  java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

                    at java.util.ArrayList.rangeCheck(Unknown Source)

                    at java.util.ArrayList.get(Unknown Source)

                    at com.haley.determinations.connector.RulebaseHandler.populateEntities(Unknown Source)

                    at com.haley.determinations.connector.RulebaseHandler.processSet(Unknown Source)

                    at com.haley.determinations.connector.DatabaseLoader.processRecords(Unknown Source)

                    at com.haley.determinations.connector.DatabaseLoader.run(Unknown Source)

                    at java.lang.Thread.run(Unknown Source)

                  2013-06-21 16:19:56,472 [Thread-1] DEBUG com.haley.determinations.connector.DataSourceConnector - The database loader thread with id 9 has ended normally.

                  2013-06-21 16:19:56,472 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with id 8 has received 1 permits. Time to exit thread.

                  2013-06-21 16:19:57,972 [Thread-0] DEBUG com.haley.determinations.connector.DataSourceConnector - The output writer thread with 8 has exited normally.

                  2013-06-21 16:19:57,991 [main] INFO com.haley.determinations.connector.DataSourceConnector - Finished processing

                  2013-06-21 16:19:57,993 [main] INFO com.haley.determinations.connector.DataSourceConnector - ===== Finished Working =====

                   

                  Regards,

                  Abhishek

                  • 6. Re: Haley Determination Engine DataSource Connector
                    Frank.Hampshire-Oracle

                    Abhishek,


                    Looking at the information provided, I would say that your emi_id in the emi_csv each case needs to be provided, and needs to be unique.


                    Also, check your configuration, I think the relationship ids mentioned below


                    <relationship source-table="parent" target-table="emi" source-entity="global" target-entity="emi" type="1m" source-key="person_id" target-key="emi_id" name="the emi's" reverse-name="reverse_emi"/>


                    Should probably be: name="emis" reverse-name="global_emis_rev"

                     

                    One again, I will point out that the DSC for 9.2 is really old. We don't support versions going back older than 9.4.1


                    • 7. Re: Haley Determination Engine DataSource Connector
                      846590

                      Thanks Frank,

                       

                      I managed to run the example.... and found the cause also. I was using wrong relationship mapping.

                       

                      Regards,

                      Abhishek