Nope, I still have a problem after building and deploying the project (without validation, since that would fail).
When my application receives the new package, an exception is thrown saying:
unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.logRule

My action from the decision table is quite simple:
logRule("@{rule}", $level); //level is a class from my application
and in the row (the rule) I set it to <Test Rule>.

The drl contains (only) the function:
function void logRule(String rule, Level level) {
    System.out.println("Matched rule: "+rule+" for level:"+level);
}

I tried to call the function using FunctionName.functionName pattern, as well as <package_name>.FunctionName.functionName pattern, without any success.

Ευχαριστώ πολύ,
   Ιωάννης Χριστοδούλου


On Mon, Mar 17, 2014 at 2:58 PM, Michael Anstis <michael.anstis@gmail.com> wrote:
OK.

If validation failed, this is a known issue - we just validate the single decision table without including "external" resources (such as the function, if a different DRL file).

If you save the decision table it should be OK - i.e. no errors shown in the "Problems Panel" (this is because this uses a different mechanism to the "validation" function).

The issue is recorded here: https://bugzilla.redhat.com/show_bug.cgi?id=1075039 and a related one here: https://bugzilla.redhat.com/show_bug.cgi?id=1071205


On 17 March 2014 12:01, Ioannis Christodoulou <io.christod@gmail.com> wrote:
Yes, I cannot find any possible way to declare a function.

So, I declared it inside a dlr file (the validation succeeded) and tried to call it from the 'action' column of the guided decision table.
The validation on the guided decision table failed, saying that it could not analyze the function call expression.

Ευχαριστώ πολύ,
   Ιωάννης Χριστοδούλου


On Mon, Mar 17, 2014 at 12:45 PM, Michael Anstis <michael.anstis@gmail.com> wrote:
"The problem is that I cannot find a way to declare the function and make it visible from the guided"

What does this mean exactly? Are you getting a validation error when clicking the "validate" button? Did you expect to see a function listed somewhere?


On 17 March 2014 10:25, Ioannis Christodoulou <io.christod@gmail.com> wrote:
Hello everyone.
I'm using the latest kie workbench and I have created a guided decision table.
I want to create a function and call it from an action of the guided decision table.

The problem is that I cannot find a way to declare the function and make it visible from the guided
decision table. I have tried declaring it in a drl file, as well as in a dsl definition without success (the error is that drools cannot analyze the function call expression).

Has anyone solved this issue before?

Kind regards.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users