Altinn / Altinn/app-lib-dotnet
Instantiation: Allow bring-your-own `dialogId` in `dataValues`
- Dominant language
- C#
- Stars
- 8
- Forks
- 27
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 7
Description
When instantiating, it should be possible to bring your own dialogId instead of the app/sync-adapter automatically creating a new dialog upon instantiation. This would allow for more flexibility and control for app developers. Such a feature might need a flag or checks to allow/verify the supplied ID.
### Related discussions
- https://digdir.slack.com/archives/C08HYKJ8Z7F/p1781179134415809?thread_ts=1781162835.899149&cid=C08HYKJ8Z7F
- https://digdir-samarbeid.slack.com/archives/C069J6N7S00/p1781072705124899
- https://docs.altinn.studio/nb/dialogporten/reference/front-end/altinn-apps/#innstillinger-for-sync-adapter
### Current situation
* Dialogporten adapter supports config for not creating the dialog, but still keep it synchronised, if it is set in `DataValues` on the instance.
* There is currently no "approved" way to send the `dialog.id` when creating the instance without writing custom code that uses `IDataClient.UpdateDataValues`.
A long term solution will probably come when the app becomes able to take more responsibility with the new workflow engine. Short term we need an API to set `DataValues["dialog.id"]` using service owner token, either on instantiation or at a later point in time.
Contributor guide
Research direction
Start by reviewing the Dialogporten adapter configuration and the IDataClient.UpdateDataValues API mentioned in the issue, then trace instantiation and DataValues handling. Done should mean a supported way to provide dialog.id during or after instantiation, with the required validation and service owner token behavior clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100