Demo: A Master Data Management Use Case (With GraphQL)

Overview

GraphQL with Dgraph is a versatile beast capable of handling diverse problems. In this video released by Dgraph Labs, we demonstrate how GraphQL on Dgraph can tackle a couple of problems from the Master Data Management (MDM) domain, namely Data Lineage and Workflow Processing.

As part of this demo, we will model master data entities, as well as entities related to business process or workflow entities. We will also integrate the workflow with custom logic written in Java and Javascript.

Data Lineage
An MDM system is often used to curate and improve the quality of data of an entity. For example, certain attributes of a customer, such as name, age, title, etc. are very important for unique identification and communications. It is quite common for MDM systems to change or modify information such as a title or address to make sure that it meets quality standards. For example, country and state codes may need to be transformed and stored as per ISO format.

As entity information is curated through the MDM system, it becomes important to have a view of how an attribute attained a particular value. This view is also called ‘lineage’. Lineage is of great significance in certain businesses, particularly those in the finance and insurance domain. For example, the date of birth gained from a passport is more trustable as opposed to data entry at over phone or chat, and lineage can show us when and where a value came from.

As part of this demo, we will use the interfaces and type modeling features of GraphQL to model lineage as well as mutations to populate lineage data for a customer. The models used are quite elementary, and are aimed at demonstrating the idea.

Workflow Processing

A workflow, or sequence of tasks, is often involved when a master data entity is created or modified. In this demo, we are using GraphQL to model a workflow using “Process”, “State” and “Transition” types. Each task in the workflow is associated with some custom logic, which are encapsulated in service. The service can be implemented in a language and container of your choice. We have used JavaScript and Java in this demonstration. We use the custom directives to wrap this logic. The entire workflow is orchestrated as custom directive, in particular, custom mutations.

Git repo for this demo: