AseptSoft Core Documentation

Build Condition Field

The Condition Builder is a guided, click-based interface that helps you construct formal condition expressions without manually typing formulas. It is used to populate the Condition field in Algorithm Design.


⚙️ Overview

A condition expression defines what must be true before the process can advance to the next step. In pharmaceutical manufacturing, conditions are the safety and quality gates that ensure critical process parameters are met before proceeding.

A condition expression typically follows the pattern:

Instrument(s) Operator Parameter/Variable

For example: PIT_01 >= MaxPressure or TIT_01, TIT_02 >= MinTemp

The Condition Builder lets you construct these expressions by clicking items rather than typing.


🖥️ Window Layout

The Condition Builder window is divided into five areas:

Area

Purpose

Selection Area

Click to select Instruments, an Operator, and a Parameter or Variable.

Edit Area

Three text boxes showing current selections — editable for custom values.

Logical Operators

AND, OR, XOR buttons to combine multiple atomic formulas.

Final Formula

Live preview of the complete expression being built.

Commit Area

"Insert Condition" to apply, or "Cancel" to abort.


👣 How to Use

Building a Simple Condition

Step

Action

Result

1

Click one or more Instruments in the Selection Area.

Instruments appear in the first Edit box (e.g., PIT_01).

2

Click an Operator (=, >, <, >=, <=, etc.).

Operator appears in the second Edit box.

3

Click a Parameter or Variable.

Value appears in the third Edit box.

4

Review the Final Formula at the bottom.

Shows the complete expression (e.g., PIT_01 >= MaxPressure).

5

Click "Insert Condition".

The expression is inserted into the condition field.

Note: You can select multiple Instruments at once, but only one Parameter or Variable at a time.

Using Custom Values

Instead of clicking items in the Selection Area, you can type directly in the Edit Area text boxes. This is useful when you want to use a static value instead of a module data reference.

Example: Instead of selecting a variable, type 25l directly in the third text box to create PIT_01 >= 25l.

Building Complex Formulas

To combine multiple conditions with logical operators:

Step

Action

1

Build your first atomic formula (e.g., PIT_01 >= MaxPressure).

2

Click AND, OR, or XOR in the Logical Operators area.

3

The first formula is saved, and the Selection/Edit Areas reset.

4

Build your second atomic formula (e.g., TIT_01 >= MinTemp).

5

The Final Formula shows the combined result: (PIT_01 >= MaxPressure) AND (TIT_01 >= MinTemp).

Tip: Parentheses are added automatically when using logical operators. Uncheck the parentheses checkbox next to the operators if you want to disable automatic parentheses.


✅ Live validation and the dismiss button

The Condition form's main condition field validates expressions live as you type. The familiar visual feedback is unchanged:

Indicator

Meaning

🟢 Green ✓

The expression is valid.

🔴 Red message

The expression is invalid — the message describes what's wrong.

Hovering the red error message reveals a small dismiss icon (a circled cross) at the right edge. Clicking it suppresses the loud red error text from then on — only the green ✓ keeps surfacing for valid expressions, matching the quieter behaviour of the other fields on the form. The setting is environment-wide, so the choice persists across modules.

💡 Why dismiss errors? Experienced users who already know the grammar don't need the verbose error covering the form while they type. The dismiss button is hidden until you actively hover the error, so it never adds visual noise in the happy path. The tooltip on the button explains the consequence before you commit. The green ✓ keeps carrying the positive signal.


✏️ Custom expressions library

If your project uses site-specific tag prefixes, domain-specific verbs, or custom state names that the standard tokens don't cover, the Condition form's Custom expressions button lets you teach the editor about them — once — and have them treated as first-class tokens everywhere on the form.

Click the ⋯ ellipsis button to the left of the condition builder pen icon. A multi-line text window opens — type one custom token per line, click OK, and every condition field on the form refreshes:

Where the new tokens take effect

Behaviour

🎨 Syntax colouring

Each custom token gets the CustomExpressions colour from the Algorithm Colours picker (Teal by default, customisable per environment).

🧠 Validation

The expression engine treats your tokens as defined identifiers — MyCustomToken == 1 validates as a valid expression.

⌨️ Autocomplete

Typing the first letters of a custom token suggests it inline as you author the expression.

Tokens are stored at the environment level, so they are shared across every module in the same environment. To recolour them, open the Algorithm Colours settings and pick a new colour for the CustomExpressions category — every place the tokens appear updates immediately.

💡 Pharma example: a customer using a non-standard naming convention adds tokens like BatchOK, OperatorAck, EmergencyStop. From that point on the Condition form treats them as known identifiers — no more red error wave when they appear in an expression.


🧪 Pharma Example Walkthrough

Scenario: You are configuring a SIP (Steam-in-Place) sterilization step. Before steam can be introduced, the system must verify that the CIP rinse temperature has reached a safe threshold and that the hold timer has elapsed.

  1. Select instrument TIT_CIP_RINSE (the CIP rinse temperature transmitter).

  2. Select operator >=.

  3. Select parameter MinRinseTemp (e.g., 85 °C).

  4. Click AND.

  5. Select instrument TIMER_HOLD_01 (the CIP hold timer).

  6. Select operator >=.

  7. Select parameter MinHoldTime (e.g., 300 seconds).

  8. Final formula reads: (TIT_CIP_RINSE >= MinRinseTemp) AND (TIMER_HOLD_01 >= MinHoldTime).

  9. Click "Insert Condition".

This condition ensures both the temperature and the timer thresholds are satisfied before the process transitions from CIP rinsing to the SIP sterilization phase — a critical safety gate in pharmaceutical production.


💡 Tips

  • The Final Formula area is also directly editable — you can make manual adjustments at any time.

  • You can always return to the Selection Area to modify your picks.

  • Multiple instruments in one formula create a comma-separated list (e.g., TIT_01, TIT_02 >= MinTemp).

  • HasState and HasFluid are available as boolean expression variables — see Fluidstream Simulations for details.

  • Conditions are part of the Algorithm Design workflow — they control the transitions between steps in the SFC Editor.