Tibco Business Works Java Custom Function Activity

While developing a project in tibco you might get a situation where you apply function for doing some operation. For this tibco already provide lot of pre-defined functions but there may be a situation where your problem would not solved by these predefined function. So what will you do?

There are 2 option tibco provide

  • Use java code activity
  • Use java custom function Activity

In this article I am explaining only java custom function Activity how it will be used in TIBCO BW

Java custom function activity is available under the java Activity Resources

Tibco Java Custom Function

For introducing Java Custom Function inside your project you need the Java source code you want to introduce. So you need a class file or a JAR file (we are going to go with the class file option to be quicker) with the logic you want to use. But you have to keep in mind these conditions about your Java code:

  • The logic must be encapsulated inside an static method
  • You have to use primitives types as arguments.

Ok, so when we have the compiled class according to this limitation you could introduce inside your BW project and to do that you need the following steps:

Create a “Java Custom Function” project artifact where you are going to specify the .class file full-path location and the prefix that are going to be used in the Mapper catalog.

Tibco Java Custom Function

Tibco Java Custom FunctionClick the “Load Button” to apply the changes.

Now you should get the new catalogue function available to use in any mapping instance.

Tibco Java Custom Function