Elffuss BraidHub

kikocis/EDC public

main · 2.3 KiBSourceRawPermalink

Static Callbacks Extension

This extension priovides an implementation and configuration for static callbacks outlined in this DecisionRecord The callacks are built on top of the EDC event system. When an event is fired in EDC all registered callacks will be invoked.

Configuration

Parameter nameDescriptionMandatoryDefault value
edc.callback.<name>.uriThe address used to dispatch a callback notificationtruenull
edc.callback.<name>.eventsThe comma separated events on which the callback should be invoked.truenull
edc.callback.<name>.transactionalIf the callback should be invoked inside the transactional boundaries of the configured events.falsefalse
edc.callback.<name>.auth-keyTransport specific header to use for sending an authentication value.falsenull
edc.callback.<name>.auth-code-idThe id for the authorization value that will be resolved by the Vault.falsenull

Example configuration with two callbacks:

edc.callback.endpoint1.uri=http://localhost:8080/hooks
edc.callback.endpoint1.events=contract.negotiation,transfer.process
edc.callback.endpoint1.transactional=true

edc.callback.endpoint2.uri=http://localhost:8081/hooks
edc.callback.endpoint2.events=contract.negotiation.finalized,transfer.process.completed
edc.callback.endpoint2.transactional=false
edc.callback.endpoint2.auth-key=X-API-KEY
edc.callback.endpoint2.auth-code-id=mysecret

The first one endpoint1 will be invoked transactionally in all events emitted from the ContractNegotiation and TransferProcess state machines.

The second one will only be invoked asynchronously only when a ContractNegotiatin is finalized and a TransferProcess is completed.