Introduction

In Blueriq aggregates are the out of the box way to realize persistency. These aggregates will replace the existing dossier manager. Projects that use the dossier manager might want the existing dossier entries from the production environment to be migrated to aggregates. This migration needs to be easy and configurable. Configurable for instance because a dossier will be split into more aggregates or because migration needs to be done lazily. Another possibility is that the Id of the aggregate needs to be the exact Id of the dossier, since the Id might play a role in other parts of the application.

In this How-to

This how-to concerns this content migration, by modeling a flow that migrates a dossier to an aggregate. Three scenarios will be discussed.

Id is not relevant

When dossiers need to be migrated to aggregates and the Id of the newly created aggregates is not relevant in other parts of the model, follow these steps:

  • A project that wants to migrate has to create a Baas or custom service.
  • This service should be called for every dossier Id in the database.
  • In this service you then call the AQ_DossierManager to load the existing dossier into the profile.
  • The next step is to use the AQ_Aggregate_Create service to create a new aggregate entry. Like this, a project team can define itself exactly how dossiers are migrated, extra metadata can be added, dossiers can be split, etc.

The code to query the dossier database, to select the applicable Ids, and passing them one by one to the exposed flow is left to the project team.

Id is relevant

When dossiers need to be migrated to aggregates and the Id of the newly created aggregates is relevant in other parts of the model, please contact support about the possibilities.