2 years ago

#34144

test-img

Dileep Chandran

No globals have been defined for this package

I have created 2 rules and one global variable in same drl file inside the jboss wrokbench(business-central).

Rules:

package com.myspace.samplerules;
import com.myspace.samplerules.Transaction;

global java.lang.Double disPrice;
global com.myspace.samplerules.Transaction t;

rule "Rule1"
    when
        $t : Transaction(
                amount > 1000
            )
    then
        System.out.println("Executed :- " + drools.getRule().getName());
end

rule "Rule2"
    when
        $t : Transaction(
                amount > disPrice
            )
    then
        System.out.println("Executed :- " + drools.getRule().getName());
end

While creating a legacy test scenario I am not able to set value for that global variable. Showing this message while clicking the button to add global variables "Warning: No globals have been defined for this package".

Anybody know how to fix this issue?

java

jboss

drools

jbpm

kie-workbench

0 Answers

Your Answer

Accepted video resources