Event Scenarios
Description of the event-driven architecture for Altinn Apps and Altinn Platform.
Below you find some functional scenarios for use of events functionality in Altinn 3
Org waiting on ProcessComplete for a given app
In this scenario, an org is waiting on end-users to complete one given app.
-
System (consumer) authenticates using Maskinporten and requests scope for org
-
System exchanges Maskinporten token to an Altinn token. Scopes is included in new token.
-
System calls
GET {platformurl}/events/api/v1/app/{org}/{app}?from={lastchanged}&eventType=instance.process.completed
-
Event component verifies that scope matches request
-
Event components searches database for events that matches search criteria
-
Event component returns the filtered and possible capped response ordered by sequence
-
Consumer process the received events and call other API to download related data (instances, files, etc)
User needing to know if there is anything new for a party
In this scenario, a user wants to see if there are any changes for a client or the user itself.
-
System authenticates end user with ID-porten
-
System exchanges token with Altinn
-
System calls event API
POST {platformurl}/events/api/v1/party/
-
Event component query events in database.
-
Event components authorized the event and filter away events where user is not authorized
-
Events are returned
-
Consumer process events
-
Consumer gets relevant data