Skip to content

Commit

Permalink
Sample data loader
Browse files Browse the repository at this point in the history
davidwatkins73 committed Apr 14, 2024
1 parent a40efb6 commit b609117
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -112,10 +112,7 @@ private void go() throws IOException {
processDataTypes(waltz, workbook.getSheet("data-types"), now);
processDataFlows(waltz, workbook.getSheet("flows"), now);

LOG.debug("Rebuilding categories");
hierarchyService.buildFor(EntityKind.ORG_UNIT);
hierarchyService.buildFor(EntityKind.MEASURABLE);
hierarchyService.buildFor(EntityKind.PERSON);
rebuildHierarchies();


throw new RuntimeException("rolling back, comment this line if you really want to do this!");
@@ -125,6 +122,15 @@ private void go() throws IOException {
}


private void rebuildHierarchies() {
LOG.debug("Rebuilding hierarchies");
hierarchyService.buildFor(EntityKind.ORG_UNIT);
hierarchyService.buildFor(EntityKind.MEASURABLE);
hierarchyService.buildFor(EntityKind.PERSON);
hierarchyService.buildFor(EntityKind.DATA_TYPE);
}


private void processDataFlows(DSLContext waltz,
Sheet flowSheet,
Timestamp now) {

0 comments on commit b609117

Please sign in to comment.