Openbravo Issue Tracking System - Modules
View Issue Details
0058201ModulesOpenbravo Business APIpublic2025-03-11 12:482025-03-11 17:14
caristu 
caristu 
highminorhave not tried
newopen 
5
 
 
open
No
0058201: Support triggering Push API events from DAL observers for newly created records
Currently is not supported to trigger Push API event from a DAL observer (event handler) for newly created records
1) Create a DAL observer, i.e., a class extending EntityPersistenceEventObserver with a method to be executed when a new record is created
2) Implement the method by triggering a Push API event:

onSave(@Observes EntityNewEvent event) {
  ...
  if (!isValidEvent(event)) {
    return;
  }
  final BaseOBObject bob = (BaseOBObject) event.getTargetInstance();
  SynchronizationEvent.getInstance().triggerEvent("TEST_Event", bob.getId());
}

3) Create an event subscription for the Push API event triggered by the observer
4) Create a new record so the new observer is executed. Note that no event is eventually sent.
No tags attached.
Issue History
2025-03-11 12:48caristuNew Issue
2025-03-11 12:48caristuAssigned To => caristu
2025-03-11 12:48caristuOBNetwork customer => No
2025-03-11 13:20hgbotMerge Request Status => open
2025-03-11 13:20hgbotNote Added: 0176666
2025-03-11 17:14hgbotNote Added: 0176681

Notes
(0176666)
hgbot   
2025-03-11 13:20   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1581 [^]
(0176681)
hgbot   
2025-03-11 17:14   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/merge_requests/443 [^]