Application Statuses - 101-Coconsulting/TC3005B.501 GitHub Wiki

Application Statuses

An application can have different statuses depending on what happens to it throughout the workflow. There are a total of 10 statuses that an application can have:

  1. Draft An application that is a work in progress and not yet ready for review or quote but is saved in the database.

  2. First_Revision A finished application is currently under review by an N2 Authorizer. It is deemed the first revision of the travel request application in the case of an Applicant's application.

  3. Second_Revision A finished application is currently under review by an N1 Authorizer. It is deemed the second revision of the travel request application in the case of an Applicant's application.

  4. Trip_Quote An application is currently being quoted by an Accounts Payable role user to determine the budget available for the trip.

  5. Travel_Agency_Attention An application that requires a hotel or flight reservation is being attended by a Travel Agent role user for booking.

  6. Trip_Expenses_Verification An application is ready for the author to submit their expense vouchers. Either because they are missing, or because some of them have been rejected.

  7. Voucher_Verification An application's expense vouchers are being verified by an Accounts Payable role user.

  8. Finalized An application's expenses have been approved by an Accounts Payable role user.

  9. Cancelled An application has been cancelled by its author before the application was ready for the author to submit their expenses.

  10. Rejected An application has been rejected by an N2 Authorizer or an N1 Authorizer.

On Modifications

Any travel request application can be modified as long as it hasn't been approved by any authorizer. Which means that an application can be modified so long as its status is one of the following:

  • Draft
  • First_Revision

It is important to note that modifying an application does not change its status. Hence if it was already beeing reviewed, the modifications would be applied in-place, and the N2 Authorizer would require to make sure no changes were made right before a decision was made. This is a technical debt that could be fixed by ensuring that any modifications automatically changes the status back to draft, and would prevent any surprises when authorizing or rejecting a travel request application. Ensuring the application must be confirmed again for it to be able to be accepted or rejected.

In the case of N2 Authorizer and N1 Authorizer authored applications, they cannot be modified. This is because the mere creation of an application by either of these roles implies a level of authorization. This is a shortcomming of our system and is left as technical debt to be addressed by future developers.

On Cancellations

Any travel request application can be cancelled while it's still part of the Pre-Trip Flow. Which in this case means an application can be cancelled so long as its status is one of the following:

  • Draft
  • First_Revision
  • Second_Revision
  • Trip_Quote
  • Travel_Agency Attention

If it is not, then that means that the application is no longer active (due to being already cancelled, finalized, or rejected), or the application has already been quoted and booked, and the applicant is expected to upload their expense vouchers indicating the reservation expenses already incurred.

And in case the trip was only quoted but required no booking, then the applicant would have to still upload any partial expenses incurred, and in the case of having no expenses, handle the matter externally with their organization.

Process State Diagram

The following diagrams detail the various different statuses that a given application can have throughout the whole workflow, encompassing both the Pre-Trip Flow as well as the Post-Trip Flow. There are multiple diagrams; one for each role creating its own travel request application.

Applicant Application

---
config:
  theme: neo-dark
  look: neo
---
stateDiagram
  direction TB
  state applicant_creates_application <<choice>>
  state applicant_cancels_application <<join>>
  state n2_reviews_application <<choice>>
  state n1_reviews_application <<choice>>
  state trip_quoted <<choice>>
  state accounts_payable_reviews <<choice>>
  [*] --> applicant_creates_application:Applicant creates application
  Draft --> applicant_cancels_application
  Draft --> First_Revision:Applicant finishes application
  applicant_creates_application --> Draft:Unfinished
  applicant_creates_application --> First_Revision:Finished
  First_Revision --> applicant_cancels_application
  Second_Revision --> applicant_cancels_application
  First_Revision --> n2_reviews_application:N2 reviews application
  n2_reviews_application --> Second_Revision:Approves
  n2_reviews_application --> Rejected:Rejects
  Second_Revision --> n1_reviews_application:N1 reviews application
  n1_reviews_application --> Trip_Quote:Approves
  n1_reviews_application --> Rejected:Rejects
  Travel_Agency_Attention --> applicant_cancels_application
  Trip_Quote --> applicant_cancels_application
  applicant_cancels_application --> Cancelled:Applicant cancels own application
  Trip_Quote --> trip_quoted:Trip Quoted
  trip_quoted --> Travel_Agency_Attention:Hotel or flight needed
  trip_quoted --> Trip_Expenses_Verification:No hotel or flight needed
  Travel_Agency_Attention --> Trip_Expenses_Verification
  Trip_Expenses_Verification --> Voucher_Verification:Applicant uploads expense vouchers
  Voucher_Verification --> accounts_payable_reviews:Accounts Payable reviews expense vouchers
  accounts_payable_reviews --> Trip_Expenses_Verification:Rejected
  accounts_payable_reviews --> Finalized:Approved
  Cancelled --> [*]
  Rejected --> [*]
  Finalized --> [*]
Loading

N2 Application

---
config:
  theme: neo-dark
  look: neo
---
stateDiagram
  direction TB
  state n2_creates_application <<choice>>
  state n2_cancels_application <<join>>
  state n1_reviews_application <<choice>>
  state trip_quoted <<choice>>
  state accounts_payable_reviews <<choice>>
  [*] --> n2_creates_application:N2 creates application
  Draft --> n2_cancels_application
  Draft --> Second_Revision:N2 finishes application
  n2_creates_application --> Draft:Unfinished
  n2_creates_application --> Second_Revision:Finished
  Second_Revision --> n2_cancels_application
  Second_Revision --> n1_reviews_application:N1 reviews application
  n1_reviews_application --> Trip_Quote:Approves
  n1_reviews_application --> Rejected:Rejects
  Travel_Agency_Attention --> n2_cancels_application
  Trip_Quote --> n2_cancels_application
  n2_cancels_application --> Cancelled:N2 cancels own application
  Trip_Quote --> trip_quoted:Trip Quoted
  trip_quoted --> Travel_Agency_Attention:Hotel or flight needed
  trip_quoted --> Trip_Expenses_Verification:No hotel or flight needed
  Travel_Agency_Attention --> Trip_Expenses_Verification
  Trip_Expenses_Verification --> Voucher_Verification:N2 uploads expense vouchers
  Voucher_Verification --> accounts_payable_reviews:Accounts Payable reviews expense vouchers
  accounts_payable_reviews --> Trip_Expenses_Verification:Rejected
  accounts_payable_reviews --> Finalized:Approved
  Cancelled --> [*]
  Rejected --> [*]
  Finalized --> [*]
Loading

N1 Application

---
config:
  theme: neo-dark
  look: neo
---
stateDiagram
  direction TB
  state n1_creates_application <<choice>>
  state n1_cancels_application <<join>>
  state trip_quoted <<choice>>
  state accounts_payable_reviews <<choice>>
  [*] --> n1_creates_application:N1 creates application
  Draft --> n1_cancels_application
  Draft --> Trip_Quote:N1 finishes application
  n1_creates_application --> Draft:Unfinished
  n1_creates_application --> Trip_Quote:Finished
  Travel_Agency_Attention --> n1_cancels_application
  Trip_Quote --> n1_cancels_application
  n1_cancels_application --> Cancelled:N1 cancels own application
  Trip_Quote --> trip_quoted:Trip Quoted
  trip_quoted --> Travel_Agency_Attention:Hotel or flight needed
  trip_quoted --> Trip_Expenses_Verification:No hotel or flight needed
  Travel_Agency_Attention --> Trip_Expenses_Verification
  Trip_Expenses_Verification --> Voucher_Verification:N1 uploads expense vouchers
  Voucher_Verification --> accounts_payable_reviews:Accounts Payable reviews expense vouchers
  accounts_payable_reviews --> Trip_Expenses_Verification:Rejected
  accounts_payable_reviews --> Finalized:Approved
  Cancelled --> [*]
  Finalized --> [*]
Loading
⚠️ **GitHub.com Fallback** ⚠️