TIBCO Java Event Source

TIBCO Java event source activity gives you the flexibility to write custom process starters. In following post we will create a simple project where we use the event source plugin.

The java source code and the tibco project can be found here.

Sample github project code

Do a maven clean install on the java project a jar file is created that should be imported as alias library to the tibco project.

The java project consist of the class “ProcessStarter” which extends the tibco process starter.

/** * * @param processName sampleInputParam * @throws Exception exception */ 
public void initProcess(final String processName) throws Exception { 
this.processName = processName; init(); 
} 

@Override public void init() throws Exception { 
LOGGER.info("[ProcessStarter] Initializing " + processName + " Proces Starter"); 
//Some init code LOGGER.info("[ProcessStarter] Successfully Initialized Proces Starter"); 
}
/**
 *
 * @param processName sampleInputParam
 * @throws Exception exception
 */
public void initProcess(final String processName) throws Exception {
    this.processName = processName;
    init();
}

@Override
public void init() throws Exception {
    LOGGER.info("[ProcessStarter] Initializing " + processName + " Proces Starter");
    //Some init code
    LOGGER.info("[ProcessStarter] Successfully Initialized Proces Starter");
}

Following is how its called from tibco

Capture1

The out put from event source is a java object we convert it to a string using the java method activity the code is

public String getMessageBodyAsString(final Object message) {
    final MessageDataType messageDataType = (MessageDataType) message;
    return messageDataType.toString();
}

and tibco activity configuration is

Capture2

When you run the process it is executed 10 times and a string plus the thread index string is the output.

About: Muhammad Ali

I am a Java and Tibco expert. I have Master's degree in software engineering of distributed systems from Royal Institute of technology KTH Stockholm Sweden and I am an expert software engineer and integrator with over a decade of industry experience from Europe, Gulf and Asia regions. I am a strong opensource believer and encourage "sharing as caring" principle.