ModelEventDelegate doesn't works with DocAction, PostCreate, PostUpdate and PostDelete annotation

Description

ModelEventDelegate doesn't works with DocAction, PostCreate, PostUpdate and PostDelete annotation due to the following issue:

  • DocActionEventData doesn’t implement the POEventData interface (check in the EventHelper.getPO(Event event) method).

  • EventManager.newEvent(String topic, Object data, boolean copySessionContext) method doesn’t set the TABLE_NAME_PROPERTY (use by PO to create the PostCreate, PostUpdate and PostDelete event).

To Test:

https://github.com/hengsin/idempiere-examples/tree/main/org.idempiere.event.annotation.example

Environment

None

Activity

Carlos Ruiz
changed the Status
July 4, 2024 at 9:36 PM
Resolved
Closed
Carlos Ruiz
updated the Fix versions
May 13, 2024 at 3:57 PM
None
11
Carlos Ruiz
changed the Status
May 6, 2024 at 1:58 PM
Peer Review Queue
Resolved
Carlos Ruiz
updated the Fix versions
May 6, 2024 at 1:58 PM
None
12
Carlos Ruiz
updated the Resolution
May 6, 2024 at 1:58 PM
None
Fixed
Heng Sin Low
changed the Status
May 6, 2024 at 5:19 AM
Open
Peer Review Queue
Heng Sin Low
updated the Description
May 6, 2024 at 5:16 AM
ModelEventDelegate doesn't works with DocAction, PostCreate, PostUpdate and PostDelete annotation due to the following issue: * {{DocActionEventData}} doesn’t implement the {{POEventData}} interface (check in the {{EventHelper.getPO(Event event)}} method). * {{EventManager.newEvent(String topic, Object data, boolean copySessionContext)}} method doesn’t set the {{TABLE_NAME_PROPERTY}} (use by PO to create the PostCreate, PostUpdate and PostDelete event).
ModelEventDelegate doesn't works with DocAction, PostCreate, PostUpdate and PostDelete annotation due to the following issue: * {{DocActionEventData}} doesn’t implement the {{POEventData}} interface (check in the {{EventHelper.getPO(Event event)}} method). * {{EventManager.newEvent(String topic, Object data, boolean copySessionContext)}} method doesn’t set the {{TABLE_NAME_PROPERTY}} (use by PO to create the PostCreate, PostUpdate and PostDelete event). To Test: [https://github.com/hengsin/idempiere-examples/tree/main/org.idempiere.event.annotation.example|https://github.com/hengsin/idempiere-examples/tree/main/org.idempiere.event.annotation.example|smart-link]
Heng Sin Low
created the Work item
May 6, 2024 at 5:15 AM
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created May 6, 2024 at 5:15 AM
Updated July 4, 2024 at 9:36 PM
Resolved May 6, 2024 at 1:58 PM