Skip to main content

Control Processes

A Control Process is a Spreadsheet Process that validates inputs and controls workflow before triggering calculation Processes.

A Control Process is a Spreadsheet Process that validates inputs and controls workflow before triggering calculation Processes. Its purpose is to prevent a calculation from running with invalid parameters or under inappropriate conditions.

Without a Control Process, a user can run a calculation with a misspelled reference, an invalid date range, or a period that exceeds what the workbook was designed to handle. The calculation may then fail mid-execution, produce incorrect results, or attempt to write to locked data. A Control Process catches these problems before the calculation runs.

This pattern applies to any complex or parameter-driven workflow, not just specific domains. If a Process relies on user-supplied parameters and incorrect values could cause data integrity problems, a Control Process is worth building.


What a Control Process does

Parameter validation — before triggering a calculation, the Control Process checks that the supplied parameters are valid. This can include checking that a referenced record actually exists, that a date range is sensible (start before end), that the period length is within the workbook's designed limits, that the date is not in the future, or that the period is not locked.

If validation fails, the Control Process sets its result to Warning or Failed, raises an appropriate notification, and does not write any records to EU_RUN_PROCESS. The calculation Process is never triggered.

Workflow branching — the Control Process can determine which calculation Processes to run and for which periods. For example, if a user requests calculations for a range of dates but data only exists up to a certain point, the Control Process can generate EU_RUN_PROCESS records only for dates where data is available, skipping the rest.

Setting hidden parameters — a Control Process can supply parameters to a calculation that are not exposed to the user. For example, two separate processes — "Run Provisional" and "Run Final" — can both call the same underlying calculation Process, with the Control Process setting a status parameter that the calculation uses to determine which path to execute. This avoids duplicating calculation logic.


Design principle

A calculation Process should focus on one thing: performing calculations and writing results. Validation, decision-making, and workflow control should be handled by a separate Control Process.

This separation makes both Processes easier to maintain. The calculation Process has a clear, bounded responsibility. The Control Process handles all the conditional logic that determines whether, when, and how the calculation runs. When something goes wrong, it is easier to identify which layer the problem is in.

Control Processes cannot be applied to Import Processes. Imports are the first step in their own chain and must handle incoming data directly.


How it works in practice

The Control Process receives the same parameters the user supplied. It performs its validation checks. If everything is valid, it writes one or more records to EU_RUN_PROCESS — one per calculation that should run, each with the appropriate parameter string. The platform then executes those calculations in sequence.

If validation fails, the workbook logic leaves the EU_RUN_PROCESS output range blank (or returns blank rows). No records are written, no calculations are triggered, and the notifications explain to the user what was wrong.


Configure a Control Process

A Control Process is a standard Spreadsheet Process — there is no special type. Configure it the same way as any other Process. See Create and Configure a Process.

The key differences from a straightforward calculation Process are:

  • The workbook includes validation logic before generating the EU_RUN_PROCESS output.

  • The result status is set to Warning or Failed when validation fails, rather than only when a calculation error occurs.

  • The EU_RUN_PROCESS output range is populated conditionally — blank rows are not submitted to the queue.

  • The EU_NOTIFICATION output communicates validation failures clearly to the user.

See Chain Processes in a Workflow for how to configure the EU_RUN_PROCESS output, and Process Notifications for how to define notification messages.

Did this answer your question?