[rules-users] How to Access Rule RHS (THEN Part) from JAVA?

Wolfgang Laun wolfgang.laun at gmail.com
Fri Jul 13 04:02:53 EDT 2012


DRL:
LoanFormula percent;

then
    percent = ...;

=================
Java:
ksession.fireAllRules();
LoanFormula percent = ksession.getGlobal( "percent" );

I suspect that your knowledge of Java is flawed since you can't have a
class of your own and then assign a double to it:
   LoanFormula percent = 2.5

-W

On 13/07/2012, Ravikiran <ravikiran.kakarla at gmail.com> wrote:
> Thanks Lane.
>
> Since i am new to this Area, could you please help me with some sample code
> how to query the objects that are involved in a rule. Please consider above
> my example, on successful execution of Rule 1, i want to access the value
> of
> "Percent" from Class LoanFormula.
>
> Thanks a lot.
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-Access-Rule-RHS-THEN-Part-from-JAVA-tp4018651p4018654.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list