ilscipio/scipio-erp

View on GitHub
applications/solr/servicedef/secas.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/service-eca.xsd">

    <!-- 
        Sorl Product indexing stock/example SECAs
        If enabled, these ECAs enable automatic per-product solr reindexing upon
        various common Scipio Product operations. To enable the invoked service(s) globally, see
        the solrconfig.properties option solr.eca.enabled.
        See documentation for issues regarding implementation and context-specific issues
        (such as data loading/install).
        SEE ALSO ENTITY ECAs IN entitydef/eecas.xml
    -->

    <eca service="setLastInventoryCount" event="return">
        <condition field-name="productId" operator="is-not-empty"/>
        <set field-name="updateVirtual" value="true"/>
        <action service="scheduleProductIndexing" mode="sync"/>
    </eca>
    <eca service="setProductLastInventoryCount" event="return">
        <condition field-name="productId" operator="is-not-empty"/>
        <set field-name="updateVirtual" value="true"/>
        <action service="scheduleProductIndexing" mode="sync"/>
    </eca>

    <!-- (Insert any additional needed SECAs here) -->

</service-eca>