Skip to content

Commit

Permalink
Merge pull request #10 from CommonGateway/feature/PC204-70/barendrech…
Browse files Browse the repository at this point in the history
…t-notifications

Added barendrecht notification action + small fixes
  • Loading branch information
WilcoLouwerse authored Feb 6, 2024
2 parents 13c6dfb + 6eed159 commit 9a968c6
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 104 deletions.
10 changes: 9 additions & 1 deletion Installation/Action/notifications.ZaakCreatedAction.action.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
"title": "ZaakCreatedAction",
"$id": "https://commongateway.nl/action/notifications.ZaakCreatedAction.action.json",
"$schema": "https://docs.commongateway.nl/schemas/Action.schema.json",
"version": "0.0.2",
"version": "0.0.3",
"listens": ["notifications.notification.created"],
"conditions":
{
"and": [
{
"in": [
"https://open-zaak.test.buren.opengem.nl/zaken/api/v1",
{
"var": "body.hoofdObject"
}
]
},
{
"==": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
"title": "ZaakStatusFinishedAction",
"$id": "https://commongateway.nl/action/notifications.ZaakStatusFinishedAction.action.json",
"$schema": "https://docs.commongateway.nl/schemas/Action.schema.json",
"version": "0.0.2",
"version": "0.0.3",
"listens": ["notifications.notification.created"],
"conditions":
{
"and": [
{
"in": [
"https://open-zaak.test.buren.opengem.nl/zaken/api/v1",
{
"var": "body.hoofdObject"
}
]
},
{
"==": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
"title": "ZaakStatusUpdatedAction",
"$id": "https://commongateway.nl/action/notifications.ZaakStatusUpdatedAction.action.json",
"$schema": "https://docs.commongateway.nl/schemas/Action.schema.json",
"version": "0.0.2",
"version": "0.0.3",
"listens": ["notifications.notification.created"],
"conditions":
{
"and": [
{
"in": [
"https://open-zaak.test.buren.opengem.nl/zaken/api/v1",
{
"var": "body.hoofdObject"
}
]
},
{
"==": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"title": "Barendrecht ZaakStatusUpdatedAction",
"$id": "https://commongateway.nl/action/notifications.barendrecht.ZaakStatusUpdatedAction.action.json",
"$schema": "https://docs.commongateway.nl/schemas/Action.schema.json",
"version": "0.0.1",
"listens": ["notifications.notification.created"],
"conditions":
{
"and": [
{
"in": [
"https://zaken.preprod-rx-services.nl/api/v1",
{
"var": "body.hoofdObject"
}
]
},
{
"==": [
{
"var": "body.kanaal"
},
"zaken"
]
},
{
"==": [
{
"var": "body.resource"
},
"status"
]
},
{
"==": [
{
"var": "body.actie"
},
"update"
]
}
]
},
"class": "CommonGateway\\CustomerNotificationsBundle\\ActionHandler\\NotificationsHandler",
"configuration": {
"hoofdObjectSource": "https://buren.nl/source/barendrecht.preprod.zrc.source.json",
"emailConfig": {
"getObjectDataConfig": {
"source": "https://buren.nl/source/barendrecht.preprod.zrc.source.json",
"sourceEndpoint": "/rollen",
"sourceQuery": {
"zaak": "{{body.hoofdObject}}",
"omschrijvingGeneriek": "initiator"
},
"sourceProperties": ["results.0.betrokkeneIdentificatie.inpBsn"],
"searchSchemas": ["https://commongateway.nl/klant.partij.schema.json"],
"searchQuery": {
"externeIdentificaties.partijIdentificator.objectId": "{{results.0.betrokkeneIdentificatie.inpBsn}}",
"externeIdentificaties.partijIdentificator.objecttype": "ingeschrevenpersonen"
}
},
"objectConditions": {
"embedded.voorkeurskanaal.soortDigitaalAdres": "emailadres"
},
"throw": "notifications.zaak.status.updated.email"
},
"smsConfig": {
"getObjectDataConfig": "sameAsEmail",
"objectConditions": {
"embedded.voorkeurskanaal.soortDigitaalAdres": "telefoonnummer"
},
"throw": "notifications.zaak.status.updated.sms"
}
}
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ Here is an example of the conditions for a 'case created' / 'zaak aangemaakt' no
```json
{
"and": [
{
"in": [
"https://open-zaak.test.buren.opengem.nl/zaken/api/v1",
{
"var": "body.kanaal"
}
]
},
{
"==": [
{
Expand Down
Loading

0 comments on commit 9a968c6

Please sign in to comment.