Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update diagrams to include ORBC process flow #681

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions common/tps-migration/TPS Migration Approach.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ flowchart TD
7 --> 8((End))
```

The following diagram outlines the flow executed on the same schedule as the SSIS / data migration flow above. This is to be executed from the ORBC environment (backend pod or new pod, TBD)

```mermaid
flowchart TD
1((Start)) --> 2[Retrieve oldest\ncompleted process ID]
2 --> 3{A new process\nexists?}
3 --> |No| 4((End))
3 --> |Yes| 5[Get next permit\nfor process ID]
5 --> 6{Next permit\nexists?}
6 --> |No| 2
6 --> |Yes| 7{Permit already\nexists in ORBC?}
7 --> |Yes|5
7 --> |No| 8[Move permit data\ninto ORBC tables]
8 --> 9[Upload permit\nPDF to S3]
9 --> 10[Update processes table\nto show migrated\nby ORBC]
10 --> 5
```

### Notes
* Retrieving the oldest completed process ID will get the process ID of the record from the ETL processes table that has the oldest END_DATE, and which has a ETL_STATUS code of 0 (meaning no errors), and which has an ORBC_COMPLETE status flag of 0 (meaning ORBC has not yet processed this run).
* The ORBC routine needs to check that the permit does not already exist in ORBC because we have to be able to handle error scenarios where we get duplicate permit entries from SSIS. This could be due to a run that failed partway through, or due to a change made in TPS that we are not interested in capturing such as an update to the permit notes field.
* The final step where ORBC updates the process table involves setting the ORBC_COMPLETE flag to 1 for that process.

## Sequence
The following diagram outlines the sequence of steps between SSIS (ETL tool), the onRouteBC database, and the TPS database.

Expand Down