Skip to content
Project FourDocumentation
Project Four

Workflow

Level:IntermediateWritten for:Data AdministratorTime to complete:4 minApplies to:Applies to 1.0 and later

The workflow engine is what makes Project Four configurable rather than fixed. A transaction type is defined by its states, the transitions between them, and who may perform each transition.

Workflow building blocks
FieldTypeRequiredDescriptionNotes
StateDefinitionYesA named position in the lifecycle, e.g. Draft or Approved.Exactly one state at a time
TransitionDefinitionYesA permitted move from one state to another.Named after the action, e.g. Submit
GuardRuleNoA condition that must hold for a transition to be offered.E.g. total is within the approver limit
ActionRuleNoSomething that happens as a side effect, such as a notification or a posting.
Role bindingPermissionYesWhich roles may perform the transition.

Workflow building blocks

Project Four ships with a four-state workflow that covers most approval processes.

Default workflow
StepActionWhoResult
1CreateOriginatorDraft
2SubmitOriginatorPending Approval
3ApproveApproverApproved
4ReturnApproverDraft, with comments
5RejectApproverRejected (terminal)
6CloseOriginator or ApproverClosed (terminal)

Default workflow

Routing is driven by the transaction value against the approver’s limit.

The transaction is submitted

The engine reads the transaction total and the originator’s organisation unit.

Candidate approvers are found

Every user whose role grants Approve on this transaction type, and whose approval limit is at or above the total, within the same organisation unit.

The transaction is routed

If one candidate is found, it goes to them. If several, it goes to all of them and the first to act decides.

Escalation

If no candidate has a sufficient limit, the transaction escalates to the next organisation level until one does.

Expected result

The transaction shows Pending Approval with the named approver (or approvers) visible on the transaction, and each of them sees it on their dashboard.

Open Configuration → Workflow, select the transaction type, and add the state with a name and a type (in-progress or terminal). Then add at least one transition into it and one out of it — a state with no way in is unreachable, and the validator will reject the workflow.

Frequently asked questions

Can a transaction skip a state?

Only if a transition exists that goes directly there. The engine never skips — if it looks like it did, there is a transition you had forgotten about.

Who can approve their own transaction?

Nobody, unless self-approval is explicitly enabled for the transaction type. It is off by default and turning it on is recorded in the audit log.

What happens if the approver is on leave?

Use delegation on the user record. Delegated approvals are recorded against both the delegate and the original approver.