Sist endret: 19. nov. 2024

App metadata

The application metadata document holds technical information about the app and the data type requirements.

Application

The Application model is the main model for metadata for the application.

NameDescription
idA gobally unique id for the application. The value has two parts separated by a ‘/’ character. The first part is the short name of the application owner and the second part is the name of the app.
versionIdThe current version of the application. (Currently not in use.)
orgThe short name of the application owner.
titleA collection of the application title in different languages.
validFromThe date and time from when the application can be used to create instances.
validToThe data and time for when the application will expire and can no longer be used to create new instances.
processIdThe id of the process model being used by the application. (Currently not in use.)
dataTypesA list of all the data types associated with the application. See DataType.
partyTypesAllowedA collection of flags that controls what type of instance owners new instances can be created for. See PartyTypesAllowed
autoDeleteOnProcessEndA value indicating whether an instance will be automatically deleted once the process ends. This can be used by highly sensitive applications to force an instance delete instead of sending the instance to the archive.
presentationFieldsA collection of presentation fields. See PresentationField. Currently not in use.
dataFieldsA collection of data fields. See DataField.
eFormidlingThe configuration for the eFormidling integration for the application. See eFormidlingContract.
messageBoxConfigA collection of configurations related to the Altinn Message box

DataType

Data type represents the requirements for data elements. Data types representing a form will have model validation in addition to the requirements defined here.

NameDescription
idThe id of the data type. Unique for the app.
descriptionA collection of data type descriptions in different languages.
allowedContentTypesA list of Content-Types allowed by the data type.
allowedContributersA list of allowed contributors. This can be used to restrict who it is that can work with the data type.
appLogicA complex object with information on how a data type is connected to a model. See ApplicationLogic.
taskIdA reference to a task from the application process. The value indicate that the data type requirements must be fulfilled before the process can move on from the given step in the process.
maxSizeThe maximum allowed size of the data element.
maxCountThe maximum number of data elements of this type.
minCountThe minimum required number of elements of this type.
groupingThe name of a group. This can be used to logically associate a data type to a group. E.g Photos or a text resource key.
enableFileScanA value indicating if the data type should be scanned for virus/malware. If a file is scanned and found to be infected before the process is complete, this will cause a validation error.
validationErrorOnPendingFileScanA value indicating if a pending file scan should trigger a validation error and prevent the completion of the process before the scan is complete.

ApplicationLogic

ApplicationLogic holds information about how a data type representing a form is connected to a model.

NameDescription
autoCreateA value indicating whether a data element will be automatically created once an instance moves into the process step indicated by taskId.
classRefThe name of the C# class used to represent the form as a model in application logic.
schemaRefA reference to the original schema used to define the model.
disallowUserCreateA value indicating whether the a user should be able to create an elemement of the data type. Defaults to allow it (false).
disallowUserDeleteA value indicating whether the a user should be able to delete an elemement of the data type. Defaults to allow it (false).

PartyTypesAllowed

PartyTypesAllowed contains a set of values indicating the type of owners an instance can have.

NameDescription
bankruptcyEstateA value indicating that the instance owner can be a bancruptcy estate.
organisationA value indicating that the instance owner can be any organisation.
personA value indicating that the instance owner can be a person.
subUnitA value indicating that the instance owner can be a sub unit.

PresentationField

PresentationField represents a form field extraction rule. Every time a form is being saved the presentation field rules will be applied and any values from the form will be stored directly on the instance. This can later be used to present instance specific data in places like the portal message box. The purpose is to make it easier to identify a specific instance in a list with many almost identical instances.

NameDescription
idAn id or key to identify the specific rule.
pathA path to a specific field or property in the form model.
dataTypeIdThe name of the datatype. See DataType.

DataField

DataField represents a form field extraction rule. Every time a form is being saved the data field rules will be applied and any values from the form will be stored directly on the instance. While PresentationField will have logic applied to it with regards to where and how it’s used, the use of data fields is entirely up to the application developer and the application owner. One usage scenario is to provide data fields which can be used for routing to the correct backend system.

NameDescription
idAn id or key to identify the specific rule.
pathA path to a specific field or property in the form model.
dataTypeIdThe name of the datatype. See DataType.

eFormidlingContract

This type is used by a feature still in development.

eFormidlingContract holds the configuration of the eFormidling integration for the application. An application configured to enable eFormidling integration in combination with the eFormidiling contract will send a shipment to eFormidling for every instance that is created.

NameDescription
serviceIdThe service identifier of the process
processThe process type to be set on the shipment
receiverThe receiver of the eFormidling shipment.
sendAfterTaskIdThe id of the last task to be completed before the shipment is sent
typeThe document type of the shipment e.g. arkivmelding
typeVersionThe version of the document type
standardThe document standard e.g. urn:no:difi:arkivmelding:xsd::arkivmelding
securityLevelThe security level to be set on the standard business document
dataTypesA list of the dataTypes to be included in the shipment. Data type for both form data and attachments should be listed to be included in the shipment

messageBoxConfig

MessageBoxConfig holds configurations related to the presentation of instances in the Altinn MessageBox.

NameDescription
hideSettingsThe settings related to hiding an instance from the message box

hideSettings

Only one of the two settings should be used at a time.

NameDescription
hideAlwaysA boolean indicating that the instance should always be hidden
hideOnTaskA list of tasks where the instance should be hidden from the message box

CopyInstanceSettings

Configure if copying data from an archived instance is allowed and what datatypes and datafields that should be excluded in the new instance

NameDescription
enabledtrue/false if its possible to create a copy of an instance.
excludedDataTypesList of DataTypes that should be excluded when a new copy is made.
excludedDataFieldsList of fields in the DataModel that should be excluded when a new copy is made.

Meldingsboksen i portalen vil hvise en link med teksten Lag ny kopi hvis brukeren velger en arkivert instans.

OnEntry

Configure how the application behaves when a user opens the application without an instance id set

NameDescription
showPossible values: new-instance or select-instance.
new-instance : user will always get a new instance.
select-instance : user will be presented with a list of active instances if any, if no active instances a new one will be created.

Complete example

This is a complete app metadata document with data types.

{
  "id": "ttd/bli-applikasjonseier",
  "versionId": null,
  "org": "ttd",
  "title": {
    "nb": "Bli applikasjonseier"
  },
  "validFrom": null,
  "validTo": null,
  "processId": null,
  "dataTypes": [
    {
      "id": "Kursdomene_BliTjenesteeier_M_2020-05-25_5703_34553_SERES",
      "description": null,
      "allowedContentTypes": ["application/xml"],
      "allowedContributers": null,
      "appLogic": {
        "autoCreate": true,
        "classRef": "Altinn.App.Models.BliTjenesteeier_M",
        "schemaRef": null
      },
      "taskId": "Task_1",
      "maxSize": null,
      "maxCount": 1,
      "minCount": 1,
      "grouping": null
    },
    {
      "id": "ref-data-as-pdf",
      "description": null,
      "allowedContentTypes": ["application/pdf"],
      "allowedContributers": null,
      "appLogic": null,
      "taskId": null,
      "maxSize": null,
      "maxCount": 0,
      "minCount": 0,
      "grouping": null
    },
    {
      "id": "uploaded-files",
      "allowedContentTypes": ["image/jpeg"],
      "taskId": "Task_1",
      "maxSize": 25,
      "maxCount": 1,
      "minCount": 5,
      "enablePdfCreation": false,
      "enableFileScan": true,
      "validationErrorOnPendingFileScan": true
    }
  ],
  "partyTypesAllowed": {
    "bankruptcyEstate": true,
    "organisation": true,
    "person": true,
    "subUnit": true
  },
  "messageBoxConfig": {
    "hideSettings": {
      "hideOnTask": ["Task_3"]
    }
  },
  "autoDeleteOnProcessEnd": false,
  "created": "2020-07-17T08:26:21.5707559Z",
  "createdBy": "sandgrainone",
  "lastChanged": "2020-07-17T08:26:21.5708691Z",
  "lastChangedBy": "sandgrainone"
}