OptimiDoc Server Help Center
Breadcrumbs

Business Rules Engine

The OptimiDoc Business Rules Engine gives administrators policy-driven control over the print workflow. By combining conditions with actions at well-defined points in a job's life — from the moment a user logs in to the moment a job is released at a device — organisations can enforce document policies, reduce waste, tighten security and automate handling, all without writing code.


How the Rules Engine Works

A rule consists of a context, one or more conditions, and one or more actions. The context decides when the rule is evaluated; the conditions decide whether it applies; the actions decide what happens.

  • All of a rule's conditions must be satisfied for it to fire — conditions combine with AND logic.

  • Within each context, rules are evaluated in priority order — a lower priority number is evaluated first — and every rule whose conditions are met applies its actions. A Reject Operation action stops the job from proceeding.

  • Each rule can be enabled or disabled, and can be duplicated as a starting point for a similar rule.

  • Rule changes take effect immediately and are distributed to all nodes in the installation, including remote printing nodes.

Importantly, the conditions and actions on offer depend on the context — you can only redirect to a device before printing, for example, because that is the only point where a target device is known.


Rule Contexts

Rules are attached to one of four contexts, each corresponding to a moment in the print workflow:

Context

Evaluated when…

Login

A user authenticates (at a device or the console). Useful for greeting or blocking users, or releasing their waiting jobs automatically.

Accept Job

A print job is received and accepted onto the server — before it is stored for release.

Before Print

A held job is about to be printed at a device. This is where output is modified (duplex, monochrome, watermark) or redirected.

Release Job

A user releases a job at a device. Useful for final checks and notifications.


Conditions

Conditions test attributes of the user, the device or the job. The fields available depend on the context; the full set is:

Condition

Matches on

User / Login

A specific user, or their login name.

User's Group

Membership of a user group.

Department

The user's department.

Device / Device tags

A specific device, or devices carrying a tag.

Queue

The print queue the job arrived on.

Job Title

The document name.

Job Type

The type of operation.

Number of Pages

The size of the job.

Current Consumption

The user's current quota consumption.

Job Consumption Estimate

The estimated cost of the job about to print.

Date

The current date.

Each condition is compared using an operator: Is, Is Not, Contains, Starts With, Matches (Regex), Greater Than, Less Than or Equal — so text fields can be pattern-matched with regular expressions and numeric fields can be compared against thresholds.


Actions

Actions are what a rule does when its conditions are met. The actions available depend on the context:

Action

Effect

Reject Operation

Reject the job or operation (optionally with a message).

Force Black & White

Convert a colour job to monochrome.

Force Duplex

Force double-sided output.

Add Watermark

Overlay a text watermark on printed pages.

Redirect to Device

Send the job to a different device.

Redirect to User

Reassign the job to another user.

Print All Jobs

Release all of the user's waiting jobs (typically on login).

Save Job Preview

Store a preview image of the job.

Send Email Notification

E-mail the job owner.

Send Email To

E-mail a specified address.

Run Script

Execute a script or program.

For example, Force Black & White, Force Duplex, Add Watermark and Redirect to Device are available in the Before Print context, while Print All Jobs is available at Login.


Worked Examples

  • Reduce paper wasteBefore Print: if Number of Pages is Greater Than 10, Force Duplex.

  • Control colour costsBefore Print: if Department Is Finance, Force Black & White.

  • Protect confidential documentsBefore Print: if Job Title Contains confidential, Add Watermark.

  • Auto-release on loginLogin: if User's Group Is Reception, Print All Jobs.

  • Block and alertAccept Job: if Job Title Matches a forbidden pattern, Reject Operation and Send Email To the security team.


Managing Rules

Rules are managed from the Rules page in the web console:

  • Filter the rule list by context and create, edit, duplicate, enable/disable or delete rules.

  • Reorder rules within a context to set their evaluation priority.

  • Changes are applied immediately and propagated to every node, so policy stays consistent across the whole installation.

For the complete field, operator and action reference, and for what each context exposes, see Conditions and Actions Reference and Rule Contexts Reference.


In Summary

The Business Rules Engine is the policy backbone of OptimiDoc's print workflow. By evaluating context-appropriate conditions and applying actions at login, on job acceptance, before printing and on release, it ensures that every job aligns with organisational standards for cost, security and sustainability — automatically and consistently.