Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Dec 18, 2017
1 parent ff9be2a commit 2022c4b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ Rule weatherRule = new MVELRule()
.then("System.out.println(\"It rains, take an umbrella!\");");
```

#### Or using a rule descriptor:

Like in the following `weather-rule.yml` example file:

```yaml
name: "weather rule"
description: "if it rains then take an umbrella"
condition: "rain == true"
actions:
- "System.out.println(\"It rains, take an umbrella!\");"
```
```java
Rule weatherRule = MVELRuleFactory.createRuleFrom(new File("weather-rule.yml"));
```

### 2. Then, fire it!

```java
Expand Down

0 comments on commit 2022c4b

Please sign in to comment.