我正在使用easy-rulesJSON descriptor加载规则,并且我想在 easy Rules 中使用变量。例如,我有一组规则,其中定义了规则 id、名称、描述,如下所示actions
[
{
"id": 1,
"name": "Task using Oracle DB",
"description": "Updated comments to update connector",
"priority": 1,
"condition": "user.getTaskData().getTargetConnectorType().contains(\"Oracle\") || user.getTaskData().getSourceConnectorType().contains(\"Oracle\")",
"actions": [
"user.setRuleDetail([\"impacted_feature\":\"Task using Oracle DB\", \"desc\": \"Updated comments to update connector\", \"impact\":\"low\", \"count\":\"Using \"+user.getTaskDetail().getConnBucketData().get(\"Oracle\")+\" connector type\",\"id\":1, \"extra_detail\":\"{\\\"impacted_connectors\\\":[\\\"Oracle\\\"]}\"]);"
]
}
]
Run Code Online (Sandbox Code Playgroud)
这里可能有以下两件事
-> 使用规则name,description内部操作?
...
[
{
"id": 1,
"name": "Task using Oracle DB",
"description": "Updated comments to update connector",
"priority": 1,
"condition": "user.getTaskData().getTargetConnectorType().contains(\"Oracle\") || …Run Code Online (Sandbox Code Playgroud)