<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>SystemEvent  TYPE_DELETE dont working</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119610420" />
  <subtitle>SystemEvent  TYPE_DELETE dont working</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119610420</id>
  <updated>2026-10-15T12:00:24Z</updated>
  <dc:date>2026-10-15T12:00:24Z</dc:date>
  <entry>
    <title>RE: SystemEvent  TYPE_DELETE dont working</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119632746" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119632746</id>
    <updated>2020-07-22T15:17:50Z</updated>
    <published>2020-07-22T15:17:50Z</published>
    <summary type="html">I could fix it. The problem was that I was calling to deleteProduct(Product product) without the interface attribute. The right way is using  productLocalService.deleteProduct(Product product) .</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2020-07-22T15:17:50Z</dc:date>
  </entry>
  <entry>
    <title>SystemEvent  TYPE_DELETE dont working</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119610419" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119610419</id>
    <updated>2020-07-17T16:09:15Z</updated>
    <published>2020-07-17T16:09:15Z</published>
    <summary type="html">I&amp;#39;m using the event to can have the deletes events marked for future export / import data. this is working for one model and for the other one is not working. The only difference is one model has a ModelPortletDataHandler related and the other one dont. Is working for ProductPresentation. This is the one dont have the PortletDataHandler related. Here is the code:&lt;br /&gt;&lt;br /&gt;Appreciate any help. Thanks!&lt;br /&gt;&lt;br /&gt;***********************ProductLocalServiceImpl class ***********************************************************&lt;br /&gt;/***&lt;br /&gt;	 * Delete product and relations&lt;br /&gt;	 * @param productId&lt;br /&gt;	 * @return&lt;br /&gt;	 */&lt;br /&gt;	@Override&lt;br /&gt;	@Indexable(type = IndexableType.DELETE)&lt;br /&gt;	public Product deleteProduct(long productId) throws PortalException {&lt;br /&gt;&lt;br /&gt;		Product product = getProduct(productId);&lt;br /&gt;		deleteProduct(product);&lt;br /&gt;&lt;br /&gt;		return product;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	/***&lt;br /&gt;	 * Delete product and relations&lt;br /&gt;	 * @param product the product&lt;br /&gt;	 * @return&lt;br /&gt;	 */&lt;br /&gt;	@Indexable(type = IndexableType.DELETE)&lt;br /&gt;	@Override&lt;br /&gt;	@SystemEvent(type = SystemEventConstants.TYPE_DELETE)&lt;br /&gt;	public Product deleteProduct(Product product) {&lt;br /&gt;		//delete product&lt;br /&gt;		super.deleteProduct(product);&lt;br /&gt;//remove product presentations&lt;br /&gt;productPresentationLocalService.deleteByProductId(product.getProductId());&lt;br /&gt;&lt;br /&gt;//delete article and successCase products&lt;br /&gt;articleLocalService.clearProductArticles(product.getProductId());&lt;br /&gt;successCaseLocalService.clearProductSuccessCases(product.getProductId());&lt;br /&gt;&lt;br /&gt;return product;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;**************************************** ***********************************************************&lt;br /&gt;***********************ProductPresentationLocalServiceImpl class ***********************************************************&lt;br /&gt;		&lt;br /&gt;	 @Override&lt;br /&gt;    @Indexable(type = IndexableType.DELETE)&lt;br /&gt;    public ProductPresentation deleteProductPresentation(long productPresentationId) throws PortalException {&lt;br /&gt;        ProductPresentation productPresentation = getProductPresentation(productPresentationId);&lt;br /&gt;&lt;br /&gt;        return deleteProductPresentation(productPresentation);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    @Indexable(type = IndexableType.DELETE)&lt;br /&gt;    @Override&lt;br /&gt;    @SystemEvent(type = SystemEventConstants.TYPE_DELETE)&lt;br /&gt;    public ProductPresentation deleteProductPresentation(ProductPresentation productPresentation) {&lt;br /&gt;        return super.deleteProductPresentation(productPresentation);&lt;br /&gt;    }</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2020-07-17T16:09:15Z</dc:date>
  </entry>
</feed>
