in Education by
Is there a way to add member functions to a Drools declared type? That is, I'd like to say something like: declare Foo bar : int plugh : String function String greeting() { return "Hello "+plugh+"!"; } end That doesn't work (or I wouldn't be writing this post), but do I just have the syntax wrong, or is there no way to do that in Drools? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You cannot include functions in a Drools declared type (above and beyond what it generates in the class to support Bean property types). If you find you need functions in a declared type you should probably create them in your regular Java then import them into your rule file.

Related questions

0 votes
    Functions must and should be declared. Comment on this....
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    Which of these standard collection classes implements all the standard functions on list data structure? (a) Array ... of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these functions is called to display the output of an applet? (a) display() (b) paint() (c) ... /O & Applets of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    I've got a large array of primitive types (double). How do I sort the elements in descending ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 5, 2022 in Education by JackTerrance
0 votes
    Which of these are types of multitasking? (a) Process based (b) Thread based (c) Process and Thread ... chapter Multithreading of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of the following is an incorrect statement regarding the use of generics and parameterized types in Java? (a ... Packages of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    What are the two types of Streams offered by java 8? (a) sequential and parallel (b) sequential and random ... & Miscellaneous of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Which of these types cannot be used to initiate a generic type? (a) Integer class (b) Float class (c) ... in section Generics of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    All the variables of class should be ideally declared as? (a) private (b) public (c) protected (d ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Can a class be declared with a protected modifier. (a) True (b) False This question was posed to ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these cannot be declared static? (a) class (b) object (c) variable (d) method This ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these keywords cannot be used for a class which has been declared final? (a) abstract (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    A class member declared protected becomes a member of subclass of which type? (a) public member (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    A class member declared protected becomes a member of subclass of which type? (a) public member (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    In order to restrict a variable of a class from inheriting to subclass, how variable should be declared? ( ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
...