crodrigoquero / C4Imaging

Workflow system based in Windows 10 / Linux services.
1 stars 0 forks source link

WorkFlow States Only Works well in a Single User Environment #60

Open crodrigoquero opened 3 years ago

crodrigoquero commented 3 years ago

... but in a server environment. with multiple users accesing SAME WORKFLOW AT SAME TIME, the things are not going to work.

It’s not going to work apart of categorization, I mean. Categorization will work fine even in a muti-user environment. But other processes such as users documents analysis will need a thread for every single user, will fail, cause of multiple reasons like file name conflicts, file IO concurrence conflicts, system inability to efficiently trace the jobs of a particular user, etc.

So it's mandatory to add some sort of mechanism to separate the incoming work in threads clearly identified by a thread / work order id... and at same time, be able to work in a desktop environment for a single user without needed to create any kind of complex organissation or addtional dependencies.

Will be complicated, but lets do it.

crodrigoquero commented 3 years ago

SOLUTION 1: By using Work Orders: Work Orders are json datasets containing some task description and a list of files serialised in base64 format. In this situation, i.e. when a given workflow receives a work order everything will work fine, i.e. no conflict, because all the work items are encapsulaed and isolated in the aforementioned work order.

Solution Iimplementation: all we need to do is to configure the state (at startup) to consider only workflow order files (.WFSOrder file exension); all other file types will be ignored. This doesn't mean that you can't upload other files (the workflow state order work items), if they are needed by the internal state process. But is better to work only with work order files to keep things simpler.

crodrigoquero commented 3 years ago

SOLUTION 2: By giving a unique identifier or short guid, YouTube-like as a file name, for every single received file by the workflow. The question is which system component asigns such guid; the 1st workflow state or the workflow controller (higher level service).