src/Service/doTriggerService.php
protected function matchCondition($doTrigger, $dataObj)
    {
        // evaluate expression
        $condExpr = $doTrigger->triggerCondition["Expression"];
        if ($condExpr) {
            $exprVal = Expression::evaluateExpression($condExpr, $dataObj);
            if ($exprVal !== true)
                return false;
        }
        // do query with extra search rule, check if there's any record returned
        $extraSearchRule = $doTrigger->triggerCondition["ExtraSearchRule"];
        if ($extraSearchRule) {
            $realSearchRule = Expression::evaluateExpression($extraSearchRule, $dataObj);
            $recordList = array();
            // get one record of the first page with additional searchrule
            $dataObj->fetchRecords($realSearchRule, $recordList, 1, 1, false);
            if (count($recordList) == 0)
                return false;
        }
        return true;
    }
protected function matchCondition($doTrigger, $dataObj)
    {
        // evaluate expression
        $condExpr = $doTrigger->triggerCondition["Expression"];
        if ($condExpr) {
            $exprVal = Expression::evaluateExpression($condExpr, $dataObj);
            if ($exprVal !== true)
                return false;
        }
        // do query with extra search rule, check if there's any record returned
        $extraSearchRule = $doTrigger->triggerCondition["ExtraSearchRule"];
        if ($extraSearchRule) {
            $realSearchRule = Expression::evaluateExpression($extraSearchRule, $dataObj);
            $recordList = array();
            // get one record of the first page with additional searchrule
            $dataObj->fetchRecords($realSearchRule, $recordList, 1, 1, false);
            if (count($recordList) == 0)
                return false;
        }
        return true;
    }
Match condition

@param DOTrigger $doTrigger
@param BizDataObj $dataObj
@return boolean