コード例 #1
0
ファイル: WMLogger.java プロジェクト: dubrsl/tolven
 @Override
 public void logEventCreated(LogEvent event) {
   if (event instanceof ActivationLogEvent) {
     ActivationLogEvent ale = (ActivationLogEvent) event;
     logger.debug("Fire rule '" + ale.getRule() + "' using: " + ale.getDeclarations());
   } else {
     logger.debug(event.toString());
   }
 }
コード例 #2
0
 /** {@inheritDoc} */
 public void logEventCreated(LogEvent logEvent) {
   switch (logEvent.getType()) {
     case LogEvent.BEFORE_RULEFLOW_CREATED:
       {
         RuleFlowLogEvent processEvent = (RuleFlowLogEvent) logEvent;
         ProcessInstanceLog log =
             new ProcessInstanceLog(
                 processEvent.getProcessInstanceId(), processEvent.getProcessId());
         bamLogger.createProcessInstanceLog(log);
         break;
       }
     case LogEvent.AFTER_RULEFLOW_COMPLETED:
       {
         RuleFlowLogEvent processEvent = (RuleFlowLogEvent) logEvent;
         bamLogger.updateProcessInstanceLog(processEvent.getProcessInstanceId());
         break;
       }
     case LogEvent.BEFORE_RULEFLOW_NODE_TRIGGERED:
       {
         RuleFlowNodeLogEvent nodeEvent = (RuleFlowNodeLogEvent) logEvent;
         NodeInstanceLog log =
             new NodeInstanceLog(
                 NodeInstanceLog.TYPE_ENTER,
                 nodeEvent.getProcessInstanceId(),
                 nodeEvent.getProcessId(),
                 nodeEvent.getNodeInstanceId(),
                 nodeEvent.getNodeId());
         bamLogger.createNodeInstanceLog(log);
         break;
       }
     case LogEvent.BEFORE_RULEFLOW_NODE_EXITED:
       {
         RuleFlowNodeLogEvent nodeEvent = (RuleFlowNodeLogEvent) logEvent;
         NodeInstanceLog log =
             new NodeInstanceLog(
                 NodeInstanceLog.TYPE_EXIT,
                 nodeEvent.getProcessInstanceId(),
                 nodeEvent.getProcessId(),
                 nodeEvent.getNodeInstanceId(),
                 nodeEvent.getNodeId());
         bamLogger.createNodeInstanceLog(log);
         break;
       }
     default:
       {
         // ignore all other events
         break;
       }
   }
 }
コード例 #3
0
ファイル: WMLogger.java プロジェクト: dubrsl/tolven
 @Override
 public boolean acceptEvent(LogEvent event) {
   if (event.getType() == LogEvent.AFTER_ACTIVATION_FIRE) return true;
   //		if (event.getType()==LogEvent.ACTIVATION_CREATED) return true;
   return false;
 }