Documentation
System Overview
Simple Case Log (SCL) is a comprehensive system for creating forms, collecting submissions, and managing workflows. The system consists of several interconnected components:
System Architecture
Forms → Submissions → Workflows → Queues → Actions
The system flow starts with creating forms, which users fill out to create submissions. Submissions can be routed through workflows, which consist of queues. Each queue can have actions that move submissions between queues.
Forms
Forms are the foundation of the system. They define the structure of data to be collected.
Key Concepts
- Form Builder: A drag-and-drop interface for creating forms
- Fields: Different types of inputs (text, number, select, etc.)
- Rules: Conditional logic that controls field visibility
- Calculations: Formulas that compute values based on other fields
- Public Forms: Forms that can be accessed without logging in
Creating a Form
- Navigate to the Forms page and click "New Form"
- Add a title and description
- Drag fields from the sidebar onto the form canvas
- Configure field properties (label, required, validation, etc.)
- Add rules and calculations if needed
- Save the form
Public Forms
Forms can be made public, allowing anyone to access them without logging in:
- Edit a form and check the "Public" option
- Save the form
- A public link will be generated
- Click "Copy Link" on the forms list to copy the public URL
Submissions
Submissions are completed forms. They contain the data entered by users.
Key Concepts
- Status: Submissions can be drafts or submitted
- Values: The data entered for each field
- Workflow Assignment: Submissions can be assigned to workflows
Creating a Submission
- Navigate to a form
- Fill out the form fields
- Click "Submit" to create a submission
- Alternatively, click "Save Draft" to save progress
Viewing Submissions
Submissions can be viewed on the Submissions page. From there, you can:
- View submission details
- Edit submissions (if permitted)
- Delete submissions (if permitted)
- Assign submissions to workflows
Workflows
Workflows define the process that submissions follow. They consist of queues and actions.
Key Concepts
- Workflow: A collection of queues that define a process
- Queue: A stage in the workflow where submissions wait for processing
- Action: An operation that moves a submission from one queue to another
Creating a Workflow
- Navigate to Admin > Workflows
- Click "New Workflow"
- Add a name and description
- Create queues for the workflow
- Define actions for each queue
- Save the workflow
Assigning Submissions to Workflows
Submissions can be assigned to workflows in several ways:
- Manually from the submission view page
- Automatically when a form is submitted (if configured)
- Through the API
Queues
Queues are stages in a workflow where submissions wait for processing.
Key Concepts
- Queue: A collection of submissions at a specific stage
- Actions: Operations that can be performed on submissions in the queue
- Permissions: Roles that can access the queue and perform actions
Creating a Queue
- Navigate to Admin > Queues
- Click "New Queue"
- Add a name and description
- Assign roles that can access the queue
- Create actions for the queue
- Save the queue
Queue Dashboard
The dashboard shows queues that the current user has access to. From there, you can:
- View submissions in each queue
- Perform actions on submissions
- Track submission progress through the workflow
Rules & Calculations
Rules and calculations add dynamic behavior to forms.
Rules
Rules control the visibility of fields based on conditions:
Rule Structure
IF [condition] THEN [action]
Conditions can be based on field values:
- Field equals/not equals a value
- Field contains/not contains a value
- Field greater than/less than a value (for numbers)
- Multiple conditions can be combined with AND/OR
Actions can be:
- Show/hide a field
- Enable/disable a field
- Set a field's value
Creating a Rule
- In the Form Builder, select a field
- Click "Add Rule" in the field properties panel
- Define the condition(s)
- Define the action(s)
- Save the rule
Calculations
Calculations compute values based on other fields:
Calculation Structure
Formula: An expression that computes a value
Formulas can include:
- Field references (e.g.,
{field_1}
) - Arithmetic operators (+, -, *, /)
- Functions (SUM, AVG, MIN, MAX, etc.)
- Conditional expressions (IF, THEN, ELSE)
Example: IF({field_1} > 10, {field_1} * 2, {field_1} / 2)
Creating a Calculation
- Add a "Calculated" field to the form
- In the field properties panel, click "Edit Formula"
- Write the formula using field references and operators
- Save the calculation
Advanced Examples
Conditional Visibility
Rule: IF field "Type" equals "Other" THEN show field "OtherType"
Total Calculation
Formula: {quantity} * {price} * (1 + {tax_rate} / 100)
Complex Condition
Rule: IF (field "Age" greater than 18 AND field "Consent" equals "Yes") OR field "ParentalConsent" equals "Yes" THEN show field "SensitiveQuestions"
Users & Roles
The system uses role-based access control to manage permissions.
Users
Users are individuals who can log in to the system. Each user has:
- Username and password
- Profile information
- One or more roles
Roles
Roles define what users can do in the system:
- Admin: Full access to all features
- Form Manager: Can create and manage forms
- Workflow Manager: Can create and manage workflows
- Queue Worker: Can process submissions in assigned queues
- Submitter: Can create and view their own submissions
Managing Users and Roles
Administrators can manage users and roles from the Admin section:
- Create, edit, and delete users
- Assign roles to users
- Create custom roles with specific permissions
Audit Log
The audit log tracks all significant actions in the system for accountability and troubleshooting.
Logged Actions
The system logs the following types of actions:
- Create: Creating new objects (forms, submissions, etc.)
- Update: Modifying existing objects
- Delete: Removing objects
- Login/Logout: User authentication events
- Perform: Executing actions on submissions
Audit Log Fields
Each audit log entry includes:
- Timestamp
- User who performed the action
- IP address
- Object type (form, submission, etc.)
- Object ID
- Action type
- Details of changes (for updates)
Viewing the Audit Log
Administrators can view the audit log from Admin > Audit Log. The log can be filtered by:
- Date range
- User
- Action type
- Object type
API Reference
The system provides a RESTful API for integration with other systems.
Authentication
API requests require authentication using JWT tokens:
- Obtain a token by sending credentials to
/api/auth/login
- Include the token in the Authorization header:
Authorization: Bearer {token}
API Endpoints
The API provides endpoints for all major system functions:
Forms API
GET /api/forms/
- List formsGET /api/forms/{id}
- Get form detailsPOST /api/forms/
- Create a formPUT /api/forms/{id}
- Update a formDELETE /api/forms/{id}
- Delete a formGET /api/forms/public/{token}
- Get public form by token
Submissions API
GET /api/submissions/
- List submissionsGET /api/submissions/{id}
- Get submission detailsPOST /api/submissions/
- Create a submissionPUT /api/submissions/{id}
- Update a submissionDELETE /api/submissions/{id}
- Delete a submission
Workflow API
GET /api/workflows/workflows/
- List workflowsGET /api/workflows/queues/
- List queuesGET /api/workflows/queues/{id}/actions
- List queue actionsPOST /api/workflows/queues/{id}/actions/{action_id}/perform
- Perform an action
User API
GET /api/users/
- List usersGET /api/users/{id}
- Get user detailsPOST /api/users/
- Create a userPUT /api/users/{id}
- Update a userDELETE /api/users/{id}
- Delete a user
API Documentation
For detailed API documentation, including request and response formats, refer to the API documentation.