class JexlRule extends BasicRule {

    static final JexlEngine DEFAULT_JEXL = new JexlBuilder().create();

    private Condition condition = Condition.FALSE;
    private final List<Action> actions = new ArrayList<>();
    private final JexlEngine jexl;

    public JexlRule() {
        this(DEFAULT_JEXL);
    }

    public JexlRule(JexlEngine jexl) {
        super(Rule.DEFAULT_NAME, Rule.DEFAULT_DESCRIPTION, Rule.DEFAULT_PRIORITY);
        this.jexl = Objects.requireNonNull(jexl, "jexl cannot be null");
    }

    public JexlRule name(String name) {
        this.name = Objects.requireNonNull(name, "name cannot be null");
        return this;
    }

    public JexlRule description(String description) {
        this.description = Objects.requireNonNull(description, "description cannot be null");
        return this;
    }

    public JexlRule priority(int priority) {
        this.priority = priority;
        return this;
    }

    public JexlRule when(String condition) {
        Objects.requireNonNull(condition, "condition cannot be null");
        this.condition = new JexlCondition(condition, jexl);
        return this;
    }

    public JexlRule then(String action) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean evaluate(Facts facts) {
        Objects.requireNonNull(facts, "facts cannot be null");
        return condition.evaluate(facts);
    }

    @Override
    public void execute(Facts facts) throws Exception {
        Objects.requireNonNull(facts, "facts cannot be null");
        for (Action action : actions) {
            action.execute(facts);
        }
    }
}

        Objects.requireNonNull(action, "action cannot be null");
        this.actions.add(new JexlAction(action, jexl));
        return this;
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.lang.String) ,public void <init>(java.lang.String, java.lang.String, int) ,public int compareTo(org.jeasy.rules.api.Rule) ,public boolean equals(java.lang.Object) ,public boolean evaluate(org.jeasy.rules.api.Facts) ,public void execute(org.jeasy.rules.api.Facts) throws java.lang.Exception,public java.lang.String getDescription() ,public java.lang.String getName() ,public int getPriority() ,public int hashCode() ,public void setDescription(java.lang.String) ,public void setPriority(int) ,public java.lang.String toString() <variables>protected java.lang.String description,protected java.lang.String name,protected int priority