Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

slitayem
Copy link

No description provided.

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))

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

@bhargavrpatel
Copy link

bhargavrpatel commented Jan 5, 2020

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.

@jreeter
Copy link

jreeter commented Nov 14, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants