DocView Workers do the automatic work in DocView Capture: OCR, separation and classification, extraction and validation, PDF generation and export, and polling of import folders and mailboxes. A DocView Worker is a separate program (a Windows service on premises, or a WebJob on Azure). You can run one DocView Worker or many. All DocView Workers take their work from the same queue in the database, so adding a DocView Worker adds capacity.
The DocView Workers page shows every DocView Worker's status and lets you decide what each one does. Go to Administration › DocView Workers. You need the permission Admin.Settings.
DocView Worker status
The Status table refreshes every 10 seconds. Click Refresh to update it at once.
| Column | Meaning |
|---|---|
| DocView Worker | The DocView Worker's name, with the machine name and process number under it. |
| Status | idle, busy, paused or offline. |
| Profile | The profile the DocView Worker follows. Choose another one from the list to give the DocView Worker that profile; By name lets it follow the profile with its name, or * (default). |
| Version | The DocView Worker's program version. |
| Running since | When the DocView Worker started. |
| Last seen | The DocView Worker's last heartbeat. DocView Workers report every 30 seconds. |
| Working on | The batches it is processing now, with the module and minutes so far. Click a batch to open it. |
A DocView Worker counts as offline when it has not reported for 2 minutes. Offline DocView Workers stay in the list for a day. DocView Workers that stopped more than a week ago are removed.
Warnings
Warnings at the top of the status table tell you about work that no running DocView Worker would pick up, for example:
No running DocView Worker takes PDF generation & export for Sample Invoices: its batches wait in that step.
This happens when every DocView Worker is paused, offline, has that module set to 0, or excludes that Batch Setup. Fix the profiles, or start a DocView Worker.
DocView Worker names
A DocView Worker is known by its name. It is the Worker:Name setting in the DocView Worker's appsettings.Production.json, or the computer name when the setting is empty. The IIS install script sets it from its -WorkerName parameter, for example ocr-01.
Profiles you choose for a DocView Worker, and profiles named after a DocView Worker, are matched by this name. Give each DocView Worker a stable, meaningful name, especially when several run on one server.
Worker profiles
A profile says what a DocView Worker does:
- which automatic modules it runs, in order of priority;
- how many batches it processes at once, in total and per module;
- which Batch Setups it takes batches from, and which of them it takes first;
- which batch priorities it takes, for example only urgent ones;
- whether it polls import folders and mailboxes;
- whether it is active or paused.
Rules for which profile a DocView Worker follows:
- The profile chosen for the DocView Worker in the Profile column of the status table.
- Otherwise, a profile with the DocView Worker's own name.
- Otherwise, the profile named
*, which applies to every DocView Worker without its own profile. - Without any profile, the DocView Worker runs every module.
So you can make a few named profiles, such as Urgent OCR or Export only, and choose one for each DocView Worker. Several DocView Workers can share a profile.
Running DocView Workers pick up profile changes within 15 seconds. You do not need to restart them.
Create or change a profile
- On Administration › DocView Workers, open New profile, or open an existing profile.
- In Profile name, type a name such as Urgent OCR, a DocView Worker's name, or
*for all other DocView Workers. The list suggests names of DocView Workers that have reported. - Set Batches at once (total): 1 to 64.
- Leave Active (untick to pause) ticked. Untick it to pause the DocView Worker.
- Tick or untick Polls import folders and mailboxes.
- Under Modules, highest priority first:
- use the arrows to put the modules in order of priority;
- set at once for each module (0 to 32). 0 means the DocView Worker does not run that module.
- Under Batch Setups, leave All Batch Setups ticked, or untick it and tick the Batch Setups this DocView Worker should serve.
- Optionally, set Priorities, for example
1–3for a DocView Worker that only takes urgent batches. 1 is the highest priority and 10 the lowest. Leave both empty for all. - Optionally, add Batch Setups under Batch Setups first. Their batches are taken before any others, in the order of the list (use the arrows); other batches follow by priority, then age.
- Optionally, add Notes, for example "OCR server in the data centre".
- Click Save profile.
- In the status table, choose the profile in the Profile column of each DocView Worker that should follow it (not needed for
*or a profile with the DocView Worker's name).
To remove a profile, open it and click Remove. Its DocView Workers then follow the profile with their name or the * profile, or run every module if there is none.
How priorities work
A DocView Worker has a number of free places, up to Batches at once (total). When a place is free, the DocView Worker gives it to the first module in the list that has work and still has a free place of its own (its at once value).
For example, a profile with a total of 4, PDF generation & export ×1 first and OCR, separation & classification ×4 second means: export is served first whenever a batch is waiting, but never uses more than one place, and OCR fills the rest.
The automatic modules you can list are:
| Module | What it does |
|---|---|
| OCR, separation & classification | Image cleanup, OCR, separation into documents and classification. |
| Extraction & validation | Finds field values with finders and validates them. |
| PDF generation & export | Converts images, runs output scripts, writes data files and delivers to destinations. |
Tip: OCR is CPU-bound. On a 4-core server, start with Batches at once close to the number of cores for OCR, and 1 or 2 for export. Watch the dashboard throughput and adjust.
Pausing a DocView Worker
Untick Active and save. Within 15 seconds the DocView Worker stops taking new batches. Batches it is already working on finish. Its status shows paused.
Pause a DocView Worker before planned maintenance on its server. When you stop the Windows service, batches it was holding go back to the queue.
Import polling
Watched folders and mailboxes are polled by DocView Workers. Each source is polled by only one DocView Worker at a time, even when several DocView Workers have polling on, so two DocView Workers never import from the same source at once.
Turn Polls import folders and mailboxes off for DocView Workers that cannot reach the import folders, or that you keep for OCR only. See Import sources.
Scaling out
Because DocView Workers share the queue, you scale by adding DocView Workers:
- On premises: install the DocView Worker service on more servers with
Install-DocViewWorker.ps1, each with its own-WorkerName. Every server must reach the same database and the same storage (a file share, or Azure Blob Storage). With more than one server, they must also share the key ring certificate. See Install on IIS. - On Azure App Service: increase the plan size or the number of instances. Each instance runs one DocView Worker. For heavy loads, move the DocView Worker app to its own plan. See Install on Azure.
Typical set-ups:
| Set-up | Profiles |
|---|---|
| One server | No profile needed. The DocView Worker runs everything. |
| Dedicated OCR servers | ocr-01, ocr-02: OCR and extraction only, import polling off. *: export and import polling. |
| A priority customer | vip-01: only that customer's Batch Setups. *: all Batch Setups. |
| Urgent work never waits | Urgent, chosen for ocr-03: priorities 1–3 only. *: all priorities. |
| One customer first | Customer A first: that customer's Batch Setup under Batch Setups first, then everything else. |
Troubleshooting
| Symptom | What to check |
|---|---|
| Batches wait in an automatic step. | Read the warnings on this page. Is a DocView Worker online? Is its profile paused? Does it run that module and that Batch Setup? Does its priority range include the batch's priority? |
| A DocView Worker shows offline. | Is the Windows service or WebJob running? Check the DocView Worker's log files and its health endpoint /health/ready. |
| A DocView Worker never appears. | Its connection string points to another database, or it cannot reach the database. |
| Import folders are not picked up. | At least one online DocView Worker must have import polling on and access to the folder. |
Profile changes are recorded in the audit log as WorkerProfileSaved, WorkerProfileAssigned and WorkerProfileDeleted.