Skip to content

Commit 3e7fe6c

Browse files
Rename "existing rules file" to example rules (#335)
* Rename "existing rules file" to example rules.
1 parent bde3008 commit 3e7fe6c

File tree

5 files changed

+51
-41
lines changed

5 files changed

+51
-41
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Visit [Eiffel Community](https://eiffel-community.github.io) to get started and
5959
- [**Rule set up**](wiki/markdown/rules.md#Rule-set-up)
6060
- [**MergeResolverRules**](wiki/markdown/merge-resolver-rules.md)
6161
- [**History Rules**](wiki/markdown/history-rules.md)
62-
- [**Existing rules files**](wiki/markdown/existing-rules-files.md)
62+
- [**Example rules**](wiki/markdown/example-rules.md)
6363
- [**Mapping Rules To Aggregations**](wiki/markdown/mapping-rules-to-aggregations.md)
6464
4. [**Step by Step Aggregation on Eiffel events**](wiki/markdown/step-by-step-aggregation.md)
6565
- [**ArtifactCreatedEvent Aggregation**](wiki/markdown/artifact-created-event-aggregation.md)

wiki/markdown/example-rules.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Example rules
2+
3+
We have created some example rules that represent use cases which triggered
4+
the development of Eiffel Intelligence. The files containing the rules
5+
can be found [**here**](https://github.com/eiffel-community/eiffel-intelligence/tree/master/src/main/resources/rules).
6+
7+
We have also illustrated the Eiffel event flows which these example rules
8+
need, to perform the aggregation. The illustrations contain the events
9+
and how they are linked together.
10+
11+
## Flow with the events required for Artifact object flow.
12+
13+
<img src="images/ArtifactRules.png">
14+
</img>
15+
16+
## Flow with the events required for SourceChange object flow.
17+
18+
<img src="images/SourceChangeRules.png">
19+
</img>
20+
21+
## Flow with the events required for TestExecution object flow.
22+
23+
<img src="images/test-executionRules.png">
24+
</img>

wiki/markdown/existing-rules-files.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

wiki/markdown/merge-resolver-rules.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
# Merge Resolver Rules
22

3-
JMESPath identifier of the place where to insert the JSON object from
4-
_"ExtractionRules"_. If MergeResolverRules is null _"ExtractionRules"_ object
5-
will be inserted to the root of aggregated object.
6-
7-
The location in the aggregated object where the extracted content will be merge
8-
can be specified with path elements and a value to exist at that, but not all
9-
elements of a path are needed. The aggregated object will be flattened and all
10-
paths that contains the path elements in the given order will be collected.
11-
Then we check the value and the path with the value is the winning path. If no
12-
value from the paths match the given value then we take the longest path that
13-
contains the given path elements.
14-
15-
Example object:
3+
The **MergeResolverRules** is a JMESPath identifier which tells Eiffel
4+
Intelligence the place where to insert the JSON object extracted from
5+
**ExtractionRules**. If **MergeResolverRules** is null, the **ExtractionRules**
6+
object will be inserted to the root of aggregated object.
7+
8+
## Specifying location with MergeResolverRules
9+
The location in the aggregated object where the extracted content will be
10+
merged, can be specified with path elements. The path element needs a
11+
value to exist, but not all elements of a path are needed. The aggregated
12+
object will be flattened and all paths that contains the path elements in
13+
the given order will be collected. Then we check the value, and the path
14+
which contains the value is the winning path. If no value from the paths
15+
match the given value then we take the longest path that contains the
16+
given path elements.
17+
18+
If you want to place the extracted content into the root of the aggregated
19+
object you can choose to specify a location key which does not exist in
20+
the aggregated object, and there Eiffel Intelligence will not find this
21+
location. In our example rules we use the non-existing key and value
22+
**NONEPATH:NONE** to make Eiffel Intelligence place the content at the
23+
root of the object.
24+
25+
Example aggregated object:
1626

1727
{
1828
"id":"eventId",
@@ -63,7 +73,8 @@ Example object:
6373

6474
"MergeResolverRules" : "{level2:{event_id: %IdentifyRules%}}"
6575

66-
will result after replacing the marker by EI in rule:
76+
This rule will be interpreted by Eiffel Intelligence which replaces the
77+
marker %IdentifyRules% with a processed value, resulting in the following rule:
6778

6879
{level2:{event_id: someLevelId}}
6980

wiki/site.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<item collapse="true" name ="Understanding rules" href="rules.html">
5353
<item name="Merge Resolver Rules" href="merge-resolver-rules.html" />
5454
<item name="History Rules" href="history-rules.html" />
55-
<item name="Existing Rules" href="existing-rules-files.html" />
55+
<item name="Example Rules" href="example-rules.html" />
5656
<item name="Mapping Rules To Aggregations" href="mapping-rules-to-aggregations.html" />
5757
</item>
5858
<item collapse="true" name="Step-by-step aggregation" href="step-by-step-aggregation.html">

0 commit comments

Comments
 (0)