tib_bw_quickstart

Upload: ericyeung

Post on 30-May-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 tib_bw_quickstart

    1/24

    TIBCO BusinessWorks

    Quick StartSoftware Release 5.3February 2006

  • 8/14/2019 tib_bw_quickstart

    2/24

    Important Information

    SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCHEMBEDDED OR BUN DLED TIBCO SOFTWARE IS SOLELY TO EN ABLE THE FUNCTION ALITY(OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE.THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BYANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.

    USE OF TIBCO SOFTWARE AN D TH IS DOCUMENT IS SUBJECT TO THE TERMS ANDCONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTEDSOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT,

    THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURINGDOWN LOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN TH ETIBCO BUSINESSWORKS CONCEPTS DOCUMENT). USE OF THIS DO CUMEN T IS SUBJECT TOTHOSE TERMS AND CON DITION S, AND YOUR USE HEREOF SHALL CONSTITUTEACCEPTANCE OF AN D AN AGREEMENT TO BE BOUN D BY THE SAME.

    This documen t contains confiden tial information that is subject to U.S. and int ernational copyr ightlaws and treaties. No p art of this document m ay be reprodu ced in any form without the w rittenauth orization of TIBCO Software Inc.

    TIB, TIBCO, Inform ation Bus, The Pow er of N ow, TIBCO Rend ezvou s, TIBCO InConcert ,TIBCOAdm inistrator, TIBCO Adapter, and TIBCO BusinessWorks are either registered t rad emarks ortrad emar ks of TIBCO Software Inc. in the United States and/ or other coun tries.

    EJB, J2EE, JMS and all Java-based tr ademarks and logos are trad emarks or registered trad emar ks of Sun Microsystems, Inc. in th e U.S. and other coun tries.

    All other produ ct and comp any names and m arks mentioned in this document are the prop erty of their respective owners and are mentioned for identification purposes only.

    This software ma y be available on mu ltiple operating systems. How ever, not all opera ting systemplatforms for a specific software version are r eleased at the same time. Please see the read me.txt filefor the availability of this software version on a specific operating system platform .

    THIS DOCUMEN T IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

    THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPH ICAL

    ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESECHAN GES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMEN T. TIBCOSOFTWARE INC. MAY MAKE IMPROVEMENTS AND/ OR CHANGES IN THE PRODUCT(S)AN D/ OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.

    Copyright 2001-2006 TIBCO Software Inc. ALL RIGHTS RESERVED.

    TIBCO Software Inc. Confidential Information

  • 8/14/2019 tib_bw_quickstart

    3/24

    TIBCO BusinessWorks Quick Start

    | iii

    Contents

    Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vRelated Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

    TIBCO BusinessWorks Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viOther Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

    How to Contact TIBCO Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

    TIBCO BusinessWorks Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    Overview of Example Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Starting TIBCO Designer and Saving Your Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5TIBCO Designer Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    Creating the FileTest Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Testing the FileTest Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

  • 8/14/2019 tib_bw_quickstart

    4/24

    TIBCO BusinessWorks Quick Start

    iv | Contents

  • 8/14/2019 tib_bw_quickstart

    5/24

    TIBCO BusinessWorks Quick Start

    | v

    Preface

    TIBCO Busin essWorks is a scalable, extensible, and easy to u se integrationplatform th at allows you to dev elop and test integration projects. TIBCOBusinessWorks includ es a grap hical user int erface (GUI) for d efining businessprocesses and an engine that executes the process.

    TIBCO BusinessWorks p rocesses can be d eployed and man aged using TIBCOAd ministrator. See the TIBCO Ad ministrator d ocumen tation for moreinformation.

    Topics

    Related Documentation, page vi

    How to Contact TIBCO Customer Support, page vii

  • 8/14/2019 tib_bw_quickstart

    6/24

    TIBCO BusinessWorks Quick Start

    vi | Preface

    Related Documentation

    TIBCO BusinessWorks DocumentationIn add ition to this manu al, the following d ocumen ts are part of the TIBCOBusinessWorks d ocumen tation set:

    TIBCO BusinessWorks Concepts Read this manu al before read ing any otherman ual in the docum entation set. This ma nu al describes terminology andconcepts of TIBCO BusinessWorks, and the oth er manu als in thedocum entation set assume you are familiar w ith the informa tion in thismanual.

    TIBCO BusinessWorks Quick St art This manu al steps you through a verysimple examp le of designing, dep loying, and mon itoring a TIBCOBusinessWorks process.

    TIBCO BusinessWorks Process Design Guide This man ual describes how tocreate, edit, and test business processes using TIBCO BusinessWorks.

    TIBCO BusinessWorks Palette Reference This manu al describes each of thepa lettes ava ilable in TIBCO BusinessWorks.

    TIBCO BusinessWorks Administration This ma nu al describes how to useTIBCO A dm inistrator to dep loy, ma nage, and mon itor TIBCO BusinessWorksprocesses.

    TIBCO BusinessWorks Installation Read th is manu al for information on

    installing on e or m ore compon ents of TIBCO BusinessWorks an d setting u p aTIBCO Busin essWorks dom ain.

    TIBCO BusinessWorks Error Codes This ma nu al describes errors return ed byTIBCO BusinessWorks.

    TIBCO BusinessWorks Release Notes Read the release notes for a list of newand changed features. This docum ent also contains lists of know n issues andcloses issues for this release.

    Other DocumentationTIBCO BusinessWorks is u sed with other prod ucts. You w ill therefore find thedocumentation for those products useful:

    TIBCO Designer documentation. TIBCO Designer is an easy to use graphicaluser interface for design -time configuration of TIBCO ap plications. TIBCODesigner includ es online help for each palette.

  • 8/14/2019 tib_bw_quickstart

    7/24

  • 8/14/2019 tib_bw_quickstart

    8/24

    TIBCO BusinessWorks Quick Start

    viii | Preface

  • 8/14/2019 tib_bw_quickstart

    9/24

    TIBCO BusinessWorks Quick Start

    | 1

    TIBCO BusinessWorks Quick Start

    This docum ent steps you through th e process of designing and testing a simpleTIBCO BusinessWorks project.

    For more information about designing and testing TIBCO BusinessWorksprocesses, see TIBCO 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

  • 8/14/2019 tib_bw_quickstart

    10/24

    TIBCO BusinessWorks Quick Start

    2 | TIBCO BusinessWorks Quick Start

    Introduction

    This tutorial steps you throu gh th e creation of a simp le TIBCO BusinessWorksproject. The goal of this tutorial is to introduce you to the BusinessWorks projectlifecycle. The p hases of the project lifecycle are similar to stan dard project pha ses:

    1. Design determining the requirements of the system, developing aprototype solution to your bu siness needs.

    2. Testing runn ing the system to determine that it works properly and m eetsthe projects requ irements.

    The project in th is tutorial is fairly simp le so that you can focus on how to useBusinessWorks within each phase of the project lifecycle. Once you complete thetutorial, you should be more comfortable app lying th e method ology to your ownprojects.

    Before starting this tu torial, you shou ld become familiar w ith TIBCOBusinessWorks term inology and basic concepts. It is not n ecessary to learn allaspects of BusinessWorks, but you shou ld at least read Chap ter 1 of TIBCO

    BusinessWorks Concepts . That chap ter introdu ces mu ch of the terminology tha tw ill be used in this tutorial. TIBCO Designer Main Window on p age 7 is asum mary of key concepts you shou ld be familiar with.

    Overview of Example ProcessThe project you w ill create w atches a d irectory for a specific file. When th e filechanges, a new file is created t hat contains th e contents of the original file plus th etime the change w as mad e to the original file. The new file is nam ed after thechange that occur red ( c rea t e . t x t , modi fy. t x t , or r emove . tx t ). If you mod ifythe file mu ltiple times, the new file overwr ites the existing modi fy. t x t .

    With this simp le project, you w ill perform m any of the same tasks th at arerequired for larger, more comp lex projects. This tutorial is not intend ed toillustra te every aspect of TIBCO Bus inessWorks, so only a sma ll subset of theavailable activities will be u sed.

    Once a project has been d eveloped an d tested , you can dep loy it using TIBCOAd ministrator. The TIBCO A dministrator Users Guide describes deployment andinclud es a tu torial that u ses the project created in this qu ick start.

  • 8/14/2019 tib_bw_quickstart

    11/24

    TIBCO BusinessWorks Quick Start

    Introduction | 3

    The tutorial steps you throu gh the following ta sks: Starting TIBCO Design er an d Saving Your Project

    Creating th e FileTest Process

    Testing the FileTest Process

  • 8/14/2019 tib_bw_quickstart

    12/24

    TIBCO BusinessWorks Quick Start

    4 | TIBCO BusinessWorks Quick Start

    Prerequisites

    To perform the tasks in this tutorial, you mu st have installed and configured th eTIBCO BusinessWorks softw are p rop erly.

    1. Install all components of TIBCO Runtime Agent (TRA) on your system.

    2. Install all comp onents of TIBCO BusinessWorks on your system.

  • 8/14/2019 tib_bw_quickstart

    13/24

    TIBCO BusinessWorks Quick Start

    Starting TIBCO Designer and Saving Your Project | 5

    Starting TIBCO Designer and Saving Your Project

    To start TIBCO Designer and save you r p roject, follow t hese steps:1. From th e Start menu, choose Al l

    Programs > Tibco > TIBCO Designer< version > > Designer < version > .

    The TIBCO Designer Startu p w indow app ears.

    2. Choose N ew Empty Project .

    The TIBCO Designer main w indow app ears, with th e Save Project dialog on

    top.3. In the Save Project dialog, mak e sure that the Mu lti-File Project tab is selected.

    4. In the Project Directory field, click the Browse button to locate the d irectory inw hich you w ish to save the p roject. Locate the TIBCO BusinessWorksinstallation d irectory, and create a new su bdirectory named t u to r i a l . Click OK to return to the Save Project dialog.

    5. Click OK to create the new project.

    You a re now read y to create a p rocess definition u sing TIBCO Design er. The nextsection gives an overview of TIBCO Designer. If you wou ld like to star t p rocess

    design right aw ay, skip the overview and start w ith Creating th e FileTest Processon page 10 .

  • 8/14/2019 tib_bw_quickstart

    14/24

  • 8/14/2019 tib_bw_quickstart

    15/24

  • 8/14/2019 tib_bw_quickstart

    16/24

    TIBCO Designer Main Window | 9

  • 8/14/2019 tib_bw_quickstart

    17/24

    TIBCO BusinessWorks Quick Start

    TIBCO Designer Main Window | 9

    Resources can also be simple. In the illustration above, PSof t_Orde rEnt ry is asimple resource.

    ActivitiesResources used in process design are called activities. You can create a processflow linking activities with transitions. You can ha ve m ultiple tran sitions fromone activity to others, and each tran sition can be cond itional.

    Palettes

    A p alette provides access to resources. You d rag an d drop resources from th epalette in the palette pan el into the d esign panel to add them t o your p roject.

    TIBCO Designer contains a n um ber of native p alettes. In a dd ition, each TIBCOapp lication you install add s one or m ore palettes to TIBCO BusinessWorks d ur inginstallation.

    Which palette is displayed d epend s on the resource selected in the project treeand on your p references.

    10 | TIBCO BusinessWorks Quick Start

  • 8/14/2019 tib_bw_quickstart

    18/24

    TIBCO BusinessWorks Quick Start

    10 | TIBCO BusinessWorks Quick Start

    Creating the FileTest Process

    This section gu ides you throu gh creating a simple p rocess definition. The process,wh ich w ill be named Fi l eTes t , polls a directory for a specified file and w rites anew file to the sam e d irectory each time the file changes. The new files nam einclud es the type of chang e that occurred to th e original file (create, mod ify, orremove). The n ew files content is the sam e as t he p olled files content, bu t th etime of the change in t he file is app end ed t o the en d of the file. The time of the filechange is rep resented as th e nu mber of millisecond s since Janu ary 1, 1970.

    The tutorial u ses a variable file name to illustrate how to u se the TIBCOBusinessWorks map ping capabilities.

    To create the FileTest process, follow these steps:

    1. In TIBCO Designer, select the project nam e (e.g. t u to r i a l ) in the p rojectpanel.

    2. In the palette panel, select the Process palette.

    If no palettes are in the palette pan el, click the Sw itch Palette Mod e iconto display the p alettes.

    3. From the p alette panel, drag a Process Definition resource into the designpanel.

    4. In the configuration panel, type the name Fi l eTes t in the Name field t orename the process. Then click Apply .

    5. Save your project by choosing Project > S ave from the menu .

    See Also For introdu ctory information abou t processes, see TIBCO BusinessWorks Concepts .For detailed information ab out p rocesses, see the TIBCO 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 d isplayed in the d esign panel.

    Before you sta rt to d esign th e process, create a directory. Then create text file withsome simple content (for examp le, "The cherry blossoms are beau tiful.") in thedirectory. The file will be needed by the Fi l e Po l l e r activity. This example u sesthe d irectory c : \ t i bco \ t e s t and the file Pol l edFi l e . t x t .

    Creating the FileTest Process | 11

  • 8/14/2019 tib_bw_quickstart

    19/24

    TIBCO BusinessWorks Quick Start

    Creating the FileTest Process | 11

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

    3. Drag a File Poller activity into the design pan el (but not on top of the S t a r t activity).

    The Start activity is rep laced by the File Poller activity.

    4. With the File Poller still selected, enter the following values in theconfiguration p anel:

    a . Name the File Poller Tes tFi l ePo l l e r .b. Click t he Browse button to the right of the File Nam e field an d select the

    file you w ant to p oll. Use the Select File d ialog to locate the d irectory an dfile you created.

    c. Leave the Polling Interval, Includ e Existing Files, and Exclud e FileContent fields a s they are. Select text in the d rop-dow n list in the Contentas field, and select the app ropriate encoding for your op erating system in

    the Encoding field.

    d . Click t he Apply button.

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

    If the File palette is not on e of the available palettes, choose Palettes >Activities > File to mak e the palette available.

    12 | TIBCO BusinessWorks Quick Start

  • 8/14/2019 tib_bw_quickstart

    20/24

    TIBCO BusinessWorks Quick Start

    |

    6. Na me the Create File activity CreateTestFile, and click the Overw rite check box, then click the Apply button.

    7. Drag a Write File activity into the design pan el and place it to the right of theCreateTestFile activity (before th e End activity).

    8. Name the Write File activity Wri t eToTes tF i l e , then click the Apply button.

    9. In the toolbar, s elect the Transit ion icon .

    10. Select the TestFilePoller process starter and drag a tra nsition to theCreateTestFile activity. Conn ect th e Crea teTestFile and WriteToTestFile and theWriteToTestFile and End activities in the sam e mann er.

    The result should a pp ear as follows:

    11. Choose Project > Save from the menu .

    The process now includ es app ropriately connected activities. How ever, noinformation abou t the n ame an d content of the files is includ ed. To set those, youuse the TIBCO Designer ma pp ing facilities.

    The goal in th is exercise is to create a file that has t he n ame Fi l e< changeType >. tx t ,where < changeType > is the typ e of chan ge that occurred to the original file (create,mod ify, or remove). The contents of the changed file is then w ritten to th e newfile, and the time th e change in the file occurred is ap pend ed to th e end of thecontents. For example, if the text in the changed file is "The cherry blossoms a rebeautiful." the content of the new file will be "The cherry blossoms are beau tiful.1017163931036"

  • 8/14/2019 tib_bw_quickstart

    21/24

    14 | TIBCO BusinessWorks Quick Start

  • 8/14/2019 tib_bw_quickstart

    22/24

    TIBCO BusinessWorks Quick Start

    |

    can release the data over this item an d t he correct XPath expression w illappear.

    d. Add a comm a after $TestFilePoller/ EventSourceOutp utTextClass/ action,

    then add the string " . t x t " (include th e quotes).The expression sh ould look like the following:

    conca t ( " c : \ t i bco \ t e s t \F i l e " ,$Tes tF i l ePo l l e r /Even tSourceOutpu tTex tCla ss / ac t i on , " . t x t " )

    6. Click th e Apply button to accept th e formu la and d ismiss the XPath Formu laBuild er by clicking Close . Then click th e Apply button in the Inpu t tab of theactivity.

    7. Select the WriteToTestFile activity, then click the Inpu t tab in the configurationpanel.

    8. Map the data as fo llows:

    a. Select $CreateTestFile/ CreateActivityOutpu tClass/ fileInfo/ fullNam e anddrag it to the fileNa me item in the Activity Inp ut p ane.

    You d o not need to use th e XPath Formu la Builder to m ap th is item becauseyou do not n eed to use XPath functions. The content of the field is exactlythe same as the value of the$CreateTestFile/ CreateActivityOutp utClass/ fileInfo/ fullName processvariable.

    b. In the right p anel, select the textContent field and click the XPath FormulaBu ilder icon.

    c. In the XPath Formu la Builder, drag a concat function into the XPathformu la panel.

    d . Add " " , between > an d < < string2 >> so that th ere is a spacebetween the two strings in the conca t function.

    e. Click th e Data tab and drag$TestFilePoller/ EventSourceOutp utTextClass/ fileContent/ textContentover > .

    f. Drag $TestFilePoller/ EventSourceOutp utTextClass/ timeOccurred over> .

    The formula shou ld look like this:

    conca t ($Tes tF i l ePo l l e r /Even tSourceOutpu tTex tCla ss /f i l eConten t / t ex tConten t , " " ,$Tes tF i l ePo l l e r /Even tSourceOutpu tTex tCla ss / t imeOccur red )

    g. Click th e Apply button to accept the formu la and d ismiss the XPath

    Formula Builder by clicking Close .

    Creating the FileTest Process | 15

  • 8/14/2019 tib_bw_quickstart

    23/24

    TIBCO BusinessWorks Quick Start

    |

    9. Click th e Apply butt on on th e activitys Inpu t tab, then choose Project > Save to save you r p roject.

    You are now ready to test the project.

    16 | TIBCO BusinessWorks Quick Start

  • 8/14/2019 tib_bw_quickstart

    24/24

    TIBCO BusinessWorks Quick Start

    Testing the FileTest Process

    You can test the FileTest p rocess directly from TIBCO Design er. This allows you toma ke sure th e process works correctly before you d eploy 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 th rough th e process. Stepp ing helps you seewh at hap pens w hen each activity executes.

    3. Click the Tester tab to the left of the p roject pan el. The test panel replaces theproject tree.

    4. Click the Start testing viewed process button.

    5. In the process selection w indow that ap pears, the FileTest process is selectedby d efault. Click Start Selected .

    The process is now in Test mod e.

    6. Make a change to the polled file to start the process.7. Once the TestFilePoller process starter is highlighted (ind icating a process has

    started), click the Step to next activity icon to step throu gh the process.

    TIBCO BusinessWorks creates an output file named Fi l emodi fy. t x t afteryou h ave stepp ed into the WriteToTest activity and w rites the app ropriate textto th e file.

    The text shou ld be the text of Pol l edFi l e . t x t and , in a n ew line, the time, inmilliseconds , since Janu ary 1, 1970.

    You can click on each activity in the p rocess definition a s you step th rough it.If you click on the Process Data or O utp ut tabs for the activity, you w ill see theactual process data an d ou tpu t of the activity as the process executes.

    8. Next , delete Pol l edFi l e . t x t .

    9. Step through the process once more.

    TIBCO BusinessWorks creates a file Fi l e remove . tx t . The conten t of Fileremove.txt is just the time of modification, because the polled file nolonger exists.

    10. Click the Stop Test Mod e icon to return to d esign mod e.

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