This action deliberately stops a Ruleset and ends it in an error state. Most Ruleset actions move, convert, or inspect data. This one is a control action that halts processing when your own logic decides the data isn’t acceptable.
You normally pair it with a condition (an If rule or a Composite Rule). The error is raised only when that condition is true, so valid documents flow through untouched.
Category: Data operations Ruleset Actions (same group as Move, LogInfo, and BreakLoop)
Why use it
Clarify checks data types on rule inputs and outputs, but it can't know your business rules. A value can be the correct data type and still be wrong for your process. ForceTransformationError lets you enforce those rules so bad data fails visibly instead of being passed downstream.
Possible use cases
- Required field is missing: Fail the transformation if a mandatory value (PO number, partner ID, ship-to location) is blank.
- Unexpected or unsupported values: Stop on an unknown document type, unrecognized qualifier, or currency code you don't handle.
- Business rule violations: Reject a document when a total is zero or negative, or quantities don't reconcile with line items.
- Preventing partial or corrupt output: Halt before a target document is built from data you know is unreliable, so a downstream system never receives it.
- Triggering error handling: Make the failure visible so your Business Process error handling and support team can respond.
Example
Scenario: An inbound 850 Purchase Order is mapped to a flat-file format for an ERP system. The ERP can't process orders without a buyer PO number, so any order missing one should fail immediately.
Ruleset:
| Step | Rule type | Condition | Action |
|---|---|---|---|
| 1 | If | BEG/BEG03 (PO number) is empty | ForceTransformationError |
| 2 | Move | (always) | BEG/BEG03 to PONumber |
Result: If the PO number is present, step 1 is skipped and the Move runs normally. If it's blank, the Ruleset exits with an error, so no incomplete record reaches the ERP and the failure is clear to whoever monitors the process.
Pairing with LogInfo
ForceTransformationError says that something failed, but not necessarily why. Put a LogInfoWithLabel (or LogInfo) rule just before it in the same condition to record the offending value:
| Step | Action | Purpose |
|---|---|---|
| 1 | LogInfoWithLabel (Label: Missing PO number, SourceNode: the document or partner ID) | Records context in the Details section |
| 2 | ForceTransformationError | Stops the Ruleset |
Order matters: log first, then force the error, because nothing after the error action will run.
Tips and best practices
- Always put it behind a condition. Unconditionally, it fails every document.
- Log the reason before raising the error, as shown above.
- Use it for conditions that should stop the whole transformation. If you only want to skip a value or leave a field empty, a conditional Move is usually a better choice.
- Test with both a valid and an invalid sample document to confirm good data passes and bad data fails as intended.
- Make sure the Business Process that calls the Ruleset handles the error path (alerting, retry, or routing to an error queue) rather than failing silently.
Comments
0 comments
Please sign in to leave a comment.