규칙 세트의 플러그인 작성

특정 규칙 세트의 엔진 이벤트를 격상하는 플러그인을 작성할 수 있습니다.

시작하기 전에

실행 추적을 사용하는 규칙 세트의 규칙 엔진 이벤트만 격상할 수 있습니다. 실행 추적을 사용하려면 Rule Execution Server 콘솔에서 해당 규칙 세트의 ruleset.trace.enabled 특성을 true로 설정하십시오.
참고: 순차 모드를 사용하는 태스크에서 알림을 받으려면 이 모드에 대해 디버깅을 사용 가능하게 해야 합니다.

이 태스크 정보

규칙 세트의 플러그인을 작성하려면 IlrRuleEngineEventPlugin 클래스를 확장해야 합니다.

프로시저

다음 코드를 작성하십시오.
public class MyRulesetPlugin extends EventPlugin {
   public static final String THIS_CANONICAL_RULESETPATH = "ThisRuleApp/1.0/ThisRuleset/1.0";
   public void ruleEngineEventRaised(IlrRuleEngineEvent event) {
   if (event.getCanonicalRulesetPath().equals(THIS_CANONICAL_RULESETPATH))
   {
      thisEngineEventRaised(event);
   }
   public void thisEngineEventRaised(IlrRuleEngineEvent event) {
      // code handling a rule engine event only for this ruleset
      [....]
   }
}