TCA Raise Events Program Generates Incorrect Sequence for Event ID (Doc ID 1609169.1)

Last updated on AUGUST 09, 2017

Applies to:

Oracle Trading Community - Version 12.1.3 and later
Information in this document applies to any platform.

Symptoms

You enabled the Business Events for Create Party and Party Relationships.

You run the "TCA Business Object Events: Raise Events Program" every one (1) minute to generate the event ID.
You see the program has generated the event ID for Create Relationship event, before the Create Party event.

Steps to Reproduce:
Responsibility:  Oracle Customers Online
Query up Customer (ie. Jackie Active Org)

 SQL>  select to_char(a.creation_date, 'DDMMYY hh24:mi:ss'),
 a.party_id,a.party_name, a.party_number from hz_parties a where
 a.party_name='JackieMelody';

 TO_CHAR(A.CREAT   PARTY_ID PARTY_NAME           PARTY_NUMBER
 --------------- ---------- -------------------- ------------
 200613 19:43:43    1143174 JackieMelody         69706

 SQL > select event_id, parent_entity_name, parent_id,child_id,child_entity_name,child_operation_flag,creation_date, last_update_date
 from hz_bus_obj_tracking
 where parent_id =1143174 or child_id = 1143174
 order by creation_date desc;

 29412 HZ_PARTIES 1143174 792542        HZ_RELATIONSHIPS   I 10-AUG-13 08-JUL-13
 29413 HZ_PARTIES 1143174 1000624964 HZ_CUST_ACCOUNTS U 10-AUG-13 08-JUL-13
 29412 HZ_PARTIES 1143174 433556        HZ_ORG_CONTACTS   I 10-AUG-13 08-JUL-13
 29412 HZ_PARTIES 1143174 793542        HZ_RELATIONSHIPS   I 10-AUG-13 08-JUL-13
 29412 HZ_PARTIES 1143174 432556        HZ_ORG_CONTACTS   I 10-AUG-13 08-JUL-13
 29412                   1143174                    HZ_PARTIES             U 10-AUG-13 08-JUL-13
 29413                   1143174                    HZ_PARTIES             U 10-AUG-13 08-JUL-13
 29235                   1143174                    HZ_PARTIES             U 26-JUN-13 20-JUN-13
 29234 HZ_PARTIES 1143174 963996        HZ_PARTY_SITES       I 26-JUN-13 20-JUN-13
 29235 HZ_PARTIES 1143174 1000624964 HZ_CUST_ACCOUNTS I 26-JUN-13 20-JUN-13
 29234 HZ_PARTIES 1143174 1042268       HZ_PARTY_USG_ASSIGNMENTS I 26-JUN-13 20-JUN-13
 29234                   1143174                    HZ_PARTIES             U 26-JUN-13 20-JUN-13
 29234 HZ_PARTIES 1143174 1719782       HZ_ORGANIZATION_PROFILES I 26-JUN-13 20-JUN-13

3. Create a new relationship with a new Org (ie. JackieMelody Sept23)

 SQL> select to_char(a.creation_date, 'DDMMYY hh24:mi:ss'),
 a.party_id,a.party_name, a.party_number from hz_parties a where a.party_name
 like 'JackieMelody Sept23%';

 TO_CHAR(A.CREAT   PARTY_ID PARTY_NAME           PARTY_NUMBER
 --------------- ---------- -------------------- ------------
 230913 21:03:58    1313163 JackieMelody Sept23  72178
 230913 21:03:59    1313165 JackieMelody Sept23- 72179
                            JackieMelody-72179
 
 SQL> select event_id, parent_entity_name, parent_id,child_id,
   child_entity_name,child_operation_flag,creation_date, last_update_date
   from hz_bus_obj_tracking
   where parent_id in (1313163, 1313165,1143174) or child_id in (1313163,1313165,1143174)
   order by creation_date desc;

29771 HZ_PARTIES 1313163 1968788      HZ_ORGANIZATION_PROFILES I 23-SEP-13 23-SEP-13
29771                   1313163                   HZ_PARTIES U 23-SEP-13 23-SEP-13
29770 HZ_PARTIES 1143174 891549       HZ_RELATIONSHIPS I 23-SEP-13 23-SEP-13
29772 HZ_PARTIES 1143174 1143174     HZ_PARTIES U 23-SEP-13 23-SEP-13
29771 HZ_PARTIES 1313163 891549       HZ_RELATIONSHIPS I 23-SEP-13 23-SEP-13
29770                   1143174                   HZ_PARTIES U 23-SEP-13 23-SEP-13
29772                   1143174                   HZ_PARTIES U 23-SEP-13 23-SEP-13
29413                   1143174                   HZ_PARTIES U 10-AUG-13 08-JUL-13
29413 HZ_PARTIES 1143174 1000624964 HZ_CUST_ACCOUNTS U 10-AUG-13 08-JUL-13
29412 HZ_PARTIES 1143174 433556        HZ_ORG_CONTACTS I 10-AUG-13 08-JUL-13
29412 HZ_PARTIES 1143174 432556        HZ_ORG_CONTACTS I 10-AUG-13 08-JUL-13
29412                   1143174                    HZ_PARTIES U 10-AUG-13 08-JUL-13
29412 HZ_PARTIES 1143174 792542         HZ_RELATIONSHIPS I 10-AUG-13 08-JUL-13
29412 HZ_PARTIES 1143174 793542         HZ_RELATIONSHIPS I 10-AUG-13 08-JUL-13
29234 HZ_PARTIES 1143174 963996         HZ_PARTY_SITES I 26-JUN-13 20-JUN-13
29235 HZ_PARTIES 1143174 1000624964  HZ_CUST_ACCOUNTS I 26-JUN-13 20-JUN-13
29234 HZ_PARTIES 1143174 1042268       HZ_PARTY_USG_ASSIGNMENTS I 26-JUN-13 20-JUN-13
29234                   1143174                    HZ_PARTIES U 26-JUN-13 20-JUN-13
29234 HZ_PARTIES 1143174 1719782       HZ_ORGANIZATION_PROFILES I 26-JUN-13 20-JUN-13
29235                   1143174                    HZ_PARTIES U 26-JUN-13 20-JUN-13

You will see HZ_RELATIONSHIP (Insert) event ID is 29770
HZ_PARTIES (update) event ID is 29772.
The HZ_PARTIES Insert for today's create is not seen.

select text from dba_source where name='HZ_BES_BO_RAISE_PKG' and line=2;
/*$Header: ARHBESRS.pls 120.0 2005/08/31 21:54:11 smattegu noship $ */
/*$Header: ARHBESRB.pls 120.9 2006/06/27 13:22:21 smattegu noship $ */

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms