Comments (4)
@thomasWajs You can give an example of what you're trying to accomplish? You can pass in options to the select type like this:
@select_rule_variable(options=[1,2,3])
def some_number(self):
return 2
Also - if you found a bug in business-rules-ui, we'd appreciate a pull request for a bug fix!
from business-rules.
It's not about select type for rule variables for conditions, it's about select parameter for actions :
@rule_action(params={"target_folder": FIELD_SELECT})
def classify(self, target_folder):
target_folder.add_document(self.document)
In business-rules-ui, this case were handled in the original project, but not in your fork anymore. Before submitting any pull-request for the UI, it would be necessary to enable this feature in business-rules.
from business-rules.
Ah I see. Do you wanna take a stab at implementing it?
from business-rules.
I could take the time to contribute, but I'm concerned about the way to pass around these options.
The original business-rules-ui expected a dictionnary in the form
{'fields': [{label: "Email Template", name: "template", fieldType: "select", options: [
{label: "Welcome Email", name: "welcomeEmail"},
{label: "Followup Email", name: "followupEmail"},
...
]}
Which is not possible anymore since you modified the expected format to
'params': {'template': 'select'}}],
Which is way more restrictive. There's no way to specify distinct name/label, and there is no way to specify the options.
Any thought on reverting back to the original format ?
from business-rules.
Related Issues (20)
- Passing a query-set instead of an object in variables.py (Bulk Support) HOT 1
- numeric_rule_variable issue for the attributes like "Age" HOT 1
- Defining a ruleset HOT 1
- For every business rules
- Calculate variables from an api response? HOT 1
- Variable compared to another variable HOT 2
- syntax error in example in README? HOT 3
- Setting default evaluation value for a rule variable HOT 1
- Use decorators, type hinting and docstrings to make it awesome HOT 1
- Ability to pass parameters into the Rule variables HOT 1
- Implement proper method to get core path and system path in tests
- not_equal_to operator is not working in both string and numeric types. HOT 1
- Async function in specified action
- Use both ANY and ALL conditions together in one rule
- setuptools - ValueError: Newlines are not allowed HOT 2
- Capture conditions which satisfies a rule
- How to pass parameters into variables? HOT 1
- Even the operator has no value (FIELD_NO_INPUT) the lib looks for value property and throw a key error.
- The given example is not meaningful, and the rule definition is incorrect (json payload in Github page). HOT 2
- Add "not_" operators to string_rule_variables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from business-rules.