Skip to content

Commit

Permalink
Sample data loader
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwatkins73 committed Jan 29, 2024
1 parent 0181a26 commit 756cd3c
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand All @@ -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) {
Expand Down

0 comments on commit 756cd3c

Please sign in to comment.