Asp.net MVC app with sequential approvals

Abeer S 41 Reputation points
2022-04-10T12:04:57.023+00:00

Hello. I'm developing an MVC project (visual studio.net and SQL server) in which a user enters his account and fills in his last working day to submit for approvers to do the clearance. What I have done so far:
1- create a table for employee (EmployeeId, name, email, DepartmentId)
2- create a table for department (DepartmentId, name)
3- create a table for ClearanceProcess (Id, status, signature, comments). I'm thinking to join this table to the employee table in a many-to-many relationship because the clearance process is done by many employees ( many approvers) and one employee makes many clearances. Am I correct? please I need help.
For example, employee 'A' submits a request for clearance to approver 'x', if he approved, it is sent to approver 'y'. If he rejects it, it is sent back to the employee who submitted the request at the beginning. In all rejection cases, the notification is sent to the employee ' A ' and so on. In approval cases, the request goes to the next level. At the end, a notification is sent to the employee ' A ' notifying him the process is done.
Thank you in advance

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,331 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,951 questions
{count} votes

Accepted answer
  1. Lan Huang-MSFT 26,916 Reputation points Microsoft Vendor
    2022-04-11T09:11:14.747+00:00

    Hi @Abeer S ,
    I think you can design a simple workflow in MVC, see documentation for detailed steps.
    https://learn.microsoft.com/en-us/dotnet/framework/windows-workflow-foundation/how-to-create-a-sequential-workflow
    You may need to modify/add new tables to store data about approval requests and process details.
    To be able to send/push notifications to the user, you can do it by sending an email or using SignalR in your web application.

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Naomi 7,361 Reputation points
    2022-04-10T18:35:04.583+00:00

    Sounds like linking table with EmployeeID, ClearanceID, date submitted should work for the scenario you're describing.