0% found this document useful (0 votes)
167 views32 pages

TIB BW 5.14 Getting Started

Uploaded by

Arif Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views32 pages

TIB BW 5.14 Getting Started

Uploaded by

Arif Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

TIBCO ActiveMatrix

BusinessWorks™
Getting Started
Software Release 5.14
August 2018

Two-Second Advantage®
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED
OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED
ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED
SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR
ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A
LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE
AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER
LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE
SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARE
LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED
IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS
AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN
AGREEMENT TO BE BOUND BY THE SAME.
ANY SOFTWARE ITEM IDENTIFIED AS THIRD PARTY LIBRARY IS AVAILABLE UNDER SEPARATE
SOFTWARE LICENSE TERMS AND IS NOT PART OF A TIBCO PRODUCT. AS SUCH, THESE SOFTWARE
ITEMS ARE NOT COVERED BY THE TERMS OF YOUR AGREEMENT WITH TIBCO, INCLUDING ANY
TERMS CONCERNING SUPPORT, MAINTENANCE, WARRANTIES, AND INDEMNITIES. DOWNLOAD
AND USE THESE ITEMS IS SOLELY AT YOUR OWN DISCRETION AND SUBJECT TO THE LICENSE TERMS
APPLICABLE TO THEM. BY PROCEEDING TO DOWNLOAD, INSTALL OR USE ANY OF THESE ITEMS,
YOU ACKNOWLEDGE THE FOREGOING DISTINCTIONS BETWEEN THESE ITEMS AND TIBCO
PRODUCTS.
This document contains confidential information that is subject to U.S. and international copyright laws and
treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO
Software Inc.
TIBCO, Two-Second Advantage, TIBCO Hawk, TIBCO Rendezvous, TIBCO Runtime Agent, TIBCO
ActiveMatrix BusinessWorks, TIBCO Administrator, TIBCO Designer, TIBCO ActiveMatrix Service Gateway,
TIBCO BusinessEvents, TIBCO BusinessConnect, and TIBCO BusinessConnect Trading Community
Management are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or
other countries.
Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform Enterprise Edition
(J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle Corporation
in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of their
respective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL
OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME
TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC
OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.
CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE
INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE
IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN
THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR
INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING
BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright © 2001-2018 TIBCO Software Inc. ALL RIGHTS RESERVED.
|v

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Changes from the Previous Release of this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
TIBCO ActiveMatrix BusinessWorks Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
TIBCO Product Documentation and Support Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
How to Access TIBCO Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
How to Contact TIBCO Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
How to Join TIBCO Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

TIBCO ActiveMatrix BusinessWorks Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Overview of Example Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Starting TIBCO Designer and Saving Your Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
TIBCO Designer Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Creating the FileTest Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Testing the FileTest Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Using BusinessWorks Engine Command Line to Run a TIBCO ActiveMatrix BusinessWorks Project . . . . . . . . 17

TIBCO ActiveMatrix BusinessWorksTM Getting Started


vi
| Contents

TIBCO ActiveMatrix BusinessWorksTM Getting Started


| vii

Preface

TIBCO ActiveMatrix BusinessWorks is a scalable, extensible, and easy to use


integration platform that allows you to develop and test integration projects.
TIBCO ActiveMatrix BusinessWorks uses the TIBCO Designer graphical user
interface (GUI) for defining business processes and the TIBCO ActiveMatrix
BusinessWorks process engine executes the process.
TIBCO ActiveMatrix BusinessWorks processes can be deployed and managed
using TIBCO Administrator. See the TIBCO Administrator documentation for
more information.

Topics

• Changes from the Previous Release of this Guide, page viii


• Related Documentation, page ix
• Typographical Conventions, page xi
• TIBCO Product Documentation and Support Services, page xiii

TIBCO ActiveMatrix BusinessWorksTM Getting Started


viii
| Changes from the Previous Release of this Guide

Changes from the Previous Release of this Guide

There are no changes in this guide during this release.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Preface ix
|

Related Documentation

This section lists documentation resources you may find useful.

TIBCO ActiveMatrix BusinessWorks Documentation


The following documents form the TIBCO ActiveMatrix BusinessWorks
documentation set:
• TIBCO ActiveMatrix BusinessWorks Concepts Read this manual before reading
any other manual in the documentation set. This manual describes
terminology and concepts of TIBCO ActiveMatrix BusinessWorks, and the
other manuals in the documentation set assume you are familiar with the
information in this manual.
• TIBCO ActiveMatrix BusinessWorks Getting Started This manual steps you
through a very simple example of designing, deploying, and monitoring a
TIBCO ActiveMatrix BusinessWorks process.
• TIBCO ActiveMatrix BusinessWorks Process Design Guide This manual
describes how to create, edit, and test business processes using TIBCO
ActiveMatrix BusinessWorks.
• TIBCO ActiveMatrix BusinessWorks Palette Reference This manual describes
each of the palettes available in TIBCO ActiveMatrix BusinessWorks.
• TIBCO ActiveMatrix BusinessWorks Administration This manual describes how
to use TIBCO Administrator to deploy, manage, and monitor TIBCO
ActiveMatrix BusinessWorks processes.
• TIBCO ActiveMatrix BusinessWorks Installation Read this manual for
information on installing one or more components of TIBCO ActiveMatrix
BusinessWorks and setting up a TIBCO ActiveMatrix BusinessWorks domain.
• TIBCO ActiveMatrix BusinessWorks Error Codes This manual describes errors
returned by TIBCO ActiveMatrix BusinessWorks.
• TIBCO ActiveMatrix BusinessWorks Release Notes Read the release notes for a
list of new and changed features. This document also contains lists of known
issues and closed issues for this release.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


x
| Related Documentation

Other TIBCO Product Documentation


TIBCO ActiveMatrix BusinessWorks is used with other products. You may find it
useful to read the documentation for the following TIBCO products:
• TIBCO Designer™ software: TIBCO Designer is an easy to use graphical user
interface for design-time configuration of TIBCO applications. TIBCO
Designer includes online help for each palette.
• TIBCO Administrator™ software: TIBCO Administrator is the monitoring
and managing interface for new-generation TIBCO products such as TIBCO
ActiveMatrix BusinessWorks.
• TIBCO Adapter software
• Third-Party Documentation

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Preface xi
|

Typographical Conventions

The following typographical conventions are used in this manual.

Table 1 General Typographical Conventions

Convention Use
TIBCO products are installed into an installation environment. A product
installed into an installation environment does not access components in other
installation environments. Incompatible products and multiple instances of the
same product must be installed into different installation environments.
An installation environment consists of the following properties:
• Name Identifies the installation environment. This name is referenced in
documentation as ENV_NAME. On Microsoft Windows, the name is
ENV_NAME
appended to the name of Windows services created by the installer and is a
component of the path to the product shortcut in the Windows Start > All
Programs menu.
• Path The folder into which the product is installed. This folder is referenced
TIBCO_HOME
in documentation as TIBCO_HOME.
TIBCO ActiveMatrix BusinessWorks installs into a directory within a
BW_HOME TIBCO_HOME. This directory is referenced in documentation as BW_HOME. The
default value of BW_HOME depends on the operating system. For example on
Windows systems, the default value is C:\tibco\bw\5.12.

code font Code font identifies commands, code examples, filenames, pathnames, and
output displayed in a command window. For example:
Use MyCommand to start the foo process.

bold code Bold code font is used in the following ways:


font
• In procedures, to indicate what a user types. For example: Type admin.
• In large code samples, to indicate the parts of the sample that are of
particular interest.
• In command syntax, to indicate the default parameter for a command. For
example, if no parameter is specified, MyCommand is enabled:
MyCommand [enable | disable]

TIBCO ActiveMatrix BusinessWorksTM Getting Started


xii
| Typographical Conventions

Table 1 General Typographical Conventions (Cont’d)

Convention Use
italic font Italic font is used in the following ways:
• To indicate a document title. For example: See TIBCO ActiveMatrix
BusinessWorks Concepts.
• To introduce new terms For example: A portal page may contain several
portlets. Portlets are mini-applications that run in a portal.
• To indicate a variable in a command or code syntax that you must replace.
For example: MyCommand pathname

Key Key name separated by a plus sign indicate keys pressed simultaneously. For
combinations example: Ctrl+C.
Key names separated by a comma and space indicate keys pressed one after the
other. For example: Esc, Ctrl+Q.

The note icon indicates information that is of special interest or importance, for
example, an additional action required only in certain circumstances.

The tip icon indicates an idea that could be useful, for example, a way to apply
the information provided in the current section to achieve a specific result.

The warning icon indicates the potential for a damaging situation, for example,
data loss or corruption if certain steps are taken or not taken.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Preface xiii
|

TIBCO Product Documentation and Support Services

For information about this product, you can read the documentation, contact
TIBCO Support, or join TIBCO Community.

How to Access TIBCO Documentation


Documentation for TIBCO products is available on the TIBCO Product
Documentation website mainly in the HTML and PDF formats.
The TIBCO Product Documentation website is updated frequently and is more
current than any other documentation included with the product. To access the
latest documentation, visit https://docs.tibco.com.
Documentation for TIBCO ActiveMatrix BusinessWorksTM is available on the
TIBCO ActiveMatrix BusinessWorksTM Product Documentation page.

How to Contact TIBCO Support


You can contact TIBCO Support in the following ways:
• For an overview of TIBCO Support, visit
https://www.tibco.com/services/support.
• For accessing the Support Knowledge Base and getting personalized content
about products you are interested in, visit the TIBCO Support portal at
https://support.tibco.com.
• For creating a Support case, you must have a valid maintenance or support
contract with TIBCO. You also need a user name and password to log in to
https://support.tibco.com. If you do not have a user name, you can request
one by clicking Register on the website.

How to Join TIBCO Community


TIBCO Community is the official channel for TIBCO customers, partners, and
employee subject matter experts to share and access their collective experience.
TIBCO Community offers access to Q&A forums, product wikis, and best
practices. It also offers access to extensions, adapters, solution accelerators, and
tools that extend and enable customers to gain full value from TIBCO products. In
addition, users can submit and vote on feature requests from within the TIBCO
Ideas Portal. For a free registration, go to https://community.tibco.com.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


xiv
| TIBCO Product Documentation and Support Services

TIBCO ActiveMatrix BusinessWorksTM Getting Started


|1

TIBCO ActiveMatrix BusinessWorks


Getting Started

This document steps you through the process of designing and testing a simple
TIBCO ActiveMatrix BusinessWorks project.
For more information about designing and testing TIBCO ActiveMatrix
BusinessWorks processes, see TIBCO ActiveMatrix BusinessWorks Process Design
Guide.

Topics

• Introduction, page 2
• Prerequisites, page 4
• Starting TIBCO Designer and Saving Your Project, page 5
• TIBCO Designer Main Window, page 7
• Creating the FileTest Process, page 10
• Testing the FileTest Process, page 16
• Using BusinessWorks Engine Command Line to Run a TIBCO ActiveMatrix
BusinessWorks Project, page 17

TIBCO ActiveMatrix BusinessWorksTM Getting Started


2 TIBCO ActiveMatrix BusinessWorks Getting Started
|

Introduction

This tutorial steps you through the creation of a simple TIBCO BusinessWorks
project. The goal of this tutorial is to introduce you to the BusinessWorks project
lifecycle. The phases of the project lifecycle are similar to standard project phases:
1. Design — determining the requirements of the system, developing a
prototype solution to your business needs.
2. Testing — running the system to determine that it works properly and meets
the project’s requirements.
The project in this tutorial is fairly simple so that you can focus on how to use
BusinessWorks within each phase of the project lifecycle. Once you complete the
tutorial, you should be more comfortable applying the methodology to your own
projects.
Before starting this tutorial, you should become familiar with TIBCO
BusinessWorks terminology and basic concepts. It is not necessary to learn all
aspects of BusinessWorks, but you should at least read Chapter 1 of TIBCO
BusinessWorks Concepts. That chapter introduces much of the terminology that
will be used in this tutorial. TIBCO Designer Main Window on page 7 is a
summary of key concepts you should be familiar with.

Once a project has been developed and tested, you can deploy it using TIBCO
Administrator. The TIBCO Administrator User’s Guide describes deployment and
includes a tutorial that uses the project created in this manual.

Overview of Example Process


The project you will create watches a directory for a specific file. When the file
changes, a new file is created that contains the contents of the original file plus the
time the change was made to the original file. The new file is named after the
change that occurred (create.txt, modify.txt, or remove.txt). If you modify
the file multiple times, the new file overwrites the existing modify.txt.
With this simple project, you will perform many of the same tasks that are
required for larger, more complex projects. This tutorial is not intended to
illustrate every aspect of TIBCO BusinessWorks, so only a small subset of the
available activities will be used.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Introduction 3
|

The tutorial steps you through the following tasks:


• Starting TIBCO Designer and Saving Your Project
• Creating the FileTest Process
• Testing the FileTest Process

TIBCO ActiveMatrix BusinessWorksTM Getting Started


4 TIBCO ActiveMatrix BusinessWorks Getting Started
|

Prerequisites

To perform the tasks in this tutorial, you must have installed and configured the
TIBCO ActiveMatrix BusinessWorks software properly.
1. Install all components of TIBCO Runtime Agent (TRA) on your system.
2. Install all components of TIBCO ActiveMatrix BusinessWorks on your system.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Starting TIBCO Designer and Saving Your Project 5
|

Starting TIBCO Designer and Saving Your Project

To start TIBCO Designer and save your project, follow these steps:
1. From the Start menu, choose All
Programs > TIBCO > TIBCO Designer <version> > Designer <version>.
The TIBCO Designer Startup window appears.
2. Choose New Empty Project.
The TIBCO Designer main window appears, with the Save Project dialog on
top.
3. In the Save Project dialog, make sure that the Multi-File Project tab is selected.
4. In the Project Directory field, click the Browse button to locate the directory in
which you wish to save the project. Locate the TIBCO BusinessWorks
installation directory, and create a new subdirectory named tutorial. Click
OK to return to the Save Project dialog.

5. Click OK to create the new project.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


6 TIBCO ActiveMatrix BusinessWorks Getting Started
|

You are now ready to create a process definition using TIBCO Designer. The next
section gives an overview of TIBCO Designer. If you would like to start process
design right away, skip the overview and start with Creating the FileTest Process
on page 10.

See Also For some introductory information on TIBCO Designer, see TIBCO Designer
Main Window on page 7. The TIBCO Designer User’s Guide, available from the
Help > Designer Help menu, gives additional information, including an
introduction to the display preferences.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


TIBCO Designer Main Window 7
|

TIBCO Designer Main Window

The TIBCO Designer main window has these components:


• Menu bar and menus.
• Toolbar icons.
• Four panels, which are (starting in the top left corner and continuing
clockwise):
— Project tree panel
— Design panel
— Configuration panel
— Palette panel
Menu bar
Toolbar

Project panel

Design panel

Palette panel

Configuration
Panel

The following sections explain each panel.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


8 TIBCO ActiveMatrix BusinessWorks Getting Started
|

Projects
A project consists of objects that contain the functionality needed for your
enterprise integration. This includes services (producers and consumers of
information), any business logic that may be applied to that information, and
deployment information.
Each TIBCO Designer window contains one and only one project, which is
represented as the top-level folder in the window.
The ProcessNewComputer project, shown below in the project tree panel, includes
two process definitions, a PeopleSoft adapter (PSoft_ReqRep), a Siebel adapter
(SBLAccount), and several other resources.

Project

Resources
Resources are the components of a project. A TIBCO Designer resource
corresponds to an object in a TIBCO application, such as FTP Put activity, a
process definition, or a specific adapter instance.

Resources
Resources
in project
in design
panel
panel

TIBCO ActiveMatrix BusinessWorksTM Getting Started


TIBCO Designer Main Window 9
|

Resources can be complex and contain other resources, much like a folder can
contain other folders on your computer's file system. For example, an adapter
instance may contain multiple folders with multiple publisher or subscriber
resources. A process definition contains multiple activities.
Resources can also be simple. In the illustration above, PSoft_OrderEntry is a
simple resource.

Activities
Resources used in process design are called activities. You can create a process
flow linking activities with transitions. You can have multiple transitions from
one activity to others, and each transition can be conditional.

Palettes
A palette provides access to resources. You drag and drop resources from the
palette in the palette panel into the design panel to add them to your project.
TIBCO Designer contains a number of native palettes. In addition, each TIBCO
application you install adds one or more palettes to TIBCO ActiveMatrix
BusinessWorks during installation.
Which palette is displayed depends on the resource selected in the project tree
and on your preferences.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


10 TIBCO ActiveMatrix BusinessWorks Getting Started
|

Creating the FileTest Process

This section guides you through creating a simple process definition. The process,
which will be named FileTest, polls a directory for a specified file and writes a
new file to the same directory each time the file changes. The new file’s name
includes the type of change that occurred to the original file (create, modify, or
remove). The new file’s content is the same as the polled file’s content, but the
time of the change in the file is appended to the end of the file. The time of the file
change is represented as the number of milliseconds since January 1, 1970.
The tutorial uses a variable file name to illustrate how to use the TIBCO
BusinessWorks mapping capabilities.

Before you start to design the process, create a directory. Then create text file
with some simple content (for example, "The cherry blossoms are beautiful.") in
the directory. The file will be needed by the File Poller activity. This example
uses the directory c:\tibco\test and the file PolledFileTest.txt.

To create the FileTest process, follow these steps:


1. In TIBCO Designer, select the project name (e.g. tutorial) in the project
panel.
2. In the palette panel, select the Process palette.
If no palettes are in the palette panel, click the Switch Palette Mode icon
to display the palettes.
3. From the palette panel, drag a Process Definition resource into the design
panel.
4. In the configuration panel, type the name FileTest in the Name field to
rename the process. Then click Apply.
5. Save your project by choosing Project > Save from the menu.

See Also For introductory information about processes, see TIBCO BusinessWorks Concepts.
For detailed information about processes, see the TIBCO ActiveMatrix
BusinessWorks Process Design Guide.

To add activities to the process, follow these steps:


1. Select the FileTest process in the project tree.
The Start and End activities should be displayed in the design panel.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Creating the FileTest Process 11
|

2. Find the File palette in the palette panel and select it.

If the File palette is not one of the available palettes, choose Palettes >
Activities > File to make the palette available.

3. Drag a File Poller activity into the design panel (but not on top of the Start
activity).
The Start activity is replaced by the File Poller activity.
4. With the File Poller still selected, enter the following values in the
configuration panel:
a. Name the File Poller TestFilePoller.
b. Click the Browse button to the right of the File Name field and select the
file you want to poll. Use the Select File dialog to locate the directory and
file you created.
c. Leave the Polling Interval, Include Existing Files, and Exclude File
Content fields as they are. Select text in the drop-down list in the Content
as field, and select the appropriate encoding for your operating system in
the Encoding field.

d. Click the Apply button.


5. Drag a Create File activity into the design panel and place it to the right of
TestFilePoller.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


12 TIBCO ActiveMatrix BusinessWorks Getting Started
|

6. Name the Create File activity CreateTestFile, and click the Overwrite check
box, then click the Apply button.

7. Drag a Write File activity into the design panel and place it to the right of the
CreateTestFile activity (before the End activity).
8. Name the Write File activity WriteToTestFile, then click the Apply button.

9. In the toolbar, select the Transition icon .


10. Select the TestFilePoller process starter and drag a transition to the
CreateTestFile activity. Connect the CreateTestFile and WriteToTestFile and the
WriteToTestFile and End activities in the same manner.
The result should appear as follows:

11. Choose Project > Save from the menu.


The process now includes appropriately connected activities. However, no
information about the name and content of the files is included. To set those, you
use the TIBCO Designer mapping facilities.
The goal in this exercise is to create a file that has the name File<changeType>.txt,
where <changeType> is the type of change that occurred to the original file (create,
modify, or remove). The contents of the changed file is then written to the new
file, and the time the change in the file occurred is appended to the end of the
contents. For example, if the text in the changed file is "The cherry blossoms are
beautiful." the content of the new file will be "The cherry blossoms are beautiful.
1017163931036"

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Creating the FileTest Process 13
|

To map the data flow between activities, follow these steps:


1. Choose the Select icon in the toolbar, if it is not already selected.
2. Select the CreateTestFile activity and choose the Input tab in the configuration
panel. Expand the CreateActivityInputClass item in the activity input tree by
clicking on the plus sign (+) to the left of the item.

Each activity’s output is available to subsequent activities in the process


definition. You can use data from previous activities to specify the input of the
current activity. For example, you can use the content of the original text file as
the content of the new text file.
The left panel of the Input tab contains a list of data from all activities
preceding the current activity in the process diagram. Each activity’s name
appears with a dollar sign ($) in front of it to indicate that this is a process
variable.
The right panel of the Input tab lists the current activity’s input.
3. Click the plus (+) sign next to the process variable $TestFilePoller in the
Process Data panel and expand the schema tree containing the output of the
TestFilePoller process starter.
4. In the right panel, select the fileName element in the Activity Input pane, then
click the XPath Formula Builder (pencil) icon.
5. In the XPath Formula Builder dialog that appears, follow these steps:
a. Select the Functions tab, open the String folder, select concat, and drag it
into the XPath Formula panel.
The display in the right panel changes to display a concat XPath
expression.
b. Replace << string1 >> with "c:\tibco\test\File" (include the quotes).
c. In the left panel, select the Data tab, choose the
$TestFilePoller/EventSourceOutputTextClass/action element and drag it
over << string2 >>. A red box appears over << string2 >> indicating you

TIBCO ActiveMatrix BusinessWorksTM Getting Started


14 TIBCO ActiveMatrix BusinessWorks Getting Started
|

can release the data over this item and the correct XPath expression will
appear.
d. Add a comma after $TestFilePoller/EventSourceOutputTextClass/action,
then add the string ".txt" (include the quotes).
The expression should look like the following:
concat("c:\tibco\test\File",
$TestFilePoller/EventSourceOutputTextClass/action, ".txt")

6. Click the Apply button to accept the formula and dismiss the XPath Formula
Builder by clicking Close. Then click the Apply button in the Input tab of the
activity.
7. Select the WriteToTestFile activity, then click the Input tab in the configuration
panel.
8. Map the data as follows:
a. Select $CreateTestFile/CreateActivityOutputClass/fileInfo/fullName and
drag it to the fileName item in the Activity Input pane.
You do not need to use the XPath Formula Builder to map this item because
you do not need to use XPath functions. The content of the field is exactly
the same as the value of the
$CreateTestFile/CreateActivityOutputClass/fileInfo/fullName process
variable.
b. In the right panel, select the textContent field and click the XPath Formula
Builder icon.
c. In the XPath Formula Builder, drag a concat function into the XPath
formula panel.
d. Add " ", between <<string1>> and <<string2>> so that there is a space
between the two strings in the concat function.
e. Click the Data tab and drag
$TestFilePoller/EventSourceOutputTextClass/fileContent/textContent
over <<string1>>.
f. Drag $TestFilePoller/EventSourceOutputTextClass/timeOccurred over
<<string2>>.

The formula should look like this:


concat($TestFilePoller/EventSourceOutputTextClass/
fileContent/textContent," ",$TestFilePoller/
EventSourceOutputTextClass/timeOccurred )

g. Click the Apply button to accept the formula and dismiss the XPath
Formula Builder by clicking Close.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Creating the FileTest Process 15
|

9. Click the Apply button on the activity’s Input tab, then choose Project > Save
to save your project.
You are now ready to test the project.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


16 TIBCO ActiveMatrix BusinessWorks Getting Started
|

Testing the FileTest Process

You can test the FileTest process directly from TIBCO Designer. This allows you to
make sure the process works correctly before you deploy it. Follow these steps:
1. Click the Set Breakpoints icon .
2. In the window that appears, choose Select All, then click OK.
Breakpoints allow you to step through the process. Stepping helps you see
what happens when each activity executes.
3. Click the Tester tab to the left of the project panel. The test panel replaces the
project tree.
4. Click the Start testing viewed process button.
5. In the process selection window that appears, the FileTest process is selected
by default. Click Load and Start Current.
The process is now in Test mode.
6. Make a change to the polled file to start the process.
7. Once the TestFilePoller process starter is highlighted (indicating a process has
started), click the Step to next activity icon to step through the process.
TIBCO BusinessWorks creates an output file named Filemodify.txt after
you have stepped into the WriteToTestFile activity and writes the appropriate
text to the file.
The text should be the text of PolledFileTest.txt and, in a new line, the
time, in milliseconds, since January 1, 1970.
You can click on each activity in the process definition as you step through it.
If you click on the Process Data or Output tabs for the activity, you will see the
actual process data and output of the activity as the process executes.
8. Next, delete PolledFileTest.txt.
9. Step through the process once more.
TIBCO ActiveMatrix BusinessWorks creates a file Fileremove.txt. The
content of Fileremove.txt is just the time of modification, because the polled
file no longer exists.
10. Click the Stop Test Mode icon to return to design mode.

See also For more information on using test mode, see the TIBCO ActiveMatrix
BusinessWorks Process Design Guide.

TIBCO ActiveMatrix BusinessWorksTM Getting Started


Using BusinessWorks Engine Command Line to Run a TIBCO ActiveMatrix BusinessWorks Project 17
|

Using BusinessWorks Engine Command Line to Run a TIBCO


ActiveMatrix BusinessWorks Project

In the absence of a GUI environment or an administrator to deploy a TIBCO


ActiveMatrix BusinessWorks project, you can test your project by using command
line to run the TIBCO ActiveMatrix BusinessWorks Engine and view the test
results.

To run a TIBCO ActiveMatrix BusinessWorks project using the TIBCO


ActiveMatrix BusinessWorks Engine command line, provide an absolute path of
your project location such as, <BW_HOME>/bin/bwengine <root directory of the BW
project>.

Replace the following with the appropriate values as per your environment:
• -propFile to use a different .tra file instead of bwengine.tra.
• -name to provide name for the engine
• -p to specify props.cfg file which contains the engine properties

Use option "-name <descriptive name>" in the command line for providing
each engine a descriptive name, when starting the TIBCO ActiveMatrix
BusinessWorks Engine using the command line.
For example, if the descriptive name is "myproject", then a message "Engine
myproject started" appears after the engine is started.

The commands to start the TIBCO ActiveMatrix BusinessWorks Engine with the
name option are:
• bwengine <absolute path of the project> -name <name>

• bwengine -propFile <tra file> <absolute path of the project>


-name <name>

• bwengine -propFile <tra file> -p <properties file> <absolute


path of the project> -name <name>

TIBCO ActiveMatrix BusinessWorksTM Getting Started


18 TIBCO ActiveMatrix BusinessWorks Getting Started
|

TIBCO ActiveMatrix BusinessWorksTM Getting Started

You might also like