所有文档

          规则引擎 Rule Engine

          查看已经创建的规则

          获取所有规则名称和ID

          请参考以下代码获取所有规则:

          RuleEngineClient client = new RuleEngineClient(accessKey, secretKey);
          
          int pageNo = 1;
          ListRuleResponse response = null;
          do {
          	ListRuleRequest request = new ListRuleRequest();
          	request.setPageNo(pageNo++);
          	response = client.listRules(request);
          
          	for (Rule rule : response.getResult()) {
          		System.out.println(String.format("name=%s, id=%s", rule.getName(), rule.getUuid()));
          	}
          } while (response != null && response.getTotalCount() > response.getPageNo() * response.getPageSize());

          获取一条规则的详情

          请参考以下代码获取一条规则的详情:

          // 创建client
          RuleEngineClient client = new RuleEngineClient(accessKey, secretKey);
          
          // 规则id
          String ruleId = "your rule id here";
          Rule rule = client.getRule(ruleId);
          
          System.out.println(rule.getName());
          上一篇
          创建-删除-修改规则
          下一篇
          禁用-启用一条规则