Introduction to the Processes Table
The processes table is designed to store information about manufacturing steps in a workflow. This table plays a central role in the Serial system by representing various types of processes that components go through during production.Table Structure
The processes table is structured to capture detailed information about each process, including its properties, relationships, and versioning. Here’s a detailed breakdown of its columns:| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | Unique identifier for the process |
| company_id | uuid | foreign key | Reference to the company the process belongs to |
| name | text | not null | Name of the process |
| created_at | timestamp with time zone | not null, default now() | Timestamp of process creation |
| use_api | boolean | not null, default false | Indicates if the process uses an API |
| record_operator | boolean | not null, default false | Indicates if operator information should be recorded |
| is_mandatory | boolean | not null, default true | Indicates if the process is mandatory |
| break_prior_links | boolean | not null, default true | Indicates if prior links should be broken |
| dependent_process_ids | uuid[] | not null, default '' | Array of process IDs that this process depends on |
| type | text | not null | Type of the process (e.g., PRODUCTION, INSTANTIATION) |
| revision | bigint | not null, default 1 | Revision number of the process |
| carbon_copy | jsonb | JSON data for process carbon copy | |
| revision_description | text | default ” | Description of the revision |
| created_by_user_id | uuid | foreign key | Reference to the user who created the process |
| allow_batch | boolean | not null, default false | Indicates if batch processing is allowed |
| approved | boolean | default false | Indicates if the process is approved |
| approved_by_user_id | uuid | foreign key | Reference to the user who approved the process |
| approved_at | timestamp with time zone | Timestamp of process approval | |
| show_media_numbering | boolean | default false | Indicates if media numbering should be shown |
Usage and Functionality
The processes table is designed to be versatile and support various aspects of manufacturing workflow management. Here are some key points about its usage:-
Process Versioning: The table supports versioning through the
revisioncolumn, allowing multiple versions of a process to be stored and tracked over time. -
Approval Workflow: With the
approved,approved_by_user_id, andapproved_atcolumns, the table implements an approval system for processes, ensuring quality control and proper authorization. -
Process Dependencies: The
dependent_process_idscolumn allows for the creation of complex workflows by defining dependencies between processes. -
Process Types: The
typecolumn supports different types of processes, as defined in the ProcessType enum: -
Company Association: Each process is associated with a company through the
company_idforeign key, allowing for multi-tenant support in the application.
Notes
-
The
carbon_copycolumn stores JSON data, which can be used to keep a snapshot of the process configuration for historical purposes. -
The
show_media_numberingcolumn suggests that processes can involve media elements, possibly for documentation or instruction purposes. -
The table is designed to work in conjunction with other tables such as
process_steps,fields, andwork_instruction_blocksto provide a complete representation of a manufacturing process.

