Home  >  Q&A  >  body text

A brief discussion on the design and ideas of workflow engine data tables

We all know that workflow engines play a decisive role in system development, so how to design your own workflow engine well? Today we will simply talk about flow engine design from the perspective of database design.

Let’s talk to you about the database design of Tpflow workflow engine.

Workflow engine data tables generally have 'flow' 'flow_process' 'run' 'run_process' 'log' and should have at least these five basic data tables; of course, in tpflow, 'run_sing' ' is also designed run_cache' two schedules. The above seven data tables form the workflow of Tpflow.

The 'flow' table is generally used to store key information of the main workflow, such as workflow category, workflow related information, workflow status, etc.;

'flow_process' table is generally stored directly Step information, which is associated with the 'flow' main table, together constitutes the process information table; all attributes of the step, such as subordinate steps, step status, transfer conditions, etc.

The 'run' table can be understood as the running clone of the flow table

The 'run_process' table can be understood as the running clone of the flow_process table

The 'run_sing' table is the countersign Time information storage table;

'run_cache' 'run_log' reflects the message log and cache of the workflow;

Above we have a general understanding of the design and function of the five main tables of the workflow.


Among the difficulties in designing the entire PHP workflow engine, it is not only the difficulty of designing the data table, but also the various drivers of the front-end and back-end. If you want to better design a workflow engine, the design foundation and ideas of data tables are indispensable.


If you have better ideas, please click below to leave a message and we will discuss it together.

蝈蝈蝈蝈2094 days ago1238

reply all(0)I'll reply

No reply
  • Cancelreply