I would like to ask for recommendations regarding setting conditions in Workflow Transition Rules in Frappe.
My requirement is to validate data groups so that users with the same role can perform actions differently based on the group they belong to.
From my testing, I found that this can be achieved by using functions like get_list and get_doc within the condition logic.
However, the challenge is that when I have multiple Transition Rules, I need to define the same condition repeatedly in each rule. This leads to duplicated logic and makes maintenance more difficult.
So I would like to ask:
Is there a better approach to avoid repeating the same condition across multiple Transition Rules?
Are there any recommended best practices for centralizing or reusing this type of logic?
I would appreciate any suggestions or best practices to address:
- Reducing duplicated condition logic in Workflow Transition Rules
Thank you in advance!