Skip to content
cccskills
FreePublished on GitHub

altinn-soknad

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.

The English summary is being prepared. Showing the original description.

Works withConfluence

Run score Not tested

See how to install

Files included (4)

  • SKILL.md6.8 KB
  • references/debugging.md5.0 KB
  • references/form-structure.md6.5 KB
  • references/mapping.md6.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Altinn Søknad Skill

Expert knowledge of Altinn electronic A1 application processing for posted workers (utsendte arbeidstakere) in EU/EEA.

Quick Reference

Key Components

ComponentLocationPurpose
AltinnSoeknadServiceservice/src/main/java/.../altinn/Main service processing Altinn applications
SoeknadMapperservice/src/main/java/.../altinn/Maps Altinn XML to internal Soeknad domain
SoknadMottattConsumerservice/src/main/java/.../soknad/Kafka entry point; consumes soknad-mottak topic and starts the saga
SoknadMottakClientintegrasjon/src/main/kotlin/.../soknadmottak/Fetches applications from soknad-mottak API
soknad-altinn modulesoknad-altinn/XSD schema and JAXB bindings for form
OpprettFagsakOgBehandlingFraAltinnSøknadsaksflyt/src/.../steg/behandling/Saga step for processing

Form Structure (MedlemskapArbeidEOS_M)

Innhold
├── arbeidsgiver          # Employer information
│   ├── virksomhetsnummer # Org number
│   ├── kontaktperson     # Contact person
│   ├── samletVirksomhetINorge  # Norwegian operations stats
│   └── offentligVirksomhet     # Is public sector?
├── arbeidstaker          # Employee information
│   ├── foedselsnummer    # Norwegian ID
│   ├── utenlandskIDnummer
│   ├── barn              # Children (medfølgende)
│   └── fødested/fødeland
├── midlertidigUtsendt    # Posted worker details
│   ├── arbeidsland       # Work country
│   ├── arbeidssted       # Work location (LAND/OFFSHORE/SKIPSFART/LUFTFART)
│   ├── utenlandsoppdraget # Assignment details
│   └── loennOgGodtgjoerelse # Salary info
└── fullmakt              # Power of attorney
    ├── fullmektigVirksomhetsnummer  # Advisory firm org number
    └── fullmaktFraArbeidstaker

Processing Flow

1. Altinn form submitted
   ↓
2. melosys-skjema-api receives and stores in PostgreSQL
   ↓
3. Kafka event triggers melosys-api
   ↓
4. MOTTAK_SOKNAD_ALTINN saga starts
   ↓
5. OpprettFagsakOgBehandlingFraAltinnSøknad step:
   - Fetches XML from soknad-mottak API
   - Creates Fagsak and Behandling
   - Maps form data to MottatteOpplysninger
   ↓
6. OpprettOgFerdigstillAltinnJournalpost step:
   - Archives documents in Joark
   ↓
7. Behandling ready for saksbehandler

Behandlingstema Determination

if (offentligVirksomhet == true) {
    Behandlingstema.ARBEID_TJENESTEPERSON_ELLER_FLY
} else {
    Behandlingstema.UTSENDT_ARBEIDSTAKER
}

ArbeidsstedType Mapping

TypeDescriptionMapped To
LANDWork on landArbeidPaaLand with fysiske arbeidssteder
OFFSHOREOffshore platformsMaritimtArbeid with innretningstype
SKIPSFARTShips/maritimeMaritimtArbeid with flaggland
LUFTFARTAviationLuftfartBaser with hjemmebase

Domain Model

Soeknad (Internal Representation)

Soeknad (domain/.../mottatteopplysninger/Soeknad.kt, Kotlin) is a thin subclass of MottatteOpplysningerData. It declares only four fields of its own:

class Soeknad : MottatteOpplysningerData() {
    var loennOgGodtgjoerelse: LoennOgGodtgjoerelse? = LoennOgGodtgjoerelse()
    var arbeidsgiversBekreftelse = ArbeidsgiversBekreftelse()
    var utenlandsoppdraget = Utenlandsoppdraget()
    var arbeidssituasjonOgOevrig = ArbeidssituasjonOgOevrig()
}

The remaining data lives on the inherited MottatteOpplysningerData (domain/.../mottatteopplysninger/MottatteOpplysningerData.java):

class MottatteOpplysningerData {
    Soeknadsland soeknadsland;             // Target country/countries
    Periode periode;                        // Application period
    OpplysningerOmBrukeren personOpplysninger;
    ArbeidPaaLand arbeidPaaLand;           // If type=LAND
    List<ForetakUtland> foretakUtland;      // Foreign companies
    OppholdUtland oppholdUtland;
    SelvstendigArbeid selvstendigArbeid;
    JuridiskArbeidsgiverNorge juridiskArbeidsgiverNorge;
    List<MaritimtArbeid> maritimtArbeid;    // If OFFSHORE/SKIPSFART
    List<LuftfartBase> luftfartBaser;       // If LUFTFART
    Bosted bosted;
}

Key Mappings

Altinn FieldDomain FieldNotes
arbeidslandSoeknadsland.landkoderISO-2 country code
periodeUtlandPeriodefom/tom LocalDate
loennNorskArbgLoennOgGodtgjoerelse.norskBruttoLoennPerMndSalary in NOK
erstatterTidligereUtsendteUtenlandsoppdraget.erstatterReplacement worker

Common Debugging

Check Received Application

-- Find søknad by fagsak (behandling joins fagsak via saksnummer, not fagsak_id)
SELECT mo.id, mo.type, mo.data
FROM mottatteopplysninger mo
JOIN behandling b ON mo.behandling_id = b.id
JOIN fagsak f ON b.saksnummer = f.saksnummer
WHERE f.gsak_saksnummer = '123456789'
AND mo.type = 'SØKNAD_A1_UTSENDTE_ARBEIDSTAKERE_EØS';

-- Check original XML (stored in original_data; JSON is in data)
SELECT original_data
FROM mottatteopplysninger
WHERE behandling_id = :behandlingId;

Trace Application Processing

-- Find prosessinstans for søknad.
-- prosess_steg is a kode/navn lookup table, so don't join it - prosessinstans
-- carries data and sist_fullfort_steg (last completed step) directly.
SELECT uuid, prosess_type, sist_fullfort_steg, data, registrert_dato, endret_dato
FROM prosessinstans
WHERE prosess_type = 'MOTTAK_SOKNAD_ALTINN'
AND data LIKE '%søknadRef%'
ORDER BY endret_dato DESC;

Detailed references

Related Skills

  • saksflyt: Saga pattern for processing
  • journalforing: Document archiving
  • fagsak: Case creation
  • behandling: Case treatment lifecycle

External Documentation

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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.

The English summary is being prepared. Showing the original description.

navikt/melosys-api2Updated Oct 22, 2026

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".

The English summary is being prepared. Showing the original description.

navikt/melosys-api2Updated Oct 22, 2026

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.

The English summary is being prepared. Showing the original description.

navikt/melosys-api2Updated Oct 22, 2026

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.

The English summary is being prepared. Showing the original description.

navikt/melosys-api2Updated Oct 22, 2026

brev

Free

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.

The English summary is being prepared. Showing the original description.

navikt/melosys-api2Updated Oct 22, 2026

Expert knowledge of the melosys-api Oracle database schema. Use when: (1) Writing SQL queries against the melosys database, (2) Understanding table relationships and foreign keys, (3) Debugging data issues by querying the database, (4) Understanding what data is stored where, (5) Creating or modifying Flyway migrations, (6) Mapping domain entities to database tables. Triggers: SQL against melosys DB, table/column lookup, FK relationships, "where is X stored", "what column stores X", "why is data missing", beh_resultat_id, behandlingsresultat_id, saksnummer, schema.

The English summary is being prepared. Showing the original description.

navikt/melosys-api2Updated Oct 22, 2026

See all skills by navikt

Report a problem with this skill