-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return Fired rules actions results. #34
base: master
Are you sure you want to change the base?
Conversation
actions_results[method_name] = method(**params) | ||
|
||
return dict((method_name, actions_results[method_name]) for method_name | ||
in actions_results.keys() if actions_results.get(method_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if None is expected result from method? you should not filter None value
I am wondering if there is still interest in seeing this one through (edit: I am happy to create a separate PR if not). This is a valid use case. One alternative approach here would be to return a tuple in all cases. The first element is the result bool, the second is the output. This would allow us to consider None as a valid result. |
@bhargavrpatel We also have a need for this use case. Ideally, though we could return a business description with the resulting value. My initial ideas were to tag the conditions with a unique id, these ids could be linked to descriptions end users could understand. We essentially want end users to understand how the engine arrived at the result. |
No description provided.