Create a routine in Java

One Star

Create a routine in Java

Hello everybody
I'm creating a component with Talend 4.0.2, and during the process I need to create a routine.
So my question is simple : is there a simple way to create a Talend routine in Java ?
After a lot of try, I haven't found solutions.
Thank you all !

Best regards,
Aurel
One Star

Re: Create a routine in Java

What do you mean regarding "talend routines"? You can extend your java component with classes or even packages by using your own external libraries
One Star

Re: Create a routine in Java

These blog posts describe creating Java routines in Talend.
http://bekwam.blogspot.com/2011/02/user-defined-functions-with-talend-open.html
http://bekwam.blogspot.com/2011/07/trim-your-talend-tmaps-with-java.html
This post is the methodology and development environment setup I used for the BRules (from the Exchange) routines. Test-driven development (TDD) is well suited for routines because routines can be called in many different ways (with nulls, empty strings, etc.) and many unit tests help make sure that all cases continue to work.
http://bekwam.blogspot.com/2011/06/test-driven-development-and-talend-open.html
I do most of the development for BRules in Ecplise, but the TDD post describes a setup that is Open Studio-only.
Good luck.
-Carl
One Star

Re: Create a routine in Java

Hello, thanks for your replies !
I know how to fill my routine, but my problem is how create "physicly" the routine.
When you create a routine with "Routine > Create routine", Talend create to files, a .properties file, and a .item file.
So, I need to create those files, but how..?
One Star

Re: Create a routine in Java

walkerca's example are good, here are some tips on Talend and how to use java routines in Talend TOS.
http://www.robertomarchetto.com/www/talend_data_integration_tips
Once defined, the taled Java routines can be used in any Java expression editor, like the fields on tMap or tJavaRow.