Adding Dynamic Service Information to Digital Event Types
By default, Digital Event Persistence provides the following digital event types in which you include values for any variables defined in a dynamic service configuration:
des.evs.DynamicServiceConfiguration - contains a configuration field that contains an array of
des.evs.KeyValuePair event types:
des.evs.DynamicServiceConfiguration : event
{
configuration : des.evs.KeyValuePair[]
}
des.evs.KeyValuePair - provides the variable and variable values defined within the dynamic service configuration:
des.evs.KeyValuePair : event
{
key: string
value : string
}
When the Digital Event Persistence service encounters a dynamic service configuration field within a published event, the information provided in the key/value pairs is used to perform variable substitution for the fields in which variables are declared.
You can find the two event types in Software AG_directory \common\DigitalEventServices\TypeRepository\eventtypes\des\evs.
Example
The following example shows a digital event type that uses dynamic service configuration by defining a header field of type des.evs.DynamicServiceConfiguration.
WebM.Des.Sample.OrderManagement.DynamicPurchaseOrderCreated : event
@EventId(path = "EventId")
@EventTime(path = "EventStart")
{
Header : des.evs.DynamicServiceConfiguration
EventId : string
EventStart : int64 @Timestamp
OrderNumber : int32
OrderDateTime : int64 @Timestamp
CustomerName : string
Attachment : bytes
BillingAddress : WebM.Des.Sample.OrderManagement.PurchaseOrderAddress
ShippingAddress : WebM.Des.Sample.OrderManagement.PurchaseOrderAddress
RequestedShipDate : string
RequestedShipTime : string
SalesRepName : string
OrderTotal : float64
LineItems : WebM.Des.Sample.OrderManagement.PurchaseOrderItem[]
}