Currently, we are exploring CodeEffects for our one of the rule engine proposal. We have a dynamic type which is a JSON string. During runtime, we need to apply the rule for JSON using CodeEffects. Is it support for FlexSource or any other possibility.
Asked
Active
Viewed 1,777 times
1 Answers
1
You need to serialize your Json string into a .NET object, fill it with data if needed, and pass that object to the Evaluator together with your rule for evaluation. The FlexSource is designed specifically to support this kind of scenarios. Download the FlexSource demo project from Code Effects website and replace the XML data file used there as the source object with your Json.

Alex
- 566
- 1
- 6
- 14
-
Hi Alex, Thanks for your detail explanation. As per my case, I can do convert JSON to dynamic .Net object(it will not in typed object for.Net side). Or I can do my data convert to dictionary object like key pair value. Are Flexsource/Other options support these scenarios?. I am waiting for your positive reply. – Prakash Oct 25 '19 at 04:19
-
@Prakash Yes, converting Json to pairs and use it in FlexSource as source values is supported. Use the demo example I mentioned in my answer for details. – Alex Oct 25 '19 at 20:23
-
Thanks for quick response. I couldn't find any XML data file there in the example which you mentioned the link.can you share me the extact link for the flexsource example? – Prakash Oct 27 '19 at 02:29
-
@Prakash Demo projects are available at https://codeeffects.com/Doc/Business-Rule-Demo-Project. You need the FlexSource demo. Once downloaded, open its /Models folder and look for the FlexTypeData.xml and FlexType.cs files. Also, take a look at the Default.aspx.cs file in the root which defines the core logic of using the FlexSource technology in Code Effects engine. – Alex Oct 27 '19 at 15:08