TIBCO BW Provides various built-in palette activities which can be drag and drop on the design panel and then configured to create simple to complex process flows for implementing different types of integration logics. But, there can be cases where some custom code needs to be incorporated.
TIBCO BW provides Java Palette activities which can be used to invoke any custom Java code to the process.
Here, I will explain how to invoke Java Custom Function..public class Student {
public static String getResult(int marks) {
if (marks >= 35)
return "You are Passed..";
else
return "Sorry, better luck next time";
}
public static void main(String[] args) {
System.out.println(getResult(5));
}
}
Then, generate ".class" file by using terminal. C\>javac <file-Name.java>
Create a simple Business Process ..
On Start Activity:
On Mapper Activity - Input Tab
Click on Xpath> Functions (search your custom function..)On Mapper Activity - Output Tab (just check it)
No comments:
Post a Comment