You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wiki/subscription-with-email-notification.md
+105-6Lines changed: 105 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,40 @@ subject which is configured in Eiffel Intelligence application.properties. Not r
36
36
If any authentication is needed by Eiffel Intelligence to send the notification email.
37
37
38
38
## notificationMessageKeyValues
39
-
Content of the email message. The form key should always be an empty string
40
-
for email messages. Only one key/value pair is allowed for email message body,
41
-
since only the first value will be used.
42
39
43
-
The form value will be run through JMESPath engine so it is possible to use
44
-
JMESPath expressions to extract content from the aggregated object. The
45
-
form value can only be one JSON object.
40
+
Below are the limitations of notificationMessageKeyValues.
41
+
42
+
### Limitations
43
+
44
+
* The form key should always be an empty string.
45
+
* The content should be in JSON format.
46
+
* The form value can only be one JSON object is allowed (not several objects on the same level).
47
+
* Only one key/value pair is allowed (since only the first value will be used).
48
+
* It is possible to make use of the data inside the aggregation, using the "@" symbol.
49
+
* As with the conditions, it is also possible to write JMESPath expressions.
50
+
51
+
In the below example the full aggregation can be sent using the '@' character.
52
+
53
+
"notificationMessageKeyValues": [
54
+
{
55
+
"formkey": "",
56
+
"formvalue": "@"
57
+
}
58
+
]
59
+
60
+
To access parts of the aggregation it is possible to define like the below example:
61
+
62
+
"notificationMessageKeyValues": [{
63
+
"formkey": "",
64
+
"formvalue": "{parameters: [{ name: 'jsonparams', value : to_string(@) }, { name: 'artifactIdentity', value : @.identity }]}"
65
+
}]
66
+
67
+
The key is 'jsonparams' and the value is the full aggregated object. The second parameter is the artifact identity which is extracted from the aggregation, These are part of the notification message for this particular subscription. Below is a list of the parameters defined in the above notification message which will be sent for the subscription.
68
+
69
+
parameters:
70
+
jsonparams: //full aggregated object
71
+
artifactIdentity: //extract the identity string from the aggregation
72
+
46
73
47
74
## requirements
48
75
An array of one or several requirements. At least one requirement should be
@@ -83,6 +110,78 @@ be fulfilled.
83
110
]
84
111
}
85
112
113
+
Additional examples of how to write subscription with email notification:
114
+
115
+
The below subscription to trigger a notification an aggregation should contain an artifact with a given identity.
The JMESPath expression in the subscription notification selects the field identity from the aggregated object and this is used as value for the parameter "artifactIdentity". The second parameter is also extracted from the aggregation and results in a string value of the testcase id. The complete notification message can be seen below:
147
+
148
+
parameters:
149
+
artifactIdentity: //extract the identity string from the aggregation
150
+
testCase: //extract the testCaseId string from the aggregation
151
+
152
+
The below subscription will perform a MAIL notification when an artifact identity should contain a given artifact namespace.
0 commit comments