我们有很多活动
detail-type
。我们需要一个 event rule
来触发 "notify"
事件详细信息类型。以下是所有可能的事件详细信息类型的列表:
com.experian.dcm.input-portfolio-created:v1
com.experian.dcm.published-portfolio-created:v1
com.experian.dcm.published-portfolio:v1
com.experian.dcm.portfolio-preparation.tolerance-check.notify.failure:v1
com.experian.dcm.portfolio-preparation.tolerance-check.notify.success:v1
com.experian.dcm.portfolio-preparation.apply-threshold.notify.success:v1
com.experian.dcm.portfolio-preparation.apply-threshold.notify.failure:v1
com.experian.dcm.published-portfolio.mi-report.notify.success:v1
com.experian.dcm.published-portfolio.mi-report.notify.failure:v1
我们需要一个足够通用的
custom event rule
来触发以下事件detail-type
(具有"notify"
)并阻止所有其他事件detail-type
。
com.experian.dcm.portfolio-preparation.tolerance-check.notify.failure:v1
com.experian.dcm.portfolio-preparation.tolerance-check.notify.success:v1
com.experian.dcm.portfolio-preparation.apply-threshold.notify.success:v1
com.experian.dcm.portfolio-preparation.apply-threshold.notify.failure:v1
com.experian.dcm.published-portfolio.mi-report.notify.success:v1
com.experian.dcm.published-portfolio.mi-report.notify.failure:v1
我使用
wildcard
选项来解决这个问题。 event rule
如下:
{
"detail": {
"id": [{
"exists": true
}],
"source": [{
"exists": true
}],
"specversion": [{
"exists": true
}],
"type": [{
"exists": true
}]
},
"detail-type": [{
"wildcard": "com.expert.efg.*.notify.*"
}],
"source": [
"source"
]
}