droolsfiddle / drools-fiddle Goto Github PK
View Code? Open in Web Editor NEWThe fiddle for Drools
License: Apache License 2.0
The fiddle for Drools
License: Apache License 2.0
We have to find a way to mock web sockets and redis in order to make integration tests work again
If you open two fiddle tabs, and you build your DRL on the first one, then the vizualization will be on the second tab, because it receipts the server sockets.
Remove the LOGGER definition and reference from the DRL and firing all rules has no effect due to the runtime error in the postDrlFire(). This makes copy and paste of DRLs difficult.
If you Declare a fact in you DRL, and you build and submit at least one fact. If you change the attribute you instantiated into you fact, into your DRL, and then you build and submit without checking what you are submitting, then you will encounter the bug.
Example :
declare Fact
i : int
s : String
end
Then you Submit a fact, new Fact(0, "test")
via the submitting button of drools-fiddle.
After it, you change the declaration, by deleting the attribute s
declare Fact
i : int
end
Then you build and submit without checking the Drools Fact windows. As the JSON will construct a fact based on `Fact(0, "test") , drools-fiddle will add a item String with the value "test", and try to submit it. You will encounter the bug.
I got this error during maven install...
[INFO] --- exec-maven-plugin:1.5.0:exec (exec-npm-ng-build) @ drools-fiddle ---
Your global Angular CLI version (11.2.6) is greater than your local version (6.1.5). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
94% after seal SuppressE
Date: 2021-06-24T13:20:00.915Z
Hash: 463a6b044c6e4b9b80ad
Time: 11748ms
chunk {0} runtime.a66f828dca56eeb90e02.js (runtime) 1.05 kB [entry] [rendered]
chunk {1} styles.d5d948d3ba804eb64570.css (styles) 206 kB [initial] [rendered]
chunk {2} polyfills.e7f5364b276024e19b0b.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} main.0594610c91de797f492a.js (main) 128 bytes [initial] [rendered]
chunk {scripts} scripts.59ae675517bb406164d8.js (scripts) 649 kB [rendered]
ERROR in : TypeError: Cannot read property 'flags' of undefined
at checkUnreachable (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:29010:31)
at bindChildrenWorker (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:27028:17)
at bindChildren (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:26984:17)
at bind (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:28262:21)
at bindSourceFile (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:26598:17)
at Object.bindSourceFile (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:26539:9)
at initializeTypeChecker (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:56489:20)
at Object.createTypeChecker (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:30764:9)
at getDiagnosticsProducingTypeChecker (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85059:93)
at /Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85187:35
at runWithCancellationToken (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85160:24)
at getSemanticDiagnosticsForFileNoCache (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85183:20)
at getAndCacheDiagnostics (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85431:26)
at getSemanticDiagnosticsForFile (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85180:20)
at getDiagnosticsHelper (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85122:24)
at Object.getSemanticDiagnostics (/Users/rsoares/dev/github/drools-fiddle/src/main/ngapp/node_modules/typescript/lib/typescript.js:85135:20)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:764)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:711)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:289)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:47 min
[INFO] Finished at: 2021-06-24T09:20:00-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (exec-npm-ng-build) on project drools-fiddle: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>>> elapsed time 4m49s
If you specify a key attribute into your DRL and you set him into a RHS, then you will get a visualisation bug, because a non-fact object is added for nothing.
Example :
//
// copy paste your drl
// Drools version : 7.10.0.Final
import org.droolsfiddle.utilities.WSLogger;
global WSLogger LOGGER;
declare Fact
value : int@key
end
rule "Rule"
when
f : Fact(value == 0)
then
modify( f ) {setValue( 41 )}
LOGGER.debug("This is a debug log");
LOGGER.info("This is an info log");
LOGGER.warn("This is a warn log");
LOGGER.error("This is an error log");
end
Build, Submit a new Fact()
, and Fire. You will encounter the bug.
In drools-fiddle, when entering my facts, I need to have a way (a checkbox for instance) to tell that a nested fact has to be inserted in the working memory.
When you fire before submit at least one fact, then the arrow to describe the step aren't working.
Example :
//
// copy paste your drl
// Drools version : 7.10.0.Final
import org.droolsfiddle.utilities.WSLogger;
global WSLogger LOGGER;
declare Fact
value : int
end
rule "Rule"
when
f : Fact(value == 42)
then
modify( f ) {setValue( 41 )}
LOGGER.debug("This is a debug log");
LOGGER.info("This is an info log");
LOGGER.warn("This is a warn log");
LOGGER.error("This is an error log");
end
Then Build , Fire ( 0 rule should be fired, and the server return this info.), Submit a new Fact(42)
. You will encounter the bug.
The method eval(boolean
isn't working on drools-fiddle.
Only eval(true)
and eval(false)
are working.
DRL :
//
// copy paste your drl
// Drools version : 7.10.0.Final
import org.droolsfiddle.utilities.WSLogger;
global WSLogger LOGGER; // for fiddle
declare Fact
value : int
end
rule "Rule"
when
$f : Fact($v : value)
eval($v == 0)
then
LOGGER.info("Ok"); //for fiddle
//System.out.println("Ok"); //for local
end
drools-fiddle server :
"ERROR: rule evaluation error java.lang.RuntimeException: org.drools.core.rule.EvalCondition$SafeEvalExpression@1d04d97b : java.lang.RuntimeException: java.lang.RuntimeException: Error writing method evaluate"
local :
"ok "
Hello,
We are facing the following issue when we serialize the kieBase with security manager activated:
global policy: https://github.com/droolsfiddle/drools-fiddle/blob/master/src/main/webapp/META-INF/permissions.xml
kie policy: https://github.com/droolsfiddle/drools-fiddle/blob/master/src/main/webapp/META-INF/rules.policy
2016-12-13 20:55:56 WARN DrlContextPersistenceServiceImpl:135 - Caught exception in post context
org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: defaultpkg.Rule_Rule1529085518DefaultConsequenceInvoker
Try to grant AllPermission in the kie policy but it doesn't help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.