Skip to main content

Process Transformation Event

info

Please note that this content is under development and is not ready for implementation. This status message will be updated as content development progresses.

Description

The processTransformationEvent service is responsible for processing a Transformation Event (DTE), issuing Verifiable Credentials (VCs) for both the Transformation Event and Digital Product Passports (DPPs), uploading them to the Storage service, registering the link to the stored DTE and DPPs with the Identity Resolver service, and managing Transaction events in local storage associated with the event. It handles the entire lifecycle of creating and managing transformation events and associated DPPs.

Diagram

Example

{
"name": "processTransformationEvent",
"parameters": [
{
"vckit": {
"vckitAPIUrl": "http://localhost:3332/v2",
"issuer": "did:web:uncefact.github.io:project-vckit:test-and-development",
"headers": {
"Authorization": "Bearer test123"
}
},
"epcisTransformationEvent": {
"context": ["https://www.w3.org/2018/credentials/v1", "https://gs1.org/voc/"],
"type": ["DigitalTraceabilityEvent"],
"renderTemplate": [
{
"type": "html",
"template": "<div><h2>Transformation Event</h2><p>Output: {{outputItems.0.epc}}</p></div>"
}
],
"dlrIdentificationKeyType": "gtin",
"dlrLinkTitle": "Transformation Event",
"dlrVerificationPage": "https://verify.example.com",
"validUntil": "2025-11-28T04:47:15.136Z"
},
"dlr": {
"dlrAPIUrl": "https://dlr.example.com/api",
"dlrAPIKey": "dlr-api-key-12345",
"namespace": "gs1",
"linkRegisterPath": "/api/resolver"
},
"storage": {
"url": "http://localhost:3334/v1/documents",
"params": {
"bucket": "verifiable-credentials"
},
"options": {
"method": "POST",
"headers": {
"Content-Type": "application/json"
}
}
},
"dpp": {
"context": ["https://www.w3.org/2018/credentials/v1", "https://schema.org/"],
"type": ["DigitalProductPassport"],
"renderTemplate": [
{
"type": "html",
"template": "<div><h2>Product DPP</h2><p>EPC: {{epc}}</p></div>"
}
],
"dlrIdentificationKeyType": "gtin",
"dlrLinkTitle": "Product DPP",
"dlrVerificationPage": "https://verify.example.com",
"validUntil": "2025-11-28T04:47:15.136Z"
},
"dppCredentials": [
{
"mappingFields": [
{
"sourcePath": "/vc/credentialSubject/outputItems/0/epc",
"destinationPath": "/epc"
}
]
}
],
"identifierKeyPath": "/outputItems/0/epc",
"transformationEventCredential": {
"mappingFields": [
{
"sourcePath": "/inputItems",
"destinationPath": "/inputQuantityList"
},
{
"sourcePath": "/outputItems",
"destinationPath": "/outputQuantityList"
}
],
"generationFields": [
{
"path": "/eventTime",
"handler": "generateCurrentDatetime"
},
{
"path": "/eventID",
"handler": "generateUUID"
}
]
}
}
]
}

Definitions

PropertyRequiredDescriptionType
vckitYesConfiguration for the VCKit serviceVCKit
epcisTransformationEventYesConfiguration for the EPCIS Transformation EventCredential
dlrYesConfiguration for the Digital Link ResolverIDR
storageYesConfiguration for storage serviceStorage
dppYesConfiguration for the Digital Product PassportCredential
dppCredentialsYesMapping configuration for DPP credentialsConstruct Data[]
identifierKeyPathYesJSON path to the identifier in the credential subject or the object for function and arguments of JSON path to construct identifierIdentifierKeyPath
transformationEventCredentialYesMapping and generation configuration for the transformation event credentialConstruct Data

Function type

TypeDescription
ReturnDataIt processes the input data or generates data independently and returns the processed result after successful execution.