Modify Event Type fields

Document created by Mikel.Osinalde Employee on Oct 22, 2014Last modified by Mikel.Osinalde Employee on Oct 22, 2014
Version 2Show Document
  • View in full screen mode

Before modifying any field to an existing Event Type, we need to do some verification before, in order to avoid inconsistencies in the implementation.

We are going to run some SQL queries, but first we need to know the ID number of the Event Type that we want to change.


How to get the Event Type ID

Within the T_RAW_DATA table, aside from the encrypted raw data, is the EVENT_TYPE_ID, which is a numeric value assigned to each event type.

During our adapter creation, we create and assign a specific event type to each adapter.  After the adapter runs, we import the appropriate values to that specific event type, then translate the event to our translation table. Each event assigned to this event type will have the same EVENT_TYPE_ID within the T_RAW_DATA table

There is an utility called Raw Data Tools.  Open the utility, select File -> New and when the new window comes up click CLOSE. As the results come back, right click on the “ALL[***]” parent on the left hand side and select Drill down to the event_type_name. The result should give you the number of records associated with this specific event_type. You can also see the raw data records, where you can get the EVENT_TYPE_ID, as well as the decrypted raw data values.  This just helps in the verification process to make sure you are retrieving the actual data you want to delete.

  You can also get the EVENT_TYPE_ID through the following SQL query:

select event_type_id from t_event_types where event_type_name like '<EVENT NAME>')


Verifications before modifying the Event Type

  1. Usage in Alerts: Verify that no Alerts is using the Event Type to be deleted:
    select * from t_alerts where alert_all_type_id in (
    select * from t_alert_all_types where event_type_id = <EVENT ID> );
    Delete the alert if so.
  2. Usage in Corrections: Verify that no Corrections is using the Event Type to be deleted:
    select * from t_corrections where correction_id in (
    select * from t_correction_details where event_type_id = <EVENT ID> );
    Delete the Correction if so.
  3. Usage in Formulae: Check if the EventType is referred to in any of the following tables:

select * from t_formula_event_types where event_type_id = <EVENT ID> );

select * from t_formula_cluster_item_events where event_type_id = <EVENT ID> );

select * from t_formula_intermediate_events where event_type_id = <EVENT ID> );

select * from t_formula_events where event_type_id = <EVENT ID> );


Modify Event Type fields


  1. Stop following services:
    Oblicore - Psl Writer
    Oblicore - Adapters Listener
  2. Associated Adapters
    Stop any adapters using the Event Type

    Update the Event Type fields
    Update a the Adapters configuration accordingly
  3. Clear the output files
    The output files in the %OG_HOME%\Adapters\<ADAPTER NAME> directory –such as rejected events- are going to be saved using the old event type. And when it tries to load them in after changing the event type it will cause a failure.
    So we need to be sure that these files are cleared.
  4. Restart the adapters and  start the services


Forcing Contract Recalculation

After you are full satisfied with you update process, it is often times required that you force a recalculation of the contracts affected.  It is also recommended to recalculate the contracts one by one, make sure the contracts are correct and move on to the next contract.  This should only be applied to the contracts that would be affected due to update of raw data.