我已经部署了警报配置。当我从查询控制台运行警报配置时,它可以工作。以下是我进行测试的方式
xquery version "1.0-ml";
import module namespace alert = "http://marklogic.com/xdmp/alert"
at "/MarkLogic/alert.xqy";
let $uri := 'http://rdf.abbvienet.com/entity/wos/article/WOS:000440934600004'
return alert:invoke-matching-actions('clinical-trial-guidelines-alert-config',
fn:doc($uri), <options/>)
但是当我通过CPF
启用Alerting
时似乎无效吗?当我查看文档的CPF
状态时,它仍然显示alerted
..不确定我在做什么错..
<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
<cpf:processing-status xmlns:cpf="http://marklogic.com/cpf">done</cpf:processing-status>
<cpf:property-hash xmlns:cpf="http://marklogic.com/cpf">fcb929aed3697ee9634bfc16216cf5e9</cpf:property-hash>
<cpf:last-updated xmlns:cpf="http://marklogic.com/cpf">2018-09-03T15:05:42.166852Z</cpf:last-updated>
<cpf:state xmlns:cpf="http://marklogic.com/cpf">http://marklogic.com/states/alerted</cpf:state>
<cpf:self xmlns:cpf="http://marklogic.com/cpf">http://rdf.abbvienet.com/entity/wos/article/WOS:000440934600004</cpf:self>
<prop:last-modified>2018-09-03T15:05:42Z</prop:last-modified>
</prop:properties>
我的规则很简单cts:word-query('*', ('wildcarded'))
..
我通过mlGradle
(DHF版本)部署了规则配置。
plugins {
id 'java'
id "net.saliman.properties" version "1.4.6"
id 'com.marklogic.ml-data-hub' version '2.0.4'
}
出于完整性考虑,我还包括了我的警报配置
Domain configuration
{
"domain-name": "clinical-trial-guidelines-domain",
"description": "CPF domain for Clinical Trial Guidelines Alert",
"scope": "collection",
"uri": "http://rdf.abbvienet.com/entity/wos/article",
"eval-module": "%%MODULES_DATABASE%%",
"eval-root": "/",
"pipeline":["Status Change Handling", "Alerting (spawn)"]
}
我从Marklogic服务器复制的管道xml(alerting-spawn.xml
)。
Alert config
<alert-config-properties xmlns="http://marklogic.com/manage/alert-config/properties">
<uri>clinical-trial-guidelines-alert-config</uri>
<name>Clinical Trial Guidelines Alerting</name>
<description>Alerting config for this</description>
<triggers />
<domains>
<domain>clinical-trial-guidelines-domain</domain>
</domains>
<options>
<option>unfiltered</option>
</options>
</alert-config-properties>
我不确定为什么我的警报不起作用。.关于我可能做错了什么的任何想法?