Using CRF Routines
To activate the import and export CRF routines in the application backend extension, you simply need to add the following dependency into your Gradle build file located at ./extensions/backend-service-extension/build.gradle
:
dependencies { // [...] all other dependencies // To enable CRF export/import routines implementation "com.decisionbrain.gene:data-integration-crf-routine:${versions.decisionbrain.dbgene}" }
And add the @EnableCRFRoutine
decorator to a Spring configuration:
@Configuration @EnableCRFRoutine public class DataIntegrationCRFConfiguration { }
This will add two Spring beans CRFImportRoutine
and a CRFExportRoutine
to the backend extension Spring context. However, they both depend on an additional bean of type CRFMapping
. The CRFMapping
class describes how the relational model in the IBM DOC 3.x application relates to the JDL based data model of the migrated application.
One way to provide an instance of CRFMapping
is to write it yourself, either as plain Java, or to deserialize it from a textual format like JSON or YAML.
But if your application is scaffolded from an IBM DOC 3.x DBM file description of the data model (which is very likely for a migration project), then the Platform provides a library that automatically adds a CRFMapping
bean created from the application Data Model.dbm
file. All you need to do is add the data-integration-crf-mapping
library as a dependency in your Gradle build file:
dependencies { // [...] all other dependencies // To enable CRF export/import routines implementation "com.decisionbrain.gene:data-integration-crf-routine:${versions.decisionbrain.dbgene}" // To provide the CRFMapping bean. implementation "com.decisionbrain.gene:data-integration-crf-mapping:${versions.decisionbrain.dbgene}" }
And add the @EnableDbmCRFMapping
decorator to a Spring configuration class:
@Configuration @EnableCRFRoutine @EnableDbmCRFMapping public class DataIntegrationCRFConfiguration { }