generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1401 enhance process config with incident notification addresses (#1545)
* 1401 enhance process config with incident notification adresses * 1401 mock super class * #1401 unittest incident notification adresses * 1401 JavaDoc * 1401 documentation * repair broken footnotes * Update digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/engine/incidents/IncidentNotifierHandler.java Co-authored-by: Simon Hirtreiter <[email protected]> * 1401 refactor incident noditifaction properties * 1401 refactor properties --------- Co-authored-by: Simon Hirtreiter <[email protected]>
- Loading branch information
1 parent
7238b26
commit b98047a
Showing
12 changed files
with
334 additions
and
61 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...ne-service/src/main/java/de/muenchen/oss/digiwf/engine/incidents/BaseIncidentHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package de.muenchen.oss.digiwf.engine.incidents; | ||
|
||
import org.camunda.bpm.engine.impl.incident.DefaultIncidentHandler; | ||
|
||
public class BaseIncidentHandler extends DefaultIncidentHandler { | ||
|
||
public BaseIncidentHandler() { | ||
super("failedJob"); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...src/main/java/de/muenchen/oss/digiwf/engine/incidents/IncidentNotificationProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.muenchen.oss.digiwf.engine.incidents; | ||
|
||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Data | ||
@ConfigurationProperties(prefix = "digiwf.incident") | ||
public class IncidentNotificationProperties { | ||
|
||
private String cockpitUrl; | ||
|
||
private String environment; | ||
|
||
private String fromAddress; | ||
|
||
private String toAddress; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,19 @@ | |
@NoArgsConstructor | ||
public class ProcessConfig { | ||
|
||
|
||
public static final String INSTANCE_FILE_PATHS_READONLY = "app_instance_file_paths_readonly"; | ||
public static final String INSTANCE_FILE_PATHS = "app_instance_file_paths"; | ||
public static final String INSTANCE_SCHEMA_KEY = "app_instance_schema_key"; | ||
|
||
/** | ||
* This constant holds the configuration key for email addresses that should be notified in case of an incident. | ||
* These addresses are used to send out alerts or notifications when an incident occurs within the application. | ||
* <p> | ||
* The expected format for the email addresses is a comma-separated list of valid email addresses. | ||
* Example: "[email protected],[email protected]" | ||
*/ | ||
public static final String INCIDENT_NOTIFICATION_ADDRESSES = "app_incident_notification_addresses"; | ||
|
||
/** | ||
* key of the process config. | ||
*/ | ||
|
@@ -91,4 +99,8 @@ public String getInstanceSchemaKey() { | |
return this.getConfig(INSTANCE_SCHEMA_KEY); | ||
} | ||
|
||
public String getIncidentNotificationAddresses() { | ||
return this.getConfig(INCIDENT_NOTIFICATION_ADDRESSES); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,10 +161,10 @@ digiwf: | |
autodeployBausteine: true | ||
whitelist: '^[\w\s\?\!\#\: \.§\%\/\(\);:,@\u20AC\-\''\u00C0-\u017F]*$' | ||
incident: | ||
cockpiturl: ${COCKPIT_URL} | ||
cockpit-url: ${COCKPIT_URL} | ||
environment: ${DIGIWF_ENV} | ||
fromaddress: itm.digiwf@muenchen.de | ||
toaddress: [email protected] | ||
from-address: noreply@muenchen.de | ||
to-address: [email protected] | ||
jsonschema: | ||
autodeploy: true | ||
mail: | ||
|
42 changes: 42 additions & 0 deletions
42
...f-engine-service/src/main/resources/prozesse/archive/Test/TestIncident.processconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"key": "TestProcessIncident", | ||
"statusConfig": [ | ||
{ | ||
"key": "Offen", | ||
"label": "Offen", | ||
"position": 1 | ||
}, | ||
{ | ||
"key": "inBear", | ||
"label": "In Bearbeitung", | ||
"position": 2 | ||
}, | ||
{ | ||
"key": "abgeschlossen", | ||
"label": "Abgeschlossen", | ||
"position": 3 | ||
} | ||
], | ||
"configs": [ | ||
{ | ||
"key": "app_file_paths_readonly", | ||
"value": "Documents/test4;Documents/test5;Documents/test6" | ||
}, | ||
{ | ||
"key": "app_file_paths", | ||
"value": "Documents/test1;Documents/test2;Documents/test3" | ||
}, | ||
{ | ||
"key": "app_instance_file_paths", | ||
"value": "Documents" | ||
}, | ||
{ | ||
"key": "app_instance_schema_key", | ||
"value": "TestIncident_Start_V01" | ||
}, | ||
{ | ||
"key": "app_incident_notification_addresses", | ||
"value": "[email protected]" | ||
} | ||
] | ||
} |
Oops, something went wrong.