tBRMS Scenario documentation

One Star

tBRMS Scenario documentation

Hi,
Im trying to reproduce the tBRMS scenario as in the documentation, im facing various problem, i work with drools guvnor to produce my rules, we have 5 formats of rules (.dslr, .xls, .gdst, .brl and .drl) in Drools Guvnor based on a Model which can be in .drl or .jar formats.
in the scenario you use a jar file (LoanModel.jar) and select LoanSimulator class, does this class contain the rule ?, in this case how can we put rules in a jar file ?.
I work with Sensis Model which is a package example of drools guvnor, you can get it by clicking on Drools examples here : http://www.jboss.org/drools/downloads
in this example the model is in .jar format, but after i select it, im not able to access to my rules !!
does anyone have an idea ?
Employee

Re: tBRMS Scenario documentation

LoanModel.jar contains 2 POJO java classes, but not any rule. The rules are defined in drools guvnor.
The model represents objects handled by the rule engine. and these objects will be binded to the data schema in the job.
One Star

Re: tBRMS Scenario documentation

Hi, do you have links on where we could download the LoanModel samples?
Thanks.
Employee

Re: tBRMS Scenario documentation

please pm me your email address so that i can share the model and repository export with you.
Edited: the file is now attached in this post and in Jira too.
One Star

Re: tBRMS Scenario documentation

Hi sizhaoliu,

i am working with the example that you send to me, i do these steps :
1) i import the repository in drools
2) i run the job in Talend but i have those errors :
Exception in thread "main" java.lang.Error: Problèmes de compilation non résolus : 
org.talend.bank n'est pas reconnu comme type valide
org.talend.bank n'est pas reconnu comme type valide
org.talend.bank.LoanSimulator n'est pas reconnu comme type valide
at drools.loan_0_1.Loan.tFileInputExcel_1Process(Loan.java:3025)
at drools.loan_0_1.Loan.runJobInTOS(Loan.java:3875)
at drools.loan_0_1.Loan.main(Loan.java:3746)

- when i try to save changes in Drools after uploading the file LoanModel.jar i have an error, is that the problem ?
- also when i try to build bank package in Drools i have an error.
Regards.
Sidina
Employee

Re: tBRMS Scenario documentation

you need to re-import the jar from the repository to you job by clicking at the button beside "module list" configuration.
i think you can try to create a simpler scenario instead of reproducing the whole one in the documentation.
you can create a rule which simply says all loans demanded by a person younger than 18 years old will be rejected.
One Star

Re: tBRMS Scenario documentation

Hello.
I'm trying to reproduce the example with the Loan model by using Talend and Drools Guvnor. Each component is well working (I can load the model, and the class i want to), but i get the following error when i launch the Job :
java.lang.RuntimeException: java.io.FileNotFoundException: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.talend.bank/LATEST
I think this is because i haven't the right username and password in the tBRMS configuration. There is something i can do, to configure my ID and password to be connected with Gunvor ?
Thank you for your answer.
Employee

Re: tBRMS Scenario documentation

Hello Yohina,
Normally, you should use the same username/password of your TAC.
Which version of studio are you using?
Did you install Drools Guvnor with the installer? Did you imported my repository_export.xml into your guvnor?
What happens if you enter http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.talend.bank/LATEST in your browser?
(Normally, there should be a login window for which your TAC credentials would not work, except you've logged in your TAC with the same browser.)
Regards,
Sizhao
One Star

Re: tBRMS Scenario documentation

Hello,
Thanks for answer so quickly.
I actually used the same ID and password for my TAC and for the tBRMS component.
I use Talend Integration Suite 4.3.2.
I deployed the file Drools Guvnor (with the war extension) in the same apache server i use for my TAC.
If i enter http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/org.talend.bank/LATEST in my browser, i have an error message, the pages does not load, so I have no login window.
Regards,
Yohina.
Employee

Re: tBRMS Scenario documentation

I guess you're using 4.2.3 because the branch 4.3.x does not exist.
If I am right, you should be using Drools Guvnor 5.0 corresponding to the component library. In TAC installation documentation, some manual steps are needed to config your Guvnor, including modification of host/port in the extracted Guvnor webapp inside your tomcat folder.
Once it is done, you can log into TAC, configure the Guvnor URL in TAC and see if you can access it via TAC.
One Star

Re: tBRMS Scenario documentation

Yes, i'm actually using Talend 4.2.3. it was a mistake.
I installed TAC as the same time i installed Talend Integration Suite and i haven't the TAC installation documentation. Do you know where i can found it ? So, i would be able to know in which files i would have to modify the port, etc.
Thank you,
Yohina.
One Star

Re: tBRMS Scenario documentation

Hello.
I finaly managed to configure my Drools guvnor webapps by using the TAC configuration.
In the file "<ApplicationPath>/WEB-INF/classes/config.properties" i wrote :
tac.remoteconnectionservlet.url=http://<localhost>:8080/<ApplicationPath>/remoteConnection
I also download the 3 jar files and put theses files in the library:
/usr/share/tomcat6/lib/jsf-impl.jar
/usr/share/tomcat6/lib/jsf-api.jar
/usr/share/tomcat6/lib/jboss-faces.jar
Then i managed to connect in drools Guvnor via the TAC interface.
I import the repository.xml in drools guvnor.
In talend when i launch the Job, i manage to choose the .jar file in my package, and the class.
But i still have the same error in my tLogRow error when the job talend is running:
"java.lang.RuntimeException: java.io.FileNotFoundException: http://localhost:8888/drools-guvnor/org.drools.guvnor.Guvnor/packages/org.talend.bank/LATEST"
So, the values (rejected, reason) are not updated.
Do you know what can be the reason of this error ?
By the way, when i try this URL "http://localhost:8888/drools-guvnor/org.drools.guvnor.Guvnor/packages/org.talend.bank/LATEST" in Firefox, i get an "ERROR 404"
Best regards.
One Star

Re: tBRMS Scenario documentation

The Job Talend is finaly working.
The error was due to the Gunvor package definition.
it was generated : "/packages/org.talend.bank/LATEST"
but it's only working when it's written without an "S" at the end of "package" like :"/package/org.talend.bank/LATEST"
Do you know where does this error come from ?
Employee

Re: tBRMS Scenario documentation

Hi,
Indeed, this was a bug due to inconsistency between the rule URL in guvnor and its real position in the webdav repository.
It has been fixed since 5.0 but not backported to branch 4.2.
I'm glad you find it.
BTW, there's another related issue in case your browse the jar from a snapshot folder: http://jira.talendforge.org/browse/TDQ-4665
I'll backport the bugfix of these two issues on branch 4.2 ASAP.
One Star

Re: tBRMS Scenario documentation

Hi I know this is an old thread but would it be possible for anyone to give me a link to the LoanCalculator and LoanSimulator jar files. Smiley Happy Thanks in advance
Employee

Re: tBRMS Scenario documentation

Here is the link:
https://jira.talendforge.org/secure/attachment/54040/LoanModel.jar
It contains the 2 classes.
Sizhao Liu
One Star

Re: tBRMS Scenario documentation

Thanks for the quick response. Enjoy your day.
Employee

Re: tBRMS Scenario documentation

Hi DeanWake.
I just created a documentation change request in Jira https://jira.talendforge.org/browse/DOCT-1917
You can refer to the description for the creation of the Jar, and the doc will be enriched in our futur releases.
Sizhao Liu
One Star

Re: tBRMS Scenario documentation

vaAGVb <a href="">wigpmxeveehp</a>, xeqyrodwiiiu, bcqnhzvdrejg,