
Workflows and transitions provide a controlled, auditable way to manage important changes in The Smart DMS.
Instead of allowing sensitive updates to happen instantly, this system ensures that changes follow defined rules, approval steps, and clear accountability.
What is a Workflow? #
A workflow defines how a specific change is allowed to happen.
It answers questions like:
- What is being changed?
- From which value to which value?
- Who must review or approve the change?
- In what order should approvals happen?
A workflow is configured for:
- A specific model (for example, a task)
- A specific attribute (such as status or marketer)
- A defined context (such as updating a record)
- Optional starting and ending states
- One or more approval steps, assigned to roles or users
Once active, the workflow becomes the rulebook for that type of change.
What is a Transition? #
A transition is a real change request created when someone attempts to update a record in a way that matches an active workflow.
Instead of applying the change immediately:
- A transition is created
- The request is tracked
- Approval steps are followed
- The change is only finalized once all required steps are completed
Each transition records:
- Who requested the change
- What is changing (from → to)
- Why the change was requested
- Any related adjustments
- The current approval status
- A full activity and audit trail
How They Work Together (At a High Level) #
- A workflow defines the rules
- A user attempts a matching change
- A transition is created
- Approval steps are followed in order
- The change is either approved and applied, or declined
Simple Example: Task Bounce Approval Workflow #
Imagine a task that is currently in Pending status.
An employee realizes that the task cannot proceed due to a delay, missing information, or an external issue. Instead of changing the task status immediately, the system applies a workflow to control how this change happens.
Step 1: Workflow Setup (Behind the Scenes) #
A workflow is configured with the following rules:
- Model: Task
- Tracked Attribute: Status
- From: Pending
- To: Bounced
- Context: Update
- Approval Role: Admin
This means:
Any attempt to change a task’s status from Pending to Bounced must be reviewed and approved by an Admin.
Step 2: Employee Requests the Change #
- The employee updates the task status to Bounced
- The system does not apply the change immediately
- Instead, a transition request is created
- The employee is asked to provide a reason (for example: delay, unavailable client, or missing materials)
At this point:
- The task remains in Pending
- The change is waiting for approval
Step 3: Admin Reviews the Request #
- An Admin sees the transition in the Transitions list
- The Admin can review:
- The task details
- The requested status change
- The reason provided by the employee
- Any related adjustments or notes
Step 4: Approval or Decline #
- If approved:
- The task status changes from Pending → Bounced
- The transition is marked as Approved
- The action is logged for audit purposes
- If declined:
- The task status remains Pending
- The transition is marked as Declined
- The request history is still preserved
