E
E
Evgenii Borovoi2020-07-08 10:50:24
Database design
Evgenii Borovoi, 2020-07-08 10:50:24

What is the best way to store the non-linear movement of documents in the database?

There are several roles/cabinets. There is an order, which, as it is processed, goes to one of the offices. At the same time, the routes can be different, from role 1 to 3, then again to 1, and then to 5. Or maybe 1-2-4-5. And it may be necessary to add new paths. Also, part of the roles can at any time look at any site. I see what options - either make the "status" field for the order and write in which office the next one. Or make columns where each role is registered and visibility is set for this cabinet. Those.

id  | кабинет 1 | кабинет 2
12 |    false      |   true

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-07-08
@EugeneOne77

Look this way. Just take the idea. Actually you will need a state table.
Where the workflow instance is displayed, the documents it owns, and the states it must go through.
https://docs.microsoft.com/en-us/dotnet/framework/...
This is an implementation for PHP
https://github.com/phpmentors-jp/workflower

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question