File Poller in TIBCO BW

Last updated on Sep 27 2021
Dayanand Salve

Table of Contents

File Poller in TIBCO BW

 

This blog guides you through creating a simple File Poller project. This simple project can perform many of the same tasks as those required for a project with a larger scope and more complexity. The File Poller project polls a directory for a specified file and writes a new file to the same directory each time the file is modified.
This blog involves:

 

• Creating a New Project
• Configuring the File Poller Project
• Testing the FilePoller Application in the Debugger

Creating a New Project

This section guides you through creating a simple project.

Procedure

• Start TIBCO Business Studio:
o On Unix: Select the TIBCO Business Studio executable located at $TIBCO_HOME/studio/3.6/ eclipse/
o On Windows: Start > All Programs > TIBCO > TIBCO_HOME > TIBCO Business Studio for Designers
• Launch the BusinessWorks Application Module wizard from File > New > BusinessWorks Resources.
• The BusinessWorks Resource Wizard is opened.

In the Select a wizard dialog box, select

File Poller in TIBCO BW
File Poller in TIBCO BW

1. click Next. The wizard is displayed:
2. In the Project name field, specify the project name: FilePoller
i. Keep the Use default location, Create empty process, and Create Application check boxes selected.
3. Click Finish.

Result

Two projects are created and are visible in the Project Explorer.

File Poller in TIBCO BW
File Poller in TIBCO BW

Configuring the FilePoller Project

The FilePoller project uses a File Poller activity and a Write File activity. This project creates a simple process that points to a specified file. The file is polled periodically to determine whether it was changed. The changed file comprises the text written to a new file.
The File Poller and Write File activities in the File palette are used in this process.

Prerequisites

A text file is required, for example, c:\tmp\fileread.txt. Type a few lines in the file and save it.

Procedure

1. Select and drop a File Poller activity from the File palette to the Process Editor window.
i. To add an activity to the Process Editor, click the activity and drop it on the Process Editor. Do not drag and drop the activity.
2. Select the Write File activity from the File palette. Click in the Process Editor next to the File Poller activity. You will see a gray overlay indicating where you can place the activity, along with the transition arrow. When you drop the activity,

File Poller in TIBCO BW
File Poller in TIBCO BW

the transition from the File Poller activity to the Write File activity is created.

3. Select the File Poller activity and in the Properties tab, select the General tab on the left. In the General tab, point to the file you created as a prerequisite to this tutorial.

Check the Include Existing Files check box. When selected, the File Poller activity polls the existing file regardless of the changes made. The specified file is periodically polled at the specified interval even if the file has not changed. These changes may be for modifying, creating, or removing the file.

The Polling Interval (sec): 5 (default) indicates the Frequency that the File Poller activity is monitoring/checking this particular file. Any update to this file will be transferred to output.log file through the WriteFile activity.

4. Save your project. Click File > Save or the Save button on the tool bar.
5. Select the Write File activity and click the General tab.
6. Click the button in the Filename field and specify the output location, such as, c:\tmp\FilePoller\output.log. Also, select the Create Non-Existing Directories check box.
7. Click the Input tab to specify input to the Write File activity. Drag the

File Poller in TIBCO BW
File Poller in TIBCO BW

FilePoller\fileContent\textContent from the Data Source pane into the textContent field in the XPath Expressionpane. This writes the content of the polled file to the output file.
8. Save your project.
9. Test this project in the debugger. For details about the testing procedure, refer to Testing the File Poller Application in Debugger.

Result

The FilePoller activity polls the fileread.txt at c:\tmp file every 5 seconds and any changes made to the file content are written to the output.log file at c:\tmp\FilePoller by the WriteFile activity.

Testing the FilePoller Application in the Debugger

The debugger provides a simple and fast way of debugging one or more TIBCO ActiveMatrix BusinessWorks applications in a local runtime environment. The applications must be in the workspace and selected before launching the debugger. After starting the debugging session, the debugger does not provide tooling support for deploying and debugging on the same runtime instance. The runtime starts when the debugger is started and stops when the debugger is stopped.

Procedure

1. Right-click in the Process Editor and select the Debug BusinessWorks Applications option from the menu. You can also click to start the debugger or choose Run > Debug.
The following messages are displayed in the Console view.

File Poller in TIBCO BW
File Poller in TIBCO BW

You are running the instance of the FilePoller application. When the debugger is launched, the perspective changes from Modeling to Debug.
2. After the BW Application is started, the FilePoller and WriteFile activities gets triggered and the contents of the fileread.txt will be written in to c:\tmp\FilePoller\output.log file.
3. Modify the c:\tmp\fileread.txt. For example, open the c:\tmp\fileread.txt and write
“Hello BusinessWorks!” and save the changes.
The FilePoller activity polls every 5 seconds and transitions the contents of the fileread.txt to FileWrite activity.
4. Open the file c:\tmp\FilePoller\output.log and verify the updated information, for example,
“Hello BusinessWorks!” printed in this file.
While keeping the application running, explore adding and deleting the words in the fileread.txt file and notice the corresponding changes made to the output.log file.
5. The path taken by the engine for executing the process is displayed. Transitions turn to green to specify that a path was executed.

File Poller in TIBCO BW
File Poller in TIBCO BW

6. Click the Businessworks Jobs view in the top left to see the jobs created for the process.

File Poller in TIBCO BW
File Poller in TIBCO BW

7. Click a particular activity, then click the Job Data view on the top right to see the input and output data of the activity.

File Poller in TIBCO BW
File Poller in TIBCO BW

8. To stop the current job, click the Stop button on the Console view toolbar.

So, this brings us to the end of blog. This Tecklearn ‘File Poller in TIBCO BW’ blog helps you with commonly asked questions if you are looking out for a job in TIBCO Business Works. If you wish to learn TIBCO Business Works and build a career in Business Intelligence domain, then check out our interactive, TIBCO Business Works Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

TIBCO Business Works

TIBCO Business Works Training

About the course

Tecklearn’s TIBCO Business Works training provides in-depth knowledge on all the key fundamentals of Business Works and also develops skills to design, test, deploy, and administer the TIBCO ActiveMatrix Business Works applications. By the end of the training, you will gain confidence to clear the TIBCO Business Works certification exam.

Why should you take TIBCO Business Works?

• The average annual pay for a TIBCO BW Professional is $136,500 per annum. -Neuvoo.ca.
• TIBCO BW global market share is 2%.
• With TIBCO BusinessWorks software, integration specialists can easily implement integration strategies using traditional enterprise integration patterns to modern cloud-based API-led approaches built with microservices and containers.

What you will Learn in this Course?

Overview of Integration and TIBCO BW5 Environment

• Enterprise Integration
• Enterprise application integration (EAI)
• EAI Concepts
• Overview of TIBCO platform
• TIBCO components

Installation

• TIBCO Installation
• Why ESB

TIBCO File, Data and General Activities

• Read and Write a File
• Parsing a File data
• Polling for specific files and copy specific data to another directory

TIBCO Database Activities

• Create project using JDBC palette activities via JDBC query and JDBC update
• Advance JDBC, Process in Subsets and Batch update
• TIBCO SQL Direct and Call Procedure Implementation
• Transactions and Checkpoint

Processing data efficiently

• Data Transformation Patterns
• Structural Mapping
• Disjoint Structure Mapping
• Merging, Aggregation
• Segregation
• Common XSLT and best practices

Overview of Service Oriented Architecture

• Basic Web Services Understanding
• XML overview – XSD, DTD, XSLT, XPath
• SOA Introduction, SOA Principles and Service Orientation, SOA Pattern
• Understanding WSDL, SOAP and UDDI concepts, W3C, SDO

SOAP Service Implementation

• Create SOAP demo project in TIBCO BW
• Creation of standard HTTP soap service
• Project Creation to expose security context for a web service which is implemented using service resource
• SOAP message is signed and encrypted using X.509 token

ESB (Enterprise Service bus)

• How Messaging Works
• Messaging Features and JMS
• Overview of TIBCO EMS
• Messaging Models
• Client Service Delivery Modes
• JMS Message Format
• Acknowledgement Modes
• Development of EMS Client using TIBCO BW5
• Implementing Failover, Load Balancing using JMS Activities
• Destination Bridging to avoid writing huge code

Introduction to TIBCO Adapter Services

• Explore TIBCO ADB Adapter Explore
• Configure ADB Publication and subscription services

Advance Service Design

• Using Variables Using Sub processes, using Null Activities
• Inter Process Communication
• Extending the mapper
• Java Custom Function

Introduction to REST

• Installing active matrix business work plug-in for REST and JSON 2.0
• Fundamentals of REST and REST Architectural Elements
• RESTful Service and REST Operation Details
• REST Clients: Postman, Advance Rest Client and SOAP UI
• Creation of REST service
• Conversion of business logic into REST service
• Binding, input binding, output binding, mapping activity
• SOAP Demo

Extending Business Works

• Java activities, Custom Palettes Engine Command, Error Handling, Plugins and add-ons
• SOAP Project with two endpoints, one for HTTP and one for JMS
• Securing Web Services

TIBCO Administration

• TIBCO BW Run time Architecture
• Communication and Domain creation
• Management and Configuration of Robust Domain
• Managing and Monitoring Deployments
• Fault tolerance and load balancing
• Domain, process archive and shared archive
• HAWK agent
• Performance Tuning
• BW Engine
• Deployment and Management
• Loading using AppManage

Introduction to Tools like Ant, Eclipse, Maven, Jenkins

 

0 responses on "File Poller in TIBCO BW"

Leave a Message

Your email address will not be published. Required fields are marked *