Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add endpoint to activity log to allow for notification condition checks #859

Closed
8 tasks done
Tracked by #836
elsand opened this issue Jun 17, 2024 · 0 comments
Closed
8 tasks done
Tracked by #836

Comments

@elsand
Copy link
Member

elsand commented Jun 17, 2024

Introduction

Dialogporten should provide an endpoint for the notification endpoint to use in order to determine whether or not a notidication should be provided

Description

Notification orders can be decorated with a "conditionUrl", which the notification component will request before handling it. Based upon the response given, the notification order is either ignored (closed) or provided.

This relies on the functionality described in Altinn/altinn-notifications#548

Implementation

The final design of this feature is still in progress. The following assumptions are made:

  • The notification component will request the URL with a specific ("magic") Maskinporten.scope as described in the above linked issue
  • The response should be 200 OK and match the format in the above linked issue.

https://dialogporten.no/api/v1/serviceowner/dialogs/{{dialogId}}/notification-condition?ActivityType=TransmissionOpened&TransmissionId={{transmissionId}}&ConditionType=NotExists

This should be parsed as "return true if there is no entries in the activity log of {{dialogId}} having the type "transmissionOpened" and the transmissionId set to {{transmissionId}}".

"condition" and "type" should be mandatory, and type matching any of the valid activityLog types. "condition" should for now only be "exists" and "notexists". "relatedTransmissionId" should be optional.

Tasks

Preview Give feedback

Threat modelling

Preview Give feedback

Acceptance criteria

GIVEN ...
WHEN ....
THEN ...

GIVEN ...
WHEN ....
THEN ...

@elsand elsand added the needs consideration Requires additional consideration label Jun 17, 2024
@elsand elsand removed the needs consideration Requires additional consideration label Aug 6, 2024
oskogstad pushed a commit that referenced this issue Aug 11, 2024
## Description

This add an endpoint that can be used with Altinn Notification and
conditional notification orders

## Related Issue(s)

- #859 

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

---------
@elsand elsand closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant