Git Product home page Git Product logo

drools-fiddle's Issues

[BUG] Changing DRL after build and submit

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.

build error during exec-maven-plugin

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

[BUG] @key add a non-fact object to the visualisation when setted

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.

Nested facts not handled

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.

[BUG] Fire before Submit at least once

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.

[BUG] Binding variable

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 "

KieBase serialization issue with security manager activated

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.