Skip to content

Commit

Permalink
update readme file about zaakclosure configuration for actualiseerZaa…
Browse files Browse the repository at this point in the history
…kStatus message
  • Loading branch information
Meric Akgul committed Jul 16, 2024
1 parent 4ccb0c9 commit 670ac91
Showing 1 changed file with 78 additions and 3 deletions.
81 changes: 78 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,98 @@ The syntax for variable substitution is as follows {[variable-name][:formatting-

## Translation Profiles

### Closing zaak
### Closing zaak with updateZaak message
Closing a zaak' refers to the action of setting the EindStatus (Last Status) to the zaak itself. EindStatus refers to a status created with a Status Type where the 'isEindStatus' field is set to true. When a zaak has such EindStatus then it means the zaak is closed.
To be able to close a zaak, the zaak must have a Resultaat(Result) value as well. In case the zaak doesn't have a Resultaat value, then one of the dummy values in Profile.json file (if exists) will be used as explained below.

There are three ways of closing a zaak.

1) Setting EindDatum (End Date)
When EindDatum field is set in updateZaak message and if the zaak already has a Resultaat then EindStatus (Last Status) is automatically set to the zaak so the zaak is closed.
However, if the zaak doesn't have a Resultaat when EindDatum field is set, then a Resultaat with the dummy value under 'endCaseEndDate' in Profile.json file is set to zaak. After that, EindStatus is automatically set to the zaak so the zaak is closed. 'endCaseEndDate' should be under the 'zaakTypeIdentificatie' which is the Zaaktype of the zaak.
However, if the zaak doesn't have a Resultaat when EindDatum field is set, then a Resultaat with the dummy value under 'endCaseEndDate' in Profile.json file (translation profile) is set to zaak. After that, EindStatus is automatically set to the zaak so the zaak is closed. 'endCaseEndDate' property should be at the same level of the 'zaakTypeIdentificatie' property which is the Zaaktype of the zaak in the profile so that it could be fetched by using the 'zaakTypeIdentificatie' from Profile.json file.

2) Setting EindStatus(LastStatus)
There is no specifically EindStatus field in updateZaak (or any other) message. However, the fields under 'Heeft' element in updateZaak message are used to create an EindStatus. When an updateZaak message is sent and if the 'Heeft' element has the required fields and if the zaak has a Resultaat, then EindStatus is created and set to the Zaak so the zaak is closed.
In case the zaak doesn't have a Resultaat, the dummy value under 'endDateAndResultLastStatus' in Profile.json file is used to create one. 'endDateAndResultLastStatus' should be under the 'zaakTypeIdentificatie' which is the Zaaktype of the zaak.
In case the zaak doesn't have a Resultaat, the dummy value under 'endDateAndResultLastStatus' in Profile.json file is used to create one. 'endDateAndResultLastStatus' property should be at the same level of the 'zaakTypeIdentificatie' property which is the Zaaktype of the zaak in the profile so that it could be fetched by using the 'zaakTypeIdentificatie' from Profile.json file.

3) Setting both EindDatum (End Date) and EindStatus(Last Status)
In case of having both EindDatum and EindStatus(meaning having required fields under 'Heeft' element) in updateZaak message, first EindStatus path is used to close a zaak. If Zaak doesn't have a Resultaat and if there is no dummy value under 'endDateAndResultLastStatus' in Profile.json then EindDatum path is used to close the zaak.

### Closing zaak with actualiseerZaakStatus message (Configurable)
A zaak can also be closed with actualiseerZaakStatus message with eindStatus in it unless the `ignoreEindStatusInActualiseerZaakStatus` property is set true in profiles.json file (translation profile).

As default the property is falsy so a zaak can be close by actualiseerZaakStatus. If ignoring the eindStatus in actualiseerZaakStatus message is wanted, then add the property `ignoreEindStatusInActualiseerZaakStatus` with value "true" into the `profileDefaults` section in profiles.json file. Then zaak closure with actualiseerZaakStatus message will not be allowed for any zaaktype.

It is also possible to add `ignoreEindStatusInActualiseerZaakStatus` property to a specific zaaktype as well if different behaviour is desired.

If a zaaktype is not listed in profiles or the profile of a specific zaaktype doesn't have the `ignoreEindStatusInActualiseerZaakStatus` property, then always the one in `profileDefaults` section is used. If `ignoreEindStatusInActualiseerZaakStatus` is not set at all in any section of profile.json file, then it will be counted as false so zaak closure with actualiseerZaakStatus message will be allowed.

Example configuration:
```json
{
"profileDefaults": {
"ignoreEindStatusInActualiseerZaakStatus": "true"
},
"profile": [
{
"zaakTypeIdentificatie": "B9999",
"endCaseEndDate": {
"coalesceResultaat": "Onbekend"
},
"endDateAndResultLastStatus": {
"coalesceResultaat": "Onbekend"
}
},
{
"zaakTypeIdentificatie": "B1210",
"ignoreEindStatusInActualiseerZaakStatus": "false",
"endDateAndResultLastStatus": {
"coalesceResultaat":"Vergunningvrij"
}
},
{
"zaakTypeIdentificatie": "B1026",
"endCaseEndDate": {
"coalesceResultaat": "Toegekend"
}
}
]
}
```

Will result in:
```json
{
"profile": [
{
"zaakTypeIdentificatie": "B9999",
"ignoreEindStatusInActualiseerZaakStatus": "true",
"endCaseEndDate": {
"coalesceResultaat": "Onbekend"
},
"endDateAndResultLastStatus": {
"coalesceResultaat": "Onbekend"
}
},
{
"zaakTypeIdentificatie": "B1210",
"ignoreEindStatusInActualiseerZaakStatus": "false",
"endDateAndResultLastStatus": {
"coalesceResultaat":"Vergunningvrij"
}
},
{
"zaakTypeIdentificatie": "B1026",
"ignoreEindStatusInActualiseerZaakStatus": "true",
"endCaseEndDate": {
"coalesceResultaat": "Toegekend"
}
}
]
}
```


### Profile Defaults
Profile defaults can be used to configure common translation profile settings. The settings configured in the `profileDefaults` section are applied to **all** zaaktypen. When a regular translation profile for a specific zaaktype is also configured, the settings are merged together. The more specific per zaaktype translation profile will always override any overlapping settings from the `profileDefaults` section. Items in array's like `valuesOverrides` will be combined instead, unless there is an overlapping key. Here the more specific per zaaktype translation profile will also always override any overlapping keys from the ones in the `profileDefaults` section.

Expand Down

0 comments on commit 670ac91

Please sign in to comment.