I would like to know, how should we execute the rules written in IBM ODM. I am using ODM V8.0.1. I have tried as below.
I created a XOM having a Request class with String variable and Response class with a boolean
public class Request{ private String xyz;
public Request(String s1){
this.xyz=s1;
}//to set DVS
with getters & setters
}
public class Response{
private boolean x; and getters and setters
}
I created a rule project adding this XOM to create respective BOM.
I have added Request Object as IN ruleset parameter and response a OUT Then created a Rule with below code
if xyz of 'the request' is one of {" "," " "," "}
then
set x to true on 'the request';
Created a ruleflow having a action function() and one rule package
I have created
prepareWorkMemory(){
Request r=new Request();
r.x=true;
insert(r);
}
I have generated a DVS excel file and populated the input and expected result.
Then I ran this ruleflow with excel sheet
Run as --> Run Configuration
My execution threw a Nullpointer exception and some other ExecutionUnit exceptions. When I debugged I see that the issue was the response object was not created after the prepWorkingMemory() funtion and when the rule tried to set the boolean value.
I tried setting up the Ruleset parameter as IN_OUT then the execution created the response object for itself without the prepWorkingMemory() function. But it was expecting even the boolean as input which is not right for my scenario.
Can someone please help me with where I went wrong I strongly believe that the issue is with function. Please correct me.
Also if possible can you elaborate on Memory Management in IBM ODM.
Thank you. Your help and time is greatly appreciated :)