Logic Composer
Configuration values
Keep thresholds, rates, switches and other settings out of your logic, so you can change them without editing blocks or flows.
A configuration value is a named, typed setting that your logic reads at run time, such as an approval threshold, a tax rate, a feature switch or a cut-off date. Instead of typing 50000 into ten expressions, you create one configuration value and refer to it everywhere. When the business changes the threshold, you change one record and every block and flow picks up the new value.
One configuration record holds one value. It is not a group of settings: for a tax rate, an approval threshold and a discount cap, create three configuration records.
Create a configuration value
Section titled “Create a configuration value”- Go to Logic FabricSettingsConfigurations and select New.
- Enter a Name (for example
ApprovalThreshold) and choose the Project. - Choose the Type. It is locked after the first save.
- Enter the Value. The editor matches the type.
- Choose the Cache Strategy and, for Cache with TTL, the Time to Live (Minutes).
- Use the Docs tab to note what the value is for and who may change it.
- Save the form.
Settings
Section titled “Settings”| Setting | What it does | Notes |
|---|---|---|
| Name | The name you pick in expressions | Letters, numbers, spaces, hyphens and underscores. Locked after the first save. |
| Project | The project the value belongs to | Locked after the first save |
| Type | The kind of value | Boolean, DateTime, Decimal, Float, Integer, Money or String. Locked after the first save. Changing it before saving clears the value. |
| Value | The value itself | A text box for String, a number box for Decimal, Float, Integer and Money (negative numbers are allowed), a date and time picker for DateTime, and a True/False list for Boolean |
| Cache Strategy | How quickly a change to the value takes effect | Do Not Cache or Cache with TTL |
| Time to Live (Minutes) | The longest time a change can take to take effect | Used with Cache with TTL |
The Type list on this form uses its own names. In expressions the same kinds appear as Yes/No (Boolean), Date and Time (DateTime), Decimal Number, Floating Point Number (Float), Whole Number (Integer), Currency (Money) and Text (String).
Choose a cache strategy
Section titled “Choose a cache strategy”| Cache Strategy | Behaviour | Use it for |
|---|---|---|
| Do Not Cache | Every use reads the latest saved value, so a change takes effect immediately | Values you change often, or that must apply at once, such as a feature switch you may need to turn off quickly |
| Cache with TTL | A change can take up to the Time to Live (Minutes) to take effect | Values that rarely change and are used in busy logic, such as a VAT rate read by every quote |
For example, with Cache with TTL and a Time to Live of 60, a new approval threshold can take up to an hour to apply everywhere. Plan changes accordingly, or use Do Not Cache while you are still tuning a value.
Use a value in logic
Section titled “Use a value in logic”You do not type expressions; you build them in the expression editor. In the picker, open the Value category and choose Configuration Value, then pick the configuration by name. The expression returns the value with the type the slot needs, so a Money configuration fits a Currency slot and a Boolean configuration fits a Yes/No condition. The formula shows the configuration’s name, for example:
estimatedvalue > ApprovalThresholdYou can use configuration values everywhere expressions are allowed: in logic block formulas and conditions, decision table and tree cells, flow step settings, the Applies When: condition of a recipe item, and preconditions. See Expression functions.
Different values per environment
Section titled “Different values per environment”Development, test and production usually need different values, for example a lower approval threshold in test or a different ERP account number. When you deploy with the Logic Fabric CLI:
generate-mappingsextracts the data map files from a project package. They contain the environment-specific configuration values, localized resources, service connections and record references.- Edit a copy of the map files for each environment.
- Pass them to
importwith-m, or apply them later withapply-mappings.
See Data mapping for the full procedure.
How it behaves
Section titled “How it behaves”- A configuration value that a logic block, logic flow or logic recipe uses cannot be deleted (“Configuration entry is in use. Remove all dependencies before deleting.”). Remove it from the logic first.
- In a project whose solution is managed, the configuration opens read-only. Use data map files to change values in those environments.
Example: opportunity approval
Section titled “Example: opportunity approval”A sales organization needs approval for large opportunities and applies a regional VAT rate on quotes. Create three configuration records:
| Name | Type | Value | Cache Strategy |
|---|---|---|---|
ApprovalThreshold |
Money | 100000 |
Cache with TTL, 60 minutes |
VatRate |
Decimal | 0.05 |
Cache with TTL, 1440 minutes |
ApprovalEnabled |
Boolean | True | Do Not Cache |
The recipe item that starts the approval process uses Applies When: And(ApprovalEnabled, estimatedvalue > ApprovalThreshold). When the finance team raises the threshold to 150000, they update one record, and the new limit applies within the hour. If the approval process must be switched off during an outage, setting ApprovalEnabled to False takes effect immediately.