Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue


Status

Status
colourYellow
titlePROGRESS

Priority2
Note
AssigneeMax

Ressources

Event = System Hooks (Frage) What is the difference?

Remarks

This tutorial should eventually replace the System Hooks page in this directory, as the content of that page will be moved to a concept page.



Information on Configuration in On-Premise systems that should be moved to a different article:

Run Configuration

Running the Java application to register the service must include a number of parameters to communicate the services' existance and contact information to the Discovery Service. Find the full list of required parameters below:

NameValueDescription
spring.profile.active<active profiles>Profiles available and running within your system, defining in which Profiles the Interceptor will be active 
spring.cloud.config.uri<protocol>://<config url>URL of the Configuration service endpoint where the service can recieve system information
eureka.instance.prefer-ip-addresstrueDecides whether the Webhook service will register using its host name or its host ip. 
eureka.instance.ip-adress<your host ip>Define host ip, and host base url when used in conjunction with the previous parameter.


...

Code Block
titleController Class with Endpoint for Webhook Consumption
@RestController
@RequestMapping("/api/dms/request")
public class ExampleRestController
{
    @PostMapping(value = "/update/metadata", produces = {"application/json"})
    public Map<String, Object> updateDmsObjectMetadata(@RequestBody Map<String, Object> dmsApiObjectList, 
                                                       @RequestHeader(value = "Authorization", required = true) String authorization)
    {
        doSomething(dmsApiObjectList, authorization);
        return dmsApiObjectList;
    }
    private void doSomething(Map<String, Object> dmsApiObjectList, String authorization)
    {
        // do something with the metadata
    }
}

Configuring the Webhook

To use the webhook service for the intended purpose of intercepting metadata when updating objects, we need to create a new entry in the Webhook list within our systems' SystemHookConfiguration.json file. The url attribute must refer to the webhook service identifier (derived from the artifact ID in the services' maven file) and direct to one of the endpoints declared in the service.

...