Skip to content

Commit f2e0a12

Browse files
authored
updated ArtifactRules_new.json (#56)
* added testexecution & sourcecange rulesets to resources * updated ArtifactRules_new.json
1 parent c42a968 commit f2e0a12

File tree

1 file changed

+35
-17
lines changed

1 file changed

+35
-17
lines changed

src/main/resources/ArtifactRules_new.json

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
"IdentifyRules" : "[meta.id]",
99
"MatchIdRules": {"_id": "%IdentifyRules_objid%"},
1010
"ExtractionRules" : "{ id : meta.id, type : meta.type, time : meta.time, gav : data.gav, fileInformation : data.fileInformation, buildCommand : data.buildCommand }",
11-
"MergeResolverRules" : "",
11+
"DownstreamIdentifyRules" : "links | [?type=='COMPOSITION'].target",
12+
"DownstreamMergeRules": "{\"externalComposition\":{\"eventId\":%IdentifyRules%}}",
13+
"DownstreamExtractionRules" : "{artifacts: [{id : meta.id}]}",
1214
"ArrayMergeOptions": "",
1315
"HistoryIdentifyRules":"links | [?type=='COMPOSITION'].target",
14-
"HistoryExtractionRules":"{artifacts: [{id : meta.id}]}",
16+
"HistoryExtractionRules":"{internalComposition:{artifacts: [{id : meta.id}]}}",
17+
"HistoryPathRules": "{artifacts: {id: meta.id}}",
1518
"ProcessRules" : null,
1619
"ProcessFunction" : null
1720
},
@@ -24,7 +27,6 @@
2427
"IdentifyRules" : "links | [?type=='ARTIFACT'].target",
2528
"MatchIdRules": {"_id": "%IdentifyRules_objid%"},
2629
"ExtractionRules" : "{ publications :[ { eventId : meta.id, time : meta.time, locations : data.locations }] }",
27-
"MergeResolverRules" : "",
2830
"ArrayMergeOptions": "",
2931
"HistoryIdentifyRules": "",
3032
"HistoryExtractionRules": "",
@@ -40,7 +42,6 @@
4042
"IdentifyRules" : "links | [?type=='SUBJECT'].target",
4143
"MatchIdRules": {"_id": "%IdentifyRules_objid%"},
4244
"ExtractionRules" : "{confidenceLevels :[{ eventId:meta.id, time:meta.time, name:data.name, value:data.value}]}",
43-
"MergeResolverRules" : "",
4445
"ArrayMergeOptions": "",
4546
"HistoryIdentifyRules": "",
4647
"HistoryExtractionRules": "",
@@ -49,15 +50,30 @@
4950
},
5051
{
5152
"TemplateName":"ARTIFACT_1",
52-
"Type":"EiffelTestCaseStartedEvent",
53+
"Type":"EiffelTestCaseTriggeredEvent",
5354
"TypeRule": "meta.type",
5455
"IdRule": "meta.id",
5556
"StartEvent": "NO",
5657
"IdentifyRules" : "links | [?type=='IUT'].target",
5758
"MatchIdRules": {"_id": "%IdentifyRules_objid%"},
59+
"ExtractionRules" : "{testCaseExecutions :[{ testCaseTrigeredEventId:meta.id, testCaseTrigeredTime:meta.time, testCase:data.testCase}]}",
60+
"ArrayOptions": "",
61+
"HistoryIdentifyRules": "",
62+
"HistoryExtractionRules": "",
63+
"ProcessRules":null,
64+
"ProcessFunction" : null
65+
},
66+
{
67+
"TemplateName":"ARTIFACT_1",
68+
"Type":"EiffelTestCaseStartedEvent",
69+
"TypeRule": "meta.type",
70+
"IdRule": "meta.id",
71+
"StartEvent": "NO",
72+
"IdentifyRules" : "links | [?type=='TEST_CASE_EXECUTION'].target",
73+
"MatchIdRules": {"_id": "%IdentifyRules_objid%"},
5874
"ExtractionRules" : "{testCaseExecutions :[{ testCaseStartedEventId:meta.id, testCaseStartedTime:meta.time, testCase:data.testCase}]}",
59-
"MergeResolverRules" : "",
60-
"ArrayMergeOptions": "",
75+
"MergeResolverRules" : "{\"testCaseTrigeredEventId\":%IdentifyRules%}",
76+
"ArrayOptions": "",
6177
"HistoryIdentifyRules": "",
6278
"HistoryExtractionRules": "",
6379
"ProcessRules":null,
@@ -71,12 +87,12 @@
7187
"StartEvent": "NO",
7288
"IdentifyRules" : "links | [?type=='TEST_CASE_EXECUTION'].target",
7389
"MatchIdRules": { "$and": [{"aggregatedObject.testCaseExecutions.testCaseStartedEventId": "%IdentifyRules%"}]},
74-
"ExtractionRules" : "{testCaseExecutions :[{ testCaseFinishEventId:meta.id, testCaseFinishedTime:meta.time, testCase:data.outcome}]}",
75-
"MergeResolverRules" : {"testCaseStartedEventId":"%IdentifyRules%"},
90+
"ExtractionRules" : "{ testCaseFinishEventId:meta.id, testCaseFinishedTime:meta.time, testCase:data.outcome}",
91+
"MergeResolverRules" : "{\"testCaseStartedEventId\":%IdentifyRules%}",
7692
"ArrayMergeOptions": "",
7793
"HistoryIdentifyRules": "",
7894
"HistoryExtractionRules": "",
79-
"ProcessRules":"{testCaseExecutions :[{testCaseDuration : diff(testCaseExecutions[0].testCaseFinishedTime, testCaseExecutions[0].testCaseStartedTime)}]}",
95+
"ProcessRules":"{testCaseDuration : diff(testCaseExecutions[0].testCaseFinishedTime, testCaseExecutions[0].testCaseStartedTime)}",
8096
"ProcessFunction" : "difference"
8197
},
8298
{
@@ -88,10 +104,12 @@
88104
"IdentifyRules" : "",
89105
"MatchIdRules": { },
90106
"ExtractionRules" : "",
91-
"MergeResolverRules" : "",
92107
"ArrayMergeOptions": "",
93-
"HistoryIdentifyRules":"links | [?type=='ELEMENT'].target",
94-
"HistoryExtractionRules": "{internalComposition: {eventId: meta.id, time:meta.time, name:data.name}}",
108+
"DownstreamIdentifyRules":"links | [?type=='ELEMENT'].target",
109+
"DownstreamExtractionRules": "{externalComposition: {eventId: meta.id, time:meta.time, name:data.name}}",
110+
"DownstreamMergeRules": "{\"eventId\":%IdentifyRules%}",
111+
"HistoryExtractionRules": "{eventId: meta.id, time: meta.time, name: data.name}",
112+
"HistoryPathRules": "{internalComposition:{compositions: [{eventId: meta.id}]}}",
95113
"ProcessRules":null,
96114
"ProcessFunction" : null
97115
},
@@ -104,10 +122,10 @@
104122
"IdentifyRules" : "",
105123
"MatchIdRules": {},
106124
"ExtractionRules" : "",
107-
"MergeResolverRules" : "",
108125
"ArrayMergeOptions": "",
109126
"HistoryIdentifyRules": "",
110-
"HistoryExtractionRules": "{internalComposition: {sourceChanges :[{ author:data.author, issues:data.issues}]}}",
127+
"HistoryExtractionRules": "{SCCEventId: meta.id, author:data.author, issues:data.issues}",
128+
"HistoryPathRules": "{sourceCreations: [{SCCEventId: meta.id}]}",
111129
"ProcessRules":null,
112130
"ProcessFunction" : null
113131
},
@@ -120,10 +138,10 @@
120138
"IdentifyRules" : "",
121139
"MatchIdRules": {},
122140
"ExtractionRules" : "",
123-
"MergeResolverRules" : "",
124141
"ArrayMergeOptions": "",
125142
"HistoryIdentifyRules":"links | [?type=='CHANGE'].target",
126-
"HistoryExtractionRules": "{internalComposition: {sourceChanges :[{svnIdentifier:data.svnIdentifier, submitter:data.submitter}]}}",
143+
"HistoryExtractionRules": "{SCSEventId: meta.id,svnIdentifier:data.svnIdentifier, submitter:data.submitter}",
144+
"HistoryPathRules": "{sourceChanges: [{SCSEventId: meta.id}]}",
127145
"ProcessRules":null,
128146
"ProcessFunction" : null
129147
}

0 commit comments

Comments
 (0)