April 25, 2023 08:22 PM by Alex @Anonymous. It is a dependency for the Engine's and all Editor's dlls on all web platforms. It'll be loaded and updated automatically when you reference (or update) the CodeEffects.Rule.Web.Core assembly from NuGet.
April 25, 2023 07:58 PM by Anonymous CodeEffects.Rule.Common is unlisted but it is a dependency for CodeEffects.Rule.Web.Core.. any issues with the common package?
February 08, 2023 04:35 AM by Alex February 08, 2023 03:52 AM by Hanne Is there support for custom styles?
December 23, 2022 05:18 AM by Alex @Wolf. Thank you for letting us know!
December 22, 2022 03:48 PM by Wolf @Alex
We found out our security content policy was blocking the eval function which caused the error.
December 21, 2022 04:46 PM by Wolf @Alex
I've tried this but no success (now i get the CL41 error locally too).
It seems strange to me that a json error would only appear on our dev site but not locally as the settings we receive from our server are the same.
It crashes on this line:
this.editor = this.window.CodeEffects.Rule.init(response.editorData);
This is the response of our server:
{
"editorData": "{id:'PromotionRuleEditor',z:false,e:{e101:&#x 27;Your browser does not allow access to clipboard. Use Internet Explorer version 7 and up.',e102:'This rule is invalid. Hover over each highlighted element for details.',e103:'Name of the rule cannot be blank.',e104:'Required field',e105:'You are about to delete this rule. All other rules that may reference it will be affected. This action cannot be undone. Continue?',e106:'You cannot submit an empty rule.',e107:'The highlighted rule elements could not be located in the current source object. Please update this rule or roll back all changes made to the source object.',e108:'The input value is greater than the maximum value set for this field',e109:'The input value is less than the minimum value set for this field',e110:'This field does not allow decimal values',e111:'This field does not allow negative values',e112:'This field accepts numeric value only',e113:'The input value already has a decimal point',e114:'The value input has not been completed. Click anywhere outside of the Rule Area and try again.'},h:{i101:'Click inside of the Rule Area to begin a new rule',i102:'Click anywhere inside of the Rule Area to modify the rule',i103:'Select a field or parenthesis from the menu; hit Space Bar if it's hidden',i104:'Select an operator from the menu; hit Space Bar if it's hidden',i105:'Type the value; use Backspace to delete, Enter or arrow keys to complete',i106:'Select calculation elements from the menu; hit Space Bar if it's hidden',i107:'Click to edit the value; hit Space Bar and select a clause to continue',i108:'Build calculation by selecting elements; hit Space Bar if the menu is hidden',i109:'Use your mouse to pick a date',i110:'Select an action from the menu; hit Space Bar if it's hidden',i111:'Select a clause or parenthesis from the menu; hit Space Bar if it's hidden',i112:'Use Arrows, Home, End, Tab, Backspace, or Delete keys to edit this rule',i113:'Hit Space Bar to insert a new value; use Right Arrow to edit existing value',i114:'Hit Space Bar to bring up the date picker',i115:'Delete the date or select a clause from the menu; hit Space Bar if it's hidden',i116:'Use your mouse to pick the time; click OK to select it',i117:'Hit Space Bar to bring up the time picker',i118:'Delete the time or select a clause from the menu; hit Space Bar if it's hidden',i119:'Select a value from the menu; hit Space Bar if it's hidden',i120:'Delete the value or select a clause from the menu; hit Space Bar if it's hidden',i121:'Use Left Arrow to edit, Backspace to delete; hit Space Bar to continue',i122:'Make your selection; hit Space Bar if the menu is hidden',i123:'Type or select the parameter's value; hit Space Bar if selection is hidden',i124:'Use arrows to navigate the rule or Delete, Backspace and Space bar to edit it',i125:'Select a flow element from the menu; hit Space Bar if it's hidden',i126:'Create a new rule or select an existing one for editing',i127:'Select a new field from the menu to replace the current one',i128:'Select a new action from the menu to replace the current one',i129:'Select a new operator from the menu to replace the current one',i130:'Select a new clause from the menu to replace the current one',i132:'Pick a new date or select a field from the menu to replace the current one',i133:'Pick a new time or select a field from the menu to replace the current one',i134:'Select a new value from the menu to replace the current one',i135:'Select a collection field from the menu; hit Space Bar if it's hidden',i136:'Select a new type from the menu to replace the current one',i137:'Press Ctrl-X to cut, Ctrl-C to copy, Ctrl-V to paste',i138:'Copied {0} rule elements',i139:'Stored {0} rule elements'}}",
"sourceData": "{ui:[true,true,\"Check if\",\"\",true,null,false,true,true,true,1,null,null,nul l,null],s:{lbl:{c:\"Add a calculation...\",s:\"Enter a string...\",b:\"Select a value...\",e:\"Select a value...\",m:\"Enter a number...\",v:\"Pick a date...\",j:\"Pick a time...\",g:\"- click here to begin a new rule -\",em:\"-empty-\",eg:\"OTHER\",h:\"Exists...\",l:\"Does not exist...\",pb:\"(\",pe:\")\",cb:\"{\",ce:\"}\",ub:\"(\", ue:\")\",n:\"NAME\",d:\"DESCRIPTION\",a:\"Save\",u:\"Del ete\",r:\"Rules\",y:\"New rule...\",t:\"True\",f:\"False\"},fls:[{n:\"\",v:\"if\", t:0}],cls:[{n:\"and\",v:\"and\",t:6},{n:\"or\",v:\"or\", t:6}],dsc:[],str:[],ops:[{n:\"is\",v:\"equal\",o:4,t:3,a i:4},{n:\"is equal to\",v:\"equal\",o:1,t:3,ai:4},{n:\"is not equal to\",v:\"notEqual\",o:1,t:3,ai:4},{n:\"is greater than\",v:\"greater\",o:1,t:3,ai:4},{n:\"is greater than or equal to\",v:\"greaterOrEqual\",o:1,t:3,ai:4},{n:\"is less than\",v:\"less\",o:1,t:3,ai:4},{n:\"is less than or equal to\",v:\"lessOrEqual\",o:1,t:3,ai:4}],src:[{n:\"54B2A3B4 454509E68B7A838428EB7ED1\",fds:[{n:\"Basket Subtotal\",v:\"BasketSubtotal\",d:\"The total price of the basket, excluding discounts & fees. Expressed in your currency\",o:1,t:1,ai:4,max:9007199254740992,min:-900719 9254740992,dec:true,i:true,cal:true,l:false}]}]}}"
}
December 21, 2022 05:19 AM by Alex @Wolf. The error CL41 is thrown when the json parser cannot deserialize certain object that is being transferred from the server to the client. That json could be either a rule or editor's settings (including your source object). It's hard to debug these types of errors. Try to eliminate / and " chars from your values to see if that helps. The editor fully supports special chars in values but sometimes they can be used improperly. Let us know if you still get this error.
December 20, 2022 08:57 PM by Wolf Hello we have issues implementing the editor in our Angular project. It works fine locally but once we push it to our dev environment we get the following error code "CL41". I can't seem to find documentation about the error codes, so we don't know how to fix this.
November 15, 2022 02:01 AM by Alex @Chris. The Code Effects native component for Blazor 6 will be introduced in the next major version. For now you need to follow the standard way of using legacy components with Blazor 6: register the main editor's script (available at https://codeeffects....) and supply it all the source data it needs from the server by calling the API methods like it's done in any of our demo projects (https://codeeffects....). We don't have a Blazor 6 demo at the moment but the process of integrating the current version of the editor is not really that complicated. November 13, 2022 12:50 PM by Chris @Alex the latest version of Blazor.
November 13, 2022 12:59 AM by Alex @Chris. Which version of the Blazor does you project use?
November 12, 2022 05:18 AM by Chris Is there a way to integrate this rule editor in my blazor app?
April 04, 2022 08:40 PM by Alex @Anonymous. We have a feature called Reusable Rules. See if that addresses your requirement: https://codeeffects.... April 04, 2022 02:55 PM by Anonymous Hi, how I can use other rule in Evaluation rules?
For example: I have rule1 and rule2. rule1 and rule2 - this is a Source class with method and one by one they work.
And I want to create a new rule where I will use these two rules.
Check if
(
rule1 is True
and
rule2 is True
)
I can't understand, how I need to configuration Source class to display this in rule editor.
August 25, 2021 05:49 AM by Alex @Dirk. You can use any public method as a rule action provided that it returns System.Void and takes either no parameters or value-typed params. Details on rule actions can be found at https://codeeffects.... and https://codeeffects.... August 24, 2021 02:19 PM by Dirk Hi, what different types of actions are possible with this tool? Are these coded separately or do they come out of the box? Thinking of Hide/Select/Show, etc etc
June 28, 2021 10:53 PM by Alex June 28, 2021 07:56 AM by Andy
a) is there any provision to use the result of the conditions in THEN part of the rule
i.e.
IF Exists Accounts Where Amount < 1000 THEN Set (Accounts<1000).Description = ''Low"
here Accounts is the collection
b) any way to set property on nested collection?
i.e.
IF True is equals to True THEN Accounts(Amount<1000).AccountHolders.IsCreditAllowed = False
August 10, 2020 11:59 PM by Anonymous Just what I've been looking for. Great component! thanks guys
July 06, 2020 09:56 PM by jesica @Alex, thank u !
July 06, 2020 09:00 PM by Alex @Jesica. The max value of the string input is 256.
July 06, 2020 08:37 PM by Jesica I've just made a test, and the Max is working with ie. 40
Is there any Max value for the MAX attr?
July 06, 2020 08:31 PM by Jesica Hi, im trying to set a Max value to a ValeInputType.User param, but it's not working.
[Parameter(ValueInputType.User, Max= 512, Description = "paramTest")] string message
But when I debug your js file, I see description is good, but Max is still on 256 limit.
The Max param used in a Field declaration (for an Int value) works ok.
Is there anything am I doing wrong? or it's just doesn't work?
February 12, 2020 07:56 PM by Alex @Anonymous. Each of our demo projects has the main script that handles the site's logic. Typically, we call it either site.js or main.js. I'm going to use the site.js script from our Asp.Net Core demo project; the script is located in /wwwroot/js/ folder. You can get demo projects at https://codeeffects....
Line 103 of that script declares the ruleEvaluated method that you need to alter in order to build in your use case. I'm pasting the version of that method as a sample of how you could handle your case. Please let us know here if you have further questions:
function ruleEvaluated(data)
{
if (data.isRuleEmpty) $("#Info").text("The rule is empty");
else if (!data.isRuleValid)
{
codeeffects.loadInvalids(data.clientInvalidData);
$("#Info").text("The rule is not valid");
}
else
{
// You can display your popup here and get the user's input from it
// I'm just displaying the system confirmation for the simplicity sake
var question = confirm("This is the question we want to ask the user");
// Here is your method call that does whatever needs to be done;
// we pass it the evaluation result and the user's answer to popup's question
DoYourThing(data.output, question);
}
};
February 12, 2020 01:36 PM by Anonymous I have a requirement where in after I click the "test" button on the "rule form", a new pop up window appears wherein I want to ask the user some questions and based on the answers (which will be a Yes/No) of the user I want to display the final result of the test. Which means there are two levels of testing; first level in which Code effects checks the parameters in the Rule Test Form and compares it with that of the rule entered and the second level wherein the user answers the questions in my new pop up window and Code effects checks those answers. After these two levels of testing, it finally displays the result as to whether the evaluation is true or false.
Can you give me an idea as to how we can achieve this?
November 19, 2019 04:26 AM by Alex @Anonymous. Those are public properties and methods of the class that you specify as your source object. Code Effects editor extracts them from your class during its initialization. They become rule elements, in-rule methods and rule actions. Rule authors can select them from context-sensitive menu options as they create or edit rules. Details can be found at https://codeeffects....
You can decorate your properties and methods with tons of attributes provided by Code Effects to make lives of your end users easier. Using these attributes you can set different display names for your properties, set their descriptions, even things such as evaluation params, min and max values, date/time formats and much more. For instance, you can exclude any of your properties or methods from being displayed in menus by using the ExcludeFromEvaluation attribute. Take a look at attributes at https://codeeffects.... Let me know if you have further questions. November 18, 2019 03:39 PM by Anonymous In the demo file, the parameters that are in the dropdown of the rule editor (say age, patient's name) are those hard coded or they are fetched from somewhere. Please elaborate.
November 11, 2019 10:54 PM by Alex @Abhishek. The method that is invoked on the server when you press the Test button is called EvaluateRule(...). Depending on the type of demo you are using it can be declared either in HomeController class or in Default.aspx.cs code-behind file.
November 11, 2019 04:32 PM by Abhishek While using the code effects demo solution file, which function/method gets triggered when we press the "TEST" button while evaluation of a rule?
July 01, 2019 07:48 AM by Alex @Anonymous Corrected. Thank you!
July 01, 2019 06:46 AM by Anonymous further correction:
The ruleset examples do not correspond 1:1 with one another.
one explicitly checks if the color is undefined whereas the other is true for any values not equal to red or green
July 01, 2019 05:59 AM by Anonymous Minor correction but i guess it's worth fixing as documentation is a learning resource:
In the "Execution Type" example it has "Invoke Action Tree" rather than "Invoke Action Three"
February 27, 2019 07:08 PM by Alex @Ramesh
1. Calculations work only for numeric types. So, if your field is a string you won't even see the "curly brackets". Please provide details on your use case.
2. Your in-rule method should take care of all parameter and return types if you are trying to use them (like in your string(Seventy) example.) Again, we need details on your use case in order to help you.
February 26, 2019 04:38 PM by Ramesh IF First Name is equal to John set pulse to {pulse + 100 }
Is the PULSE is a string(Seventy) it throwing error ,there is no validation for data type while applying rule ..
July 14, 2018 05:29 AM by Alex @Eduardo. The Global Variables feature is planned for the next major version. No ETA on that one yet.
July 13, 2018 08:58 PM by Eduardo Hi, is it possible for the business user to create new variables that would help him in some kind of more complex calculations, and use those variables also in "if" sentences for intermediate rule decisions?
Tx
April 12, 2018 05:40 PM by Sergey @Anonymous. You can declare multiple reference typed properties in a single "global" class and use that class as a source object. For example, declare an Address typed property in your main source type like this:
public class Address
{
public string Street;
public string City;
}
public class MySource
{
public int ID;
public string Name;
public Address Address;
}
Then create a filter like this:
Get records where ID is greater than [10] and Address.Street contains "123"
There is much more to this topic, please make sure to read about the ParentAttribute at https://codeeffects....
You can also use collections as properties of your main source. Read about it at https://codeeffects.... April 11, 2018 11:25 AM by Anonymous Can we use more than one model class as source object(filter criteria)?
August 15, 2017 02:04 AM by Anonymous Is this library dead?
Why does the support and store links 404?
Why does the download link of the free version for me to evaluate bring me to an older version?
Which license would I need to use with any applications built for use within my employer, under a single top level DNS, like ABCCorp.
August 13, 2017 09:49 PM by Anonymous Great!
July 05, 2017 08:27 PM by Alex @Mariano and @Arturo. Please download the latest version 4.3.6.7 released on June 25, 2017. This version fixed this issue. Make sure to use gettable-only or readonly properties, or set the value of the FieldAttribute.Settable to false for all the properties in your source object. I just verified this version with your use case on our demo project.
July 04, 2017 08:27 PM by Mariano My email is: mnofresno@gmail.com
Hi @Alex, i got the same problem as @Arturo, please can you tell us how we can completely disable the default "Set..." Action in the CodeEffects rule editor?
The Settable property is OK but the action is still visible.
Thanks!
September 10, 2016 01:22 PM by Prasanna May 18, 2016 02:54 AM by Alex @Arturo. I sent your request to our guys. If issue is confirmed, the fix will be included into the next minor version. Thank you for reporting this!
May 17, 2016 08:54 PM by Arturo Hi @Alex, i used the Settable property, but the word 'set' is still showing when creating the rule.
I downloaded the demo, changed settable property for all fields to false and it's the same, the 'set' appears as an option.
May 15, 2016 08:07 PM by Alex May 13, 2016 11:25 PM by Arturo Hi, im working with code effects and I need to hide the "set" after the sentence "then".
Should not appear to select when creating the rule.
March 10, 2016 09:41 PM by Sam @Sankar Nested ifs are not supported
March 09, 2016 12:07 PM by Sankar Nested IFs are not working in this version of CodeEffects
February 02, 2016 08:20 PM by Alex @Yatin. Current version of Code Effects does not support nested IFs
February 01, 2016 03:30 PM by Yatin How can I create Business Rule with nested if conditions ?
October 21, 2015 07:25 PM by Alex @Srini. The next major version of Code Effects will replace the span-based string value input with regular textbox. This will naturally add that functionality.
October 20, 2015 08:58 PM by Srini Is Ctrl-C, Ctrl-V allowed to set a value within the rule editor?
October 19, 2015 04:32 PM by Alex @Anonymous. Yes, it can be used in that way.
October 15, 2015 05:09 PM by Anonymous Can this rules engine be used to populate document templates that have a lot of business rule/logic (i.e. calculations/derivations using data from a data source and conditional logic) ?
July 10, 2015 06:18 PM by Alex @Roman Rapido. We have never tested Code Effects using DevExpress but there are no reasons why it shouldn't work in there. Code Effects is implemented as a plain server control in ASP and plain component in MVC. We have customers who use it in Azure, Telerik, SharePoint and other environments without problems. You can download our free version and test it in any environment.
July 10, 2015 07:22 AM by Roman Rapido Will it work in Devexpress XAF Framework?
June 19, 2015 06:55 AM by Sergey @Giri. Sorry for delay in replay. We don't have that info yet. Possibly by the end of this year.
June 18, 2015 10:10 PM by Brian Oh. duh! I totally missed that. Thanks.
June 18, 2015 09:42 PM by Valik Brian, Look at their front page. There is a line of logos at the bottom. I believe these are just some of their customers. We use Code Effects in federal tax agency in my country.
June 18, 2015 08:03 PM by Brian I noticed there was a question earlier about who's using it and the Canadian gov't and Verizon came up. Are there any others you could give me? I am evaluating CodeEffects and another BRE FlexRule. I Like CodeEffects better because of it's simplicity and easy of use, but I gotta sell it to the business. Any big names would help me do that. thx.
June 17, 2015 07:33 AM by Giri Thanks Sergey, May I know tentatively when we can expect the next major release.
June 16, 2015 07:37 PM by Sergey @Giri. Currently Code Effects does not support IN and NOT IN operators. We have plans to include this feature in one of the next major versions.
June 16, 2015 12:06 PM by Giri Hi,
Is there a way I can write a rule where FC in ('Arsenal', 'MCUtd')... if the field has Arsenal or MCUtd succeeds and fails in all other cases. This can be very useful when the list is very long and I have to use OR for each value (FC is equal to 'Arsenal' or FC is equal to 'MCutd'.... ) TKVM.
December 16, 2014 11:00 PM by Alex @tthieucdl@gmail.com. Please take a look at the Ruleset mode of the rule editor. Details can be found at http://codeeffects.c... December 15, 2014 09:36 AM by tthieucdl@gmail.com Hi,
I have a requirement : sometime we don't need write that: If clause then do action1 and do action2 and do action 3...
But we need something like this:
1- Set evaluation:
Check if (some conditions)
2- Set of Actions:
If (true) then do changeFieldNameAction
If (true) then do CreateNewObjectAction
If (true) then do SendMailAction
Please review this example for more detail: https://www.youtube....
(At time 3:50)
Any suggestion for this? Thank you very much. November 27, 2014 06:45 AM by Nikka Excellent product. Thank you guys!
March 28, 2014 10:59 PM by Alex@Milan. This is not supported in Code Effects.
March 28, 2014 07:05 PM by Milan Hello, I have opposite problem. Our users are confused when they see conditions like 'Check if Metod("A") is Method("B")'. Is it possible to prohibit using some methods on left or right side? Some methods make sense only when they are in the left side, some on the right side. Maybe as parameter to MethodAttribute? Side.LeftOnly, Side.RightOnly, Side.Both (default)?
December 13, 2013 06:51 PM by Alex@Anonymous. Code Effects prohibits having the same field as a field and value in a single condition. Currently, Code Effects doesn't make a difference between in-rule methods and fields when it generates context menus. But I see your point. The same in-rule method should be allowed in the same condition if that method has parameters. Let me talk to our guys here. We'll try to squeeze this fix into the final code of 4.0 if they agree with me. Thank you for reporting this!
December 12, 2013 11:44 PM by Anonymous Thanks. It works perfect in v.4 if I try to check if A is B.
But will it be possible to make smth like:
[Method("A")]
public bool A(bool anyParameter)
{
//some logic
return result;
}
Check if A(true) is A(false)
Currently I can see that I can choose only another method on the right side, not "A".
December 12, 2013 10:04 PM by Alex@Anonymous. Version 4.0 supports this feature.
December 12, 2013 09:49 PM by Anonymous Is it possible to compare result of two in-rule methods? For example if I have:
[Method("A")]
public bool A(){ return true; }
and
[Method("B")]
public bool B(){ return true; }
Can I create a rule like this?
Check if A is B
August 21, 2013 08:56 PM by AnonymousCanadian government uses Code Effects
July 04, 2013 01:19 AM by Karell Ste-Marie July 01, 2013 06:39 PM by Sergey @Mikhael. Code Effects is used by governments and Fortune 500 companies, including well known corporations from banking, energy and insurance industries.
July 01, 2013 05:50 PM by Mikhael Gordon Do large corporations use this engine? Can anyone tell? Thanks