You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Process Methods in FlexiRule can define their configuration structure inconsistently. This makes validation, UI generation, documentation, and long-term compatibility harder.
This discussion proposes introducing a standardized config_schema contract for all Process Methods, enforced by the engine at registration and execution time.
We've tried to align as closely as possible with Frappe's existing standards for field types and schemas. However, to meet FlexiRule's specific needs—such as dynamic autocompletion—we'll need to introduce new field types like DocField (an autocomplete field where options are fetched from a DocType or context), among others. This will extend Frappe's capabilities while maintaining compatibility where feasible.
Problem
No single, enforced schema format for Process Method configuration
Validation logic is duplicated or implicit
Rule Builder cannot reliably render or validate method configs
Breaking changes in Process Methods are hard to detect
Proposed Solution
Require every Process Method to expose a config_schema attribute
Use JSON Schema (draft-07 or later) as the canonical format
Enforce schema validation:
When syncing methods from code
Before execution at runtime
Store schema hash/version to detect incompatible changes
Acceptance Criteria
Engine rejects Process Methods without config_schema
Invalid rule configuration fails fast with clear error
Rule Builder can consume schema to render inputs
Schema changes are detectable (version or hash)
Backward compatibility strategy is defined
Impact
Stronger contracts between rule authors and method authors
Safer runtime execution
Better UX for Rule Builder
Clear upgrade path for Process Methods
Notes
This aligns with FlexiRule’s contract-first and fail-fast design principles.
documentationImprovements or additions to documentationquestionFurther information is requestedIdeasSharing idea about implementing
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Standardized config_schema for Process Methods
Currently, Process Methods in FlexiRule can define their configuration structure inconsistently. This makes validation, UI generation, documentation, and long-term compatibility harder.
This discussion proposes introducing a standardized config_schema contract for all Process Methods, enforced by the engine at registration and execution time.
We've tried to align as closely as possible with Frappe's existing standards for field types and schemas. However, to meet FlexiRule's specific needs—such as dynamic autocompletion—we'll need to introduce new field types like
DocField(an autocomplete field where options are fetched from a DocType or context), among others. This will extend Frappe's capabilities while maintaining compatibility where feasible.Problem
Proposed Solution
Acceptance Criteria
Impact
Notes
This aligns with FlexiRule’s contract-first and fail-fast design principles.
Beta Was this translation helpful? Give feedback.
All reactions