| Products | Versions |
|---|---|
| TIBCO Streaming | 10.6 and later |
I have some custom Java functions that I have developed as part of a Streaming fragment project (maintained under the project's src/main/java/ folder). How can I make these functions available for use in other Streaming fragment projects?
<packaging>ep-eventflow-fragment</packaging>
<packaging>jar</packaging>
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.2.0</version> <configuration> <archive> <manifestSections> <manifestSection> <name>com/tibco/ep/sample/Hypotenuse.class</name> <manifestEntries> <StreamBase-Adapter>False</StreamBase-Adapter> </manifestEntries> </manifestSection> <manifestSection> <name>com/tibco/ep/sample/VarArgs.class</name> <manifestEntries> <StreamBase-Adapter>False</StreamBase-Adapter> </manifestEntries> </manifestSection> </manifestSections> </archive> </configuration> </plugin> </plugins> </build>
mvn clean install -DskipTests
<dependency> <groupId>com.tibco.ep.sample</groupId> <artifactId>sample_custom-java-function</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency>
configuration = {
CustomFunctionGroup = {
customFunctions = {
hypotenuse = {
type = "simple"
methodName = "calculate"
className = "com.tibco.ep.sample.Hypotenuse"
autoArguments = true
}
calchyp = {
type = "simple"
methodName = "calculate"
className = "com.tibco.ep.sample.Hypotenuse"
autoArguments = true
}
hypot = {
type = "simple"
methodName = "hypot"
className = "java.lang.Math"
autoArguments = true
}
isIn = {
type = "simple"
methodName = "isIn"
className = "com.tibco.ep.sample.VarArgs"
autoArguments = true
}
sumAll = {
type = "simple"
methodName = "sumAll"
className = "com.tibco.ep.sample.VarArgs"
autoArguments = true
}
mx = {
type = "simple"
methodName = "max"
className = "java.lang.Math"
argumentTypes = [
{ type = "double" }
{ type = "double" }
]
returnType = { type = "double" }
}
}
}
}