Skip to main content
A workflow holds the rules for the company side of a signature: which representatives sign, how many of them are needed, whether they sign in person or unattended, and whether the company signs before or after the customers. The customer side comes from the consumer; the company side always comes from a workflow.

What a workflow holds

A representative comes from the catalogue signature_enterprise_signer. Each one has a display name, a credential reference for its signing certificate, a reference to the proof that it represents the company and, for unattended signing, a reference to its recorded consent. The seeded defaults (home, horeca and business) use company_phase = last and a count quorum of one representative; the admin API can change them.

Resolution and snapshot

  1. Pick the workflow. The workflow assigned to the contract wins; otherwise the active default of its business unit. With neither, the group cannot open.
  2. Keep usable representatives. Inactive representatives, or those whose validity has ended, are skipped. An unattended seat without its consent reference stops the group from opening, and so does a workflow with no usable representative left.
  3. Apply the quorum. With count, the first N required seats by signing order are used. The group cannot open if the workflow has fewer. With all, every required seat is used, or every seat when none is required.
  4. Freeze it. The resolved workflow, with its seats, is stored on the group as workflow_snapshot. Changes to the workflow itself do not alter a group that is already open. The representatives are a different matter: when an unattended seat signs, the engine checks the representative’s current status, validity and credential, and sealing uses its current credential. A representative revoked while a group is open stops that group’s unattended signature while that seat is still pending.

Phase order

The phase gate decides which side may act now. When both sides are complete, the engine seals the PDFs.
A consumer can hold the company phase back. Digital contracting parks a last group until Maihue operations approve the contract, and only then starts the unattended company signature. See Digital contracting — Signing.

Admin API

Replacing a representative is a revoke plus a new representative added to the workflow. New groups pick up the new one; an open group whose unattended seat for the revoked one is still pending cannot complete its signature.

Code

Paths are relative to backend/horizon-api/.