This service provisions employee files in the archive system using FINT Core APIs.
The main features are:
- Create
personalmappefor new employees or if it's not existing. - Change
administrative enhetandsaksbehandler(leder) when it changes. - Sets the case status to a configured value when the employeer leaves.
- If
administraiv enhetorsaksbehandlerdoes not exist in the archive system the case is put on a configuredadministraiv enhetandsaksbehandler. - On a configured time there is a full syncronization of
personalmapperonce a day. Default is at midnight. - On configured intervals there is incremental updated of
personalmapper. Default is once an hour.
The service supports transform policies using Ecma script (Javascript) on the Nashorn engine.
The transformation script needs to have this signature function myTransformationFunc(object). The parameter is
a PersonalmappeResource object which one can modify. The transformation function must return this object.
You can access all the methods of the
PersonalmappeResourceobject in the script. E.g.personalmappeResource.setTittel('new title')
This example returns a unmodified object.
function simpleTransform(o) {
return o;
}This example returns a object with the titles modified.
function titleTransform(o) {
o.setTittel("New title");
o.setOffentligTittel("New title");
return o;
}We created a helper to make it easier to match and modify links. The resource helper takes the PersonalmappeResource
object as a parameter. It has the following methods:
- link(relation_name)
- id(identifikator_name)
- getLink()
- getValue()
- replaceValue()
- is(value)
- isNot(value)
This example changes the saksstatus value to E if it is B.
function transform(o) {
var r = resource(o).link("saksstatus");
if (r.is("B")) {
r.replaceValue("E");
}
return o;
}| Key | Description | Default value |
|---|---|---|
| fint.endpoints.personnel-resource | Personalressurs endpoint. |
https://api.felleskomponent.no/administrasjon/personal/personalressurs |
| fint.endpoints.personnel-folder | Personalmappe endpoint. |
https://api.felleskomponent.no/arkiv/personal/personalmappe |
| fint.endpoints.administrative-unit | AdministrativEnhet endpoint. |
https://api.felleskomponent.no/arkiv/noark/administrativenhet |
| fint.endpoints.archive-resource | Arkivressurs endpoint. |
https://api.felleskomponent.no/arkiv/noark/arkivressurs |
| fint.endpoints.graphql | GraphQL endpoint. |
https://api.felleskomponent.no/graphql/graphql |
| fint.cron.bulk | Cron expression for full synchronisation | 0 0 0 * * MON-FRI |
| fint.cron.delta | Cron expression for delta synchronisation | 0 */5 8-16 * * MON-FRI |
| fint.organisation.org-id | orgId should be replaced by the organisations orgId and the . should be replaced with a dash -. |
viken-no |
| fint.organisation.registration | OAuth2 client registration | viken |
| fint.organisation.username | username for API user from the customer portal. |
|
| fint.organisation.password | password for API user from the customer portal. |
|
| fint.organisation.personnel-resource-category | List of personalressurskategorier that will be provisioned. |
F and M |
| fint.organisation.administrative-units-excluded | List of administrativeenheter that will not be provisioned. |
3 and 11 |
| fint.organisation.archive-resource | true or false. If true synchronisation of arkivressurs is enabled. |
false |
| fint.organisation.history-limit | Limit on age (dateLastModified) to export to frontend | 5 |
| fint.organisation.personnel-resource-category | List of personalressurskategorier that will be provisioned. |
F and M |
| fint.organisation.bulk-limit | This is the number of personalressurser to synchronise on a load. If set to 0 all will be synchronised. Setting it to another value is meant for initial testing. |
5 |
| fint.organisations.bulk | true or false. If true bulk synchronisation is enabled. |
false |
| fint.organisation.delta | true or false. If true delta synchronisation is enabled. |
false |
| fint.organisation.transformation-scripts | Javascripts to transform PersonalmappeResource object before sent to the archive system. See Ecma transform policies |
|
spring.security.oauth2.client.registration.<registration>.client-id |
client-id for API user from the customer portal. |
|
spring.security.oauth2.client.registration.<registration>.client-secret |
client-secret for API user from the customer portal. |
|
spring.security.oauth2.client.registration.<registration>.authorization-grant-type |
OAuth grant type. Should not be changed. Changing this will cause authentication not to work. | password |
spring.security.oauth2.client.registration.<registration>.scope |
OAuth scope. | fint-client |
spring.security.oauth2.client.registration.<registration>.provider |
Should not be changed. | fint |
| spring.security.oauth2.client.provider.fint.token-uri | Token uri for the IDP. | https://idp.felleskomponent.no/nidp/oauth/nam/token |
| spring.data.mongodb.uri | URI for the Mongo database. | |
| spring.data.mongodb.database | Name of the Mongo database. |




