Hi everyone,
I'm gonna try to keep this as simple as possible, and hopefully someone will be able to provide some technical advice.
Situation: we have to develop a Training tool that allows users to register employees for different courses. I have already build a cheap and dirty version of the overall solution, which mainly consists of four lists:
- Courses type list: the user can create a course type and with a repeating section add the dates on which the course will be delivered.
- Courses dates: fed by the prior list via a Nintex workflow, it contains the different course's instances (course name - date) previously created with the repeating section
- Registrations: the user can register employees for the different courses, using a repeating section. The output for this list is a row that basically contains how many employees have been registered. This would act as an auxiliary list.
- Enrollment: again, fed by the prior list via a Nintex workflow that processes the repeating section.
Each course will have a certain amount of available seats, which will need to be updated each time a user makes a registration. The AvailableSeats field is contained in the Courses dates list, and it is easy to update its value each time someone enrolls employees in the Registration list: a query list , a math calculation and an update item actions and that's it (the workflow would run on the Registration list, but update the item in the Courses dates list)
THE ISSUE
The thing is, I am not sure of the behavior once a lot of users (50-100) begin to enroll employees. I am afraid the Nintex workflow won't be enough, as there would be a high risk of an incorrect update. This is, what happens if two users make a registration about at the same time? there's a risk both workflows start running, query the current available seats (let's say 80 seats), but then the update will go wrong, as both workflows will substract a different amount from those 80 seats, and whichever finishes the last will "win".
I hope I've made myself clear. Maybe there's something I am missing and I shouldn't be worried, but would like to have some clarification/advice/opinion before moving forward with the tool development. I was thinking that maybe I could build a workflow that runs directly on the Courses dates list, and run it from the Registration list with a wf that uses a call web service action.
Any guidance is reallllly appreciated. Thanks a lot!
Regards,
Gian