본문으로 건너뛰기
cccskills
무료GitHub에 공개

oppgave

Expert knowledge of Oppgave (task management) integration in melosys-api. Use when: (1) Creating, updating, or closing oppgaver (tasks), (2) Understanding task types (BEH_SAK_MK, VUR, JFR) and priorities, (3) Debugging task assignment or reuse logic, (4) Working with saga steps for oppgave handling, (5) Understanding sensitive case routing (NAV Viken vs Melosys unit).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md10.5 KB
  • references/debugging.md5.9 KB
  • references/mapping.md5.5 KB
  • references/task-types.md3.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Oppgave Integration

Oppgave is NAV's task management system. Melosys creates tasks for saksbehandlere to work on when behandlinger are created or need attention.

Quick Reference

Module Structure

service/oppgave/                # Kotlin
├── OppgaveService.kt           # Service facade orchestrating operations
├── OppgaveFactory.kt           # Builds tasks with correct metadata
├── OppgaveGosysMapping.kt      # Complex mapping table for task properties
├── OppgaveBehandlingstema.kt   # ab-code enum (EU_EOS_YRKESAKTIV = "ab0483", …)
├── OppgaveBehandlingstemaUtleder.kt
├── OppgaveBeskrivelseUtleder.kt
├── OppgaveTemaUtleder.kt
├── OppgavetypeUtleder.kt
├── Oppgaveplukker.kt
├── OppgaveSoekFilter.kt
└── migrering/                  # Oppgave-ID backfill jobs

integrasjon/oppgave/            # Java
├── OppgaveFasade.java          # Integration interface (calls Oppgave REST API)
├── OppgaveFasadeImpl.java      # Fasade implementation
├── OppgaveOppdatering.java     # Builder DTO for updates
└── konsument/
    └── OppgaveClient.java      # REST client for the Oppgave API

domain/oppgave/                 # Java
└── Oppgave.java                # Immutable task entity (Builder)

There are two layers: OppgaveService (service-module facade exposing domain-friendly operations) delegates to OppgaveFasade/OppgaveFasadeImpl (integration layer that calls the external Oppgave REST API via konsument/OppgaveClient).

Key Operations

OppgaveService (service layer) and OppgaveFasade (integration layer) expose different method names. Use OppgaveService from business code; it delegates to the fasade.

OperationOppgaveService methodDescription
CreateopprettOppgave(oppgave)Create standard task
FetchhentOppgaveMedOppgaveID(oppgaveID)Get task by ID
UpdateoppdaterOppgave(oppgaveID, oppdatering)Update task properties
CompleteferdigstillOppgave(oppgaveID)Mark task as done
ReturnleggTilbakeBehandlingsoppgaveMedSaksnummer(saksnummer)Unassign task on a case
AssigntildelOppgave(oppgaveID, saksbehandler)Assign to saksbehandler
ReuseopprettEllerGjenbrukBehandlingsoppgave(...)Create or reuse existing
Find openfinnÅpneBehandlingsoppgaverMedFagsaksnummer(saksnummer)Open tasks for case

OppgaveFasade exposes the raw integration calls used by the service, including opprettSensitivOppgave(oppgave) (routes to NAV Viken), hentOppgave(oppgaveId), leggTilbakeOppgave(oppgaveId), finnOppgaverMedAktørId(aktørID, oppgavetyper), finnUtildelteOppgaverEtterFrist(behandlingstema) and finnÅpneBehandlingsoppgaverMedSaksnummer(saksnummer).

Task Types (Oppgavetyper)

TypeNameDescription
BEH_SAK_MKBehandle sakMain treatment task
VURVurder dokumentDocument evaluation
JFRJournalføringDocument filing
BEH_SEDBehandle SEDSED document handling
VURD_HENVVurder henvendelseEvaluate inquiry
VURD_MAN_INNBManglende innbetalingMissing payment
BEH_ARSAVREGÅrsavregningAnnual settlement

Priorities (PrioritetType)

PriorityName
LAVLow
NORMNormal (default)
HOYHigh

Tema Values

TemaDescription
MEDMedlemskap (membership)
UFMUnntak fra medlemskap
TRYTrygdeavgift (social insurance charge)

Entity Relationships

Fagsak (saksnummer)
├── Behandling
│   ├── oppgaveId ──────────► Oppgave
│   ├── tema                   ├── saksnummer
│   ├── type                   ├── journalpostId
│   └── fristDato              ├── oppgavetype
│                              ├── tema
└── Multiple Oppgaver          ├── behandlingstema
    (over time)                ├── prioritet
                               ├── tilordnetRessurs
                               └── fristFerdigstillelse

Common Operations

Create or Reuse Task

// Most common pattern - creates new or reuses existing
oppgaveService.opprettEllerGjenbrukBehandlingsoppgave(
    behandling = behandling,
    journalpostId = journalpostId,
    aktørId = aktørId,
    tilordnetRessurs = saksbehandlerId,  // Optional
    orgnr = orgnr
)

Update Task

val oppdatering = OppgaveOppdatering.builder()
    .beskrivelse("Anmodning om unntak er sendt")
    .fristFerdigstillelse(dokumentasjonSvarfrist)
    .build()

oppgaveService.oppdaterOppgave(oppgaveId, oppdatering)

Complete Task

oppgaveService.ferdigstillOppgave(oppgaveId)

Find Tasks

// Open tasks for case (service layer)
val åpne = oppgaveService.finnÅpneBehandlingsoppgaverMedFagsaksnummer(saksnummer)

// Tasks by actor (integration fasade)
val oppgaver = oppgaveFasade.finnOppgaverMedAktørId(aktørId, oppgavetyper)

// Unassigned past deadline (integration fasade)
val forfalt = oppgaveFasade.finnUtildelteOppgaverEtterFrist(behandlingstema)

Task Reuse Logic

Tasks are reused to avoid duplicates:

// Reuse allowed when:
// 1. Existing open task for same saksnummer
// 2. behandling.type != ÅRSAVREGNING (always new task)

if (harEksisterendeÅpenOppgave && !erÅrsavregning) {
    // Reuse existing task, update if needed
} else {
    // Create new task
}

Sensitive Case Handling

Tasks for protected persons route to NAV Viken (NAV_VIKEN_ENHET_ID = 2103) instead of Melosys / NAV Medlemskap og avgift (MELOSYS_ENHET_ID = 4530). Both are defined in integrasjon/Konstanter.java; OppgaveFasadeImpl picks the enhet via erSensitiv ? NAV_VIKEN_ENHET_ID : MELOSYS_ENHET_ID.

// Sensitive when:
// - bruker.harStrengtFortroligAdresse() == true
// - OR child has Diskresjonskode.STRENGT_FORTROLIG

if (erSensitiv) {
    oppgaveFasade.opprettSensitivOppgave(oppgave)  // Routes to NAV Viken (2103)
} else {
    oppgaveFasade.opprettOppgave(oppgave)          // Routes to Melosys (4530)
}

Unit IDs

UnitIDConstantUsage
Melosys (NAV Medlemskap og avgift)4530Konstanter.MELOSYS_ENHET_IDStandard tasks
NAV Viken2103Konstanter.NAV_VIKEN_ENHET_IDSensitive/protected persons

Saga Steps

StepDescription
OPPRETT_OPPGAVECreates or reuses task
GJENBRUK_OPPGAVEReuses task from prior treatment
OPPDATER_OPPGAVE_ANMODNING_UNNTAK_SENDTUpdates task when Art. 16 request sent

Saga Step Flow

OPPRETT_FAGSAK_OG_BEHANDLING
         │
         ▼
   OPPRETT_OPPGAVE  ──► Creates/reuses task
         │                    │
         ▼                    ▼
   (treatment work)     oppgaveId stored
         │              on behandling
         ▼
  IVERKSETT_VEDTAK
         │
         ▼
   ferdigstillOppgave()

OppgaveGosysMapping

A lookup table (rows: List<TableRow>) maps the behandling context to a Gosys oppgave. finnOppgave(sakstype, sakstema, behandlingstema, behandlingstype) returns an internal Oppgave(oppgaveBehandlingstema, tema, oppgaveType, beskrivelsefelt) and throws if no row matches. finnOppgaveOrNull falls back through finnOppgaveFraTabell → finnOppgaveVedBehandlingstypeHenvendelseOgVirksomhet → finnOppgaveVedBehandlingstypeHenvendelse.

Input (TableRow match)Output (Oppgave)
Sakstyper→ oppgaveType (Oppgavetyper)
Sakstemaer→ tema (MED / UFM / TRY)
Set<Behandlingstema>→ oppgaveBehandlingstema (ab-code)
Set<Behandlingstyper>→ beskrivelsefelt

Location: service/oppgave/OppgaveGosysMapping.kt; rows mirror the Confluence "Oppgaver i Gosys" table and are generated by OppgaveGosysMappingCodeGenerator.

Common Issues

1. Multiple Open Tasks

Symptom: TekniskException: "Fant flere åpne oppgaver for sak"

Cause: Data quality issue, duplicate tasks created

Investigation: Oppgave data lives in the external Oppgave system, not in a local table (the only local oppgave-related table is oppgave_tilbakelegging). Query via the service:

val åpne = oppgaveService.finnÅpneBehandlingsoppgaverMedFagsaksnummer("MEL-12345")
log.info("Fant ${åpne.size} åpne oppgaver: ${åpne.map { it.oppgaveId }}")

2. Task Not Found

Symptom: IkkeFunnetException when fetching task

Cause: Wrong oppgaveId or task deleted

Investigation:

// Check behandling has oppgaveId
val oppgaveId = behandling.oppgaveId
// Verify in Oppgave API

3. Sensitive Case Not Routed

Symptom: Protected person's task visible to wrong unit

Investigation:

// Check PDL data
val harFortrolig = pdlService.harStrengtFortroligAdresse(aktørId)
// Check children protection
val barnMedBeskyttelse = // query dependent children

4. Missing Deadline

Symptom: FunksjonellException: "Mangler fristFerdigstillelse"

Cause: Behandling doesn't have deadline set

Resolution: Set behandling.behandlingsfrist before creating task

Debugging

Find Task for Behandling

-- behandling joins fagsak via the saksnummer FK (no fagsak_saksnummer column)
SELECT b.id, b.oppgave_id, b.status, f.saksnummer
FROM behandling b
JOIN fagsak f ON f.saksnummer = b.saksnummer
WHERE b.id = :behandlingId;

Check Task Status in Oppgave System

val oppgave = oppgaveService.hentOppgaveMedOppgaveID(oppgaveId)
log.info("Status: ${oppgave.status}, tilordnet: ${oppgave.tilordnetRessurs}")

Find All Tasks for Person

// Via Oppgave API search (integration fasade)
oppgaveFasade.finnOppgaverMedAktørId(aktørId, arrayOf("BEH_SAK_MK", "VUR"))

Detailed Documentation

  • Task Types: Complete oppgavetype reference
  • Mapping: OppgaveGosysMapping details
  • Debugging: SQL queries, log patterns, and common-issue recipes

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert knowledge of Altinn A1 application processing for posted workers in melosys-api. Use when: (1) Understanding Altinn søknad/skjema processing, (2) Debugging MedlemskapArbeidEOS form mapping, (3) Understanding SoeknadMapper transformations, (4) Investigating posted worker application issues, (5) Understanding the MOTTAK_SOKNAD_ALTINN saga flow.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

navikt/melosys-api22026년 10월 21일 업데이트

Expert knowledge of Employer/Employment integration (EREG/AAREG) in melosys-api. Use when: (1) Working with organization data from EREG (Enhetsregisteret), (2) Working with employment data from AAREG (Arbeidsforhold), (3) Understanding employer/organization lookup, (4) Debugging employer or employment issues, (5) Understanding the mapping between register data and domain models. Triggers: orgnummer, arbeidsforhold, EREG, AAREG, Enhetsregisteret, registeropplysninger, ansettelsesperiode, saksopplysning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

navikt/melosys-api22026년 10월 21일 업데이트

Modular monolith architecture overview for melosys-api. Use when needing to understand module structure, dependencies between modules, where to place new code, or when changes in one module might affect others. Triggers: "architecture", "module dependencies", "where should I put", "which modules", "dependency graph".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

navikt/melosys-api22026년 10월 21일 업데이트

Expert knowledge of Behandling (case treatment) domain in melosys-api. Use when: (1) Understanding the behandling lifecycle and status transitions, (2) Debugging issues with behandling creation, status changes, or closure, (3) Understanding relationships between Fagsak, Behandling, and Behandlingsresultat, (4) Investigating why a behandling is stuck or has wrong status, (5) Understanding Behandlingstyper, Behandlingstema, Behandlingsstatus enums, (6) Debugging journalføring or SED-triggered behandling creation, (7) Understanding behandling creation via saksflyt sagas.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

navikt/melosys-api22026년 10월 21일 업데이트

Expert knowledge of Behandlingsresultat (treatment result) domain in melosys-api. Use when: (1) Understanding result types and their meaning (FASTSATT_LOVVALGSLAND, MEDLEM_I_FOLKETRYGDEN, etc.), (2) Working with periods - Lovvalgsperiode, Medlemskapsperiode, Anmodningsperiode, Utpekingsperiode, (3) Debugging vedtak/decision metadata, criteria evaluation, or social insurance charges, (4) Understanding EU/EEA coordination logic and Article 16 exception handling, (5) Working with trygdeavgift (social insurance charge) calculations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

navikt/melosys-api22026년 10월 21일 업데이트

brev

무료

Expert knowledge of Brev (letter generation) in melosys-api. Use when: (1) Producing letters and decision documents (vedtaksbrev), (2) Understanding Dokgen templates and mapping, (3) Configuring letter recipients and distribution, (4) Debugging letter generation issues, (5) Adding new letter types or templates.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

navikt/melosys-api22026년 10월 21일 업데이트

navikt의 스킬 모두 보기

이 스킬의 문제 신고