All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rule.rule.drl Maven / Gradle / Ivy

There is a newer version: 4.3.11
Show newest version
import com.zlyx.easy.drools.domain.RuleContextDomain;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *  @prop message string 结束标记
 */
 
 
rule "$rule_name"
when
    $ctx: RuleContextDomain();
then
    Logger log = LoggerFactory.getLogger("$rule_name");
	try {
		List list = Arrays.asList("a", "b");
		for (int i = 0; i < 6; i++) {
			System.out.println("第" + (i + 1) + "次输出 ->" + list.get(i % 2));
		}
	} catch (Exception e) {
		log.error(e.getMessage(), e);
	}
	log.info("{}", "$message");
end




© 2015 - 2024 Weber Informatics LLC | Privacy Policy