Page History
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 an exposed migration flowa Baas or custom service.
- This flow service should be called for every dossier Id in the database. It can be passed as a parameter in the URL, and retrieved from there with the
BB_SetRequestParameters
service. - In this flow you 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.
UI Text Box | type |
---|
Info |
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, follow these steps:
BB_SetRequestParameters
service.AQ_DossierManager
to load the existing dossier into the profile.AQ_Aggregate_Migrate.
AQ_Aggregate_Create
service and has the same parameters, with one addition: a parameter called DossierIdInput
.dll
or jar
when they want to migrate.DossierIdInput
is of type expression and should return a positive integer. If not, an error is thrown. If the Id already exists, also an error is thrown.UI Text Box | ||
---|---|---|
| ||
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. |
Lazy migration
In a situation where it is not preferred to execute a migration flow for each dossier (irrelevant of the fact whether the dossier Id needs to be preserved or not), a flow can be created to mimic lazy migration. All that needs to be done in this situation is add a condition that checks upfront if the Id of a dossier that is to be read already exists in the aggregate database. If so, the aggregate is read, if not the dossier is read and migrated to an aggregate and the dossier is deleted. After that, the normal flow continues with the aggregate. In this situation, the
AQ_Aggregate_Create
service can be used when the new aggregate Ids may differ from the dossier Ids, but also the AQ_Aggregate_Migrate
can be used when the Id of the aggregate must match the Id of the dossier.The downside of this scenario is that this migration flow will exist for quite a long time in the production environment.
Include Page
Overview
Content Tools