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
Property | Required | Description | Type |
---|---|---|---|
vckit | Yes | Configuration for the VCKit service | VCKit |
epcisTransformationEvent | Yes | Configuration for the EPCIS Transformation Event | Credential |
dlr | Yes | Configuration for the Digital Link Resolver | IDR |
storage | Yes | Configuration for storage service | Storage |
dpp | Yes | Configuration for the Digital Product Passport | Credential |
dppCredentials | Yes | Mapping configuration for DPP credentials | Construct Data[] |
identifierKeyPath | Yes | JSON path to the identifier in the credential subject or the object for function and arguments of JSON path to construct identifier | IdentifierKeyPath |
transformationEventCredential | Yes | Mapping and generation configuration for the transformation event credential | Construct Data |
Function type
Type | Description |
---|---|
ReturnData | It processes the input data or generates data independently and returns the processed result after successful execution. |