Versions Compared

Key

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

...

In the next section the steps that are needed to use the migration service are described. These steps can be skipped if you are not interested in the scenario in which this service is useful, and you can use the AQ_Aggregate_Update instead. The last section of this article describes how to model the flow which you need to model for indexing aggregates.

Step-by-step guide to add the migration service

UI Text Box
typeinfo

This service is not a standard service, and it is not part of the AquimaLibrary. You have to ask for the code at support@blueriq.com and add the definition to the globals manually.

  1. In Studio add a custom service named AQ_Aggregate_Index_Migrate
  2. The service definition looks like this:


  3. The AggregateId is always required.
    The aggregate version is optional. In case this is not specified, the latest version of an aggregate will be indexed. This service has the following parameters: 

    ParameterDirectionValueData TypeDescriptionFill
    AggregateTypeInputModule ElementAggregateSelect the aggregate that you want to update.Required
    AggregateIdInputExpressionIntegerPlease provide the attribute containing the ID of the aggregate entry to index.Required
    AggregateVersionInputExpressionIntegerIf a specific version of the aggregate needs to be updated. If not provided then the latest one is updated.Optional
    StoreInstancesInputExpression - Multivalued, Multivalued resultsEntitySpecify the starting point instance(s) used for storage.Optional

     

    Event NameEvent TypeDescription
    AppExceptionCancelThe service takes this exit if indexing failed for some reason.


Step-by-step guide to model the migration flow

  • A project that wants to index the aggregates has to create an exposed migration flow.
  • This flow should be called for every aggregate 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 then call the AQ_Aggregate_Read to load the existing aggregate into the profile. It might be needed to also load referenced aggregates in order to obtain a complete profile.
  • The next step is to use the AQ_Aggregate_Index_Migrate or AQ_Aggregate_Update service to update the aggregate index.

...