Skip to main content

Introduction to the PROCESS_STEPS Table

The process_steps table is designed to store detailed information about individual steps within a process. This table plays a crucial role in organizing and structuring the workflow of manufacturing processes in the Serial system.

Table Structure

The process_steps table is structured to capture essential data about each step in a process. Here’s a detailed breakdown of its columns:
Column NameData TypeConstraintsDescription
iduuidprimary keyUnique identifier for each process step
company_iduuidnot null, foreign keyReference to the company owning the process step
orderintnot nullSequence number of the step within the process
nametextnot nullName or description of the process step
process_iduuidnot null, foreign keyReference to the associated process
process_revisionintnot nullRevision number of the associated process
filter_join_operatortextnot nullOperator for joining filter conditions
created_attimestampnot null, default now()Timestamp of when the step was created
is_hiddenbooleannot null, default falseFlag to indicate if the step is hidden

Usage and Functionality

The process_steps table is designed to be a flexible and integral part of the process management system. Here are some key points about its usage:
  1. Process Organization: Each row in the table represents a distinct step within a process, allowing for detailed structuring of complex workflows.
  2. Versioning Support: The inclusion of both process_id and process_revision allows for maintaining multiple versions of process steps, supporting iterative improvements and change management.
  3. Filtering and Conditional Logic: The filter_join_operator column suggests that steps can have associated conditions, potentially allowing for dynamic workflow adjustments based on specific criteria.
  4. Company-Specific Processes: The company_id foreign key ensures that process steps are associated with specific companies, enabling multi-tenant support in the system.

Notes

  • The table includes indexes on company_id and process_id, optimizing queries that filter or join on these columns.
  • The table is utilized in functions like insert_process_with_references and get_process_with_references, indicating its central role in process management operations.
  • Example usage in a function:
    INSERT INTO public.process_steps (company_id, "order", name, process_id, process_revision, filter_join_operator, is_hidden)
    VALUES (
        (process_step_json->>'company_id')::UUID,
        (process_step_json->>'order')::INTEGER,
        process_step_json->>'name',
        process_id,
        process_revision,
        process_step_json->>'filter_join_operator',
        COALESCE(process_step_json->>'is_hidden', 'false')::BOOLEAN
    )
    
  • The is_hidden column allows for temporarily removing steps from view without deleting them, providing flexibility in process management.
By leveraging the process_steps table, the Serial application can maintain a detailed and versioned representation of manufacturing processes, enabling complex workflow management and supporting the core functionality of the system.