Prefilling data
In Valtimo, forms can be prefilled with data from a case or from other external sources. This page describes how
Value resolvers
Available since Valtimo 11.0.0
Value resolvers provide a framework to retrieve and/or store data in several sources like process variables (pv:), documents (doc:), and more.
Custom value resolvers can be created for external sources.
Supported value resolvers
Case JSON data
Resolves values from the JSON content of the JsonSchemaDocument
doc:
Json path to a field
doc:person.firstName
Case columns
Resolves values from the database columns of the JsonSchemaDocument
case:
database column name in camel case
case:assigneeFullName
Process variables
Resolves values form the Camunda BPMN process variables
pv:
Process variable name
pv:lastName
ZGW value resolvers
Valtimo contains additional value resolvers for ZGW services:
zaak(Zaken API)zaakstatus(Zaken API & Catalogi API)zaakresultaat(Zaken API)zaakobject(Zaken API)
Zaken API zaak
Resolves values from the Zaken API zaak response
zaak:
Name of the field from the zaak response
zaak:identificatie
Zaken API zaakstatus
Resolves values from the Zaken API zaakstatus response
zaakstatus:
Name of the field from the zaak statustypen response
zaakstatus:omschrijvingGeneriek
Zaken API zaakresultaat
Resolves values from the Zaken API zaakresultaat response
zaakresultaat:
Name of the field from the zaak resultaattypen response
zaakresultaat:omschrijving
Zaken API zaakobject
Resolves values form the Zaken API zaakobject
zaakobject:
The object type and a reference to a property
zaakobject:profile:/person/firstName
Custom properties
sourceKey
Value resolvers can be used to prefill a form with external data by adding the custom property sourceKey:

The following prefixes are supported by default:
doc(Document)pv(Process variable)
targetKey
Value resolvers can also be used to handle submitted form values using the custom property targetKey. If the custom property targetKey is added, it will store submitted values to the reference provided in the targetKey:

If a sourceKey is provided, it will store submitted values using the reference provided in the sourceKey. Unless there is a targetKey provided. Then the targetKey takes priority.
External data types
This table lists which types of data can be referred to from a form field, and which prefix to use.
The data in the document of a case.
The 'zaakeigenschappen' stored for the zaak in the Zaken API. Not to be confused with the properties of a zaak.
Process variables stored for any process instance that is linked to the case
The properties of a zaak in the Zaken API
The properties of 'zaakstatus' linked to a zaak in the Zaken API
The properties of 'zaakobjecten'. Objects linked to a zaak in the Zaken API
Case data
Prefix: doc
Uses a reference to data from the json document that stores case data in Valtimo. The dot (.) can be used to access data in nested objects.
Example: doc:/person.firstName
Process variables
Prefix: pv
Accesses process variables for the case for which the form is loaded. It can access all variables of all process instances for the case.
Example: pv:firstName
Zaak
Available since Valtimo 11.2.0
Prefix: zaak
With the zaak prefix, all data inside a zaak response can be used to prefill the form. Some examples:
zaak:url
A URL reference to the zaak
https://example.com/zaken/api/v1/zaken/f4086828-b0b7-4e6c-a0ac-5ca1e44c5b06
zaak:uuid
Zaak UUID
f4086828-b0b7-4e6c-a0ac-5ca1e44c5b06
zaak:identificatie
The zaak identifier
ZK2023-00001
zaak:startdatum
The date at which the execution of the zaak was started
2023-12-12
zaak:status
A URL reference to the zaak status
https://example.com/zaken/api/v1/statussen/8265450b-9a96-4948-8a0f-eb40a26f7aea
Zaakstatus
Available since Valtimo 11.2.0
Prefix: zaakstatus
With the zaakstatus prefix, all data inside a zaak statustypen response can be used to prefill the form. Some examples:
zaakstatus:url
A URL reference to the zaakstatus
https://example.com/zaken/api/v1/statussen/8265450b-9a96-4948-8a0f-eb40a26f7aea
zaakstatus:omschrijvingGeneriek
Zaak status description
Intake finished
zaakstatus:volgnummer
The status trace number
2
Zaakobjecten
Prefix: zaakobject
In order to use this type the following plugins have to be configured:
Zaken API
Objecten API
Objecttypen API
References a property in a Objecten API object referenced as 'zaakobject'. The field expression contains both the name of the 'objecttype' and a JSON Pointer to the property within the JSON store in the zaakobject. There can only be one object of the requested type linked to the zaak as zaakobject. If no or multiple objects are found, an exception will be thrown when loading the form. When the object is found, the JSON Pointer is used to find the property in the JSON stored in the data field of the object.
In order for Valtimo to find the correct object, the following needs to be configured correctly:
A zaak is linked to the current case by using a zaak instance link
A Zaken API configuration exists that has a base URL matching the zaak instance link URL
A zaakobject exists in the Zaken API that links the zaak to an object in the Objects API
An Objecten API configuration exists that has a base URL matching the object URL in the zaakobject
An Objecttypen API configuration exists that has a base URL matching the type from the object found
Example: zaakobject:profile:/person/firstName
Disabling prefill
Available since Valtimo 10.5.0
In some cases it is desirable to be able to disable a form input prefill. For example, an upload input might result in duplicate files when prefilled.
Prefilling can be disabled for specific input fields by configuring a prefill property in the JSON of the form definition as follows:
In contrast to Disabled fields, setting this property to false will still save the result in the document.
Disabled fields
Disabled form fields are prefilled and saved by default. This behaviour deviates from the web-standard where disabled elements are not included in the submit body.
This behaviour can be changed by setting a toggle in application.yml:
When set to true, disabled fields will no longer be prefilled or saved. The default value is false.
Last updated