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");
}

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s