tib bw administration 6.1.0

46
TIBCO ActiveMatrix BusinessWorks Administration Software Release 6.1.0 May 2014 Two-Second Advantage ®

Upload: krishna-vengalasetty

Post on 08-Feb-2016

126 views

Category:

Documents


1 download

DESCRIPTION

TIB BW Administration 6.1.0

TRANSCRIPT

Page 1: TIB BW Administration 6.1.0

TIBCO ActiveMatrix BusinessWorks™

AdministrationSoftware Release 6.1.0May 2014

Two-Second Advantage®

Page 2: TIB BW Administration 6.1.0

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCHEMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY(OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THEEMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANYOTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.

USE OF TIBCO SOFTWARE AND THIS 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, THECLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOADOR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE)OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USERLICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THESOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, ANDYOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BEBOUND BY THE SAME.

This document contains confidential information that is subject to U.S. and international copyright lawsand treaties. No part of this document may be reproduced in any form without the writtenauthorization of TIBCO Software Inc.

TIBCO, TIBCO ActiveMatrix BusinessWorks, TIBCO Rendezvous, TIBCO Enterprise Message Service,TIBCO Business Studio, TIBCO Enterprise Administrator, TIBCO ActiveSpaces, TIBCO Runtime Agent,TIBCO Designer, and Two-Second Advantage are either registered trademarks or trademarks of TIBCOSoftware Inc. in the United States and/or other countries.

Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform EnterpriseEdition (J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks ofOracle Corporation in the U.S. and other countries.

All other product and company names and marks mentioned in this document are the property of theirrespective owners and are mentioned for identification purposes only.

THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOTALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASEDAT THE SAME TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWAREVERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.

THIS DOCUMENT 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 TYPOGRAPHICALERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESECHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCOSOFTWARE 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 ORINDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE,INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.

Copyright © 2001-2014 TIBCO Software Inc. ALL RIGHTS RESERVED.

TIBCO Software Inc. Confidential Information

2

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 3: TIB BW Administration 6.1.0

Contents

TIBCO Documentation and Support Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

Administration Architecture Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8

Execution Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Running Applications in Local Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8

Running in Enterprise Mode using the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10

Running Applications in Enterprise Mode using the Web UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14

ActiveMatrix BusinessWorks Administrator and Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20

bwadmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

bwagent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20

Creating an Agent Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21

Administration Tasks and Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Managing Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22

Creating a Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Deleting a Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Managing AppSpaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Creating an AppSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Starting an AppSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23

Viewing AppSpace States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23

Stopping an AppSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24

Deleting an AppSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Managing AppNodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Creating an AppNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Starting an AppNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25

Viewing AppNode States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26

Stopping an AppNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27

Enabling the OSGi Console for an AppNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27

Managing an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Creating an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Creating an Application with Multiple Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Creating an Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Uploading an Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Deploying an Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Configuring an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Exporting a Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Starting an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Verifying Deployed Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Stopping an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 4: TIB BW Administration 6.1.0

Undeploying an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Using bwdesign Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Integrating ActiveMatrix BusinessWorks with TIBCO Enterprise Administrator . . . . . . . . . . . . . . . . . . . . . . . . 37

Registering a bwagent with TIBCO Enterprise Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Autoregistering a bwagent with TIBCO Enterprise Administrator server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Monitoring using TIBCO Hawk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Enabling TIBCO Hawk MicroAgent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40

TIBCO Hawk MicroAgent Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40

DisableProcessStatsCollection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

EnableProcessStatsCollection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

GetActivitiesStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

GetProcessInstanceCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

GetProcessInstanceInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

GetProcessStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43

ListApplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

ListProcessEnabledForStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

ResetActivityStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

ResetProcessStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

4

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 5: TIB BW Administration 6.1.0

TIBCO Documentation and Support Services

All TIBCO documentation is available in the TIBCO Documentation Library, which can be found here:

https://docs.tibco.com

Product-Specific Documentation

The following documents for TIBCO ActiveMatrix BusinessWorks can be found in the TIBCODocumentation Library:

● Concepts● Installation● Getting Started● Application Development● Administration● Bindings and Palettes Reference● Samples● Migration

The following documents provide additional information and can found be in the TIBCODocumentation Library:

● TIBCO Enterprise Administrator User's Guide

How to Contact TIBCO Support

For comments or problems with this manual or the software it addresses, contact TIBCO Support asfollows:

● For an overview of TIBCO Support, and information about getting started with TIBCO Support,visit this site:

http://www.tibco.com/services/support

● If you already have a valid maintenance or support contract, visit this site:

https://support.tibco.com

Entry to this site requires a user name and password. If you do not have a user name, you canrequest one.

How to Join TIBCOmmunity

TIBCOmmunity is an online destination for TIBCO customers, partners, and resident experts. It is aplace to share and access the collective experience of the TIBCO community. TIBCOmmunity offersforums, blogs, and access to a variety of resources. To register, go to:

http://www.tibcommunity.com

5

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 6: TIB BW Administration 6.1.0

Administration Architecture Overview

Applications are deployed into runtime environments and managed using the bwadmin utility. TIBCO®

Enterprise Administrator can also be used to manage and monitor applications.

TIBCO ActiveMatrix BusinessWorks provides a flexible framework that allows you to scale yourruntime environment as needed. The runtime also provides an option to execute the engine so that therisk of a single point of failure when running an application is reduced.

The following are the key administrative components:

● Application archive is the deployment unit for an application that is generated in TIBCO BusinessStudio.

● Domain is a logical group that provides an isolated environment for applications and theirresources to reside.

● AppSpace is a group of one or more AppNodes, which are runtime entities that host ActiveMatrixBusinessWorks applications. AppSpaces are contained within a domain.

● AppNode is a runtime entity that hosts ActiveMatrix BusinessWorks applications. AppNodes arecontained in an AppSpace.

● bwagent is a daemon that runs on every ActiveMatrix BusinessWorks installation. When multipleinstallations across machines are configured as a network, the bwagents interact with each otherusing a datastore. They also synchronize the data from the datastore with the local file system.

In the Administration Architecture illustration below, domain M1 spans two machines, Machine A andMachine B. Domain N1 is on Machine A. Domain M1 contains two AppSpaces; one of the AppSpacesS2 spans both the machines. The bwagent on Machine A is configured to interact with the bwagent onMachine B through the datastore.

6

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 7: TIB BW Administration 6.1.0

The bwagent on Machine A is registered with the TIBCO Enterprise Administrator (TEA) server. If theregistered bwagent becomes unavailable, the connection between the TIBCO Enterprise Administratorserver and the agent network is automatically recovered. The bwagent on Machine B will autoregisterwith the server.

If the TEA server becomes unavailable, running applications and AppSpaces are not impacted.

The runtime entities manifest as a hierarchical folder structure on the local file system. Every actionperformed on the runtime entities results in an update to the file system. When the runtime entitiesspan machines, the bwagent synchronizes the data from the datastore with the local file system. At anygiven point in time, the data in the file system is the source of truth. This ensures that in case of a failurein the communication channel, the runtime is not affected as it refers to the data on the local file system.

See the Concepts guide for more information about administration concepts.

7

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 8: TIB BW Administration 6.1.0

Getting Started

Run and manage the applications you create in TIBCO Business Studio™ using the TIBCO ActiveMatrixBusinessWorks™ administrator command line console, bwadmin.

The bwagent is a daemon that runs on every ActiveMatrix BusinessWorks installation. The bwadminconsole and the bwagent are included with the ActiveMatrix BusinessWorks installation in the binfolder. See ActiveMatrix BusinessWorks Administration and Agent for more details.

Important: BW_HOME points to TIBCO_HOME\bw\n.n

Execution ModesThe execution mode is set using the bwadmin command line console or in the bwagent's configurationfile.

When ActiveMatrix BusinessWorks is installed, the default mode of the bwagent is set to local.

Local modeIn local mode the bwadmin utility modifies the local file system directly instead of delegating thework to a bwagent. Local mode does not provide data storage and runtime entities are created in thefile system. This mode is useful for developers during development and testing cycles. See RunningApplications in Local Mode.

Enterprise modeConfigure enterprise mode to start the bwagent. Then, use the bwadmin console to executecommands, just as in local mode. In enterprise mode, instead of working on the file system directly,bwadmin sends commands to the bwagent. The bwagent dispatches the command to targeted agent.That agent then completes the command on the local file system. See Running in Enterprise ModeUsing the Command Line.

Running Applications in Local ModeLocal mode allows you to test and debug your application on your local machine.

The runtime entities created in local mode are not visible to bwagents when they are started.

Prerequisites

Before starting this tutorial, copy the BookStore sample archive located in BW_HOME\samples\core\admin\ears\bookstore\ear to c:\ear.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Set the mode to local:mode local

3. Create a domain. See Creating a Domain for more information.bwadmin[admin]> create domain MyDomain

4. Show the domain.bwadmin[admin]> show domain MyDomainDomains in the enterprise: MyDomain

5. Change directory to the domain:bwadmin[admin]> cd MyDomainbwadmin[admin@MyDomain]>

8

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 9: TIB BW Administration 6.1.0

6. Create an AppSpace, show it, and change directory to the AppSpace. See Creating an AppSpace formore information.

Note that the status of a newly created AppSpace is Degraded. This will change once AppNodes areadded to the AppSpace to satisfy the minimum number of AppNodes. The default is 1. The numberof AppNodes can be set when you create the AppSpace using the -minNodes option.bwadmin[admin@MyDomain]> create appspace MyAppSpaceTIBCO-BW-ADMIN-CLI-300200: AppSpace [MyAppSpace] in Domain [MyDomain] created.

bwadmin[admin@MyDomain]> show appspace MyAppSpaceDomain: MyDomainName MinNodes Status Nodes Applications Libraries MyAppSpace 1 Degraded 0 0 0 Listed all AppSpaces in 0 seconds

bwadmin[admin@MyDomain]> cd MyAppSpacebwadmin[admin@MyDomain/MyAppSpace]>

7. Create an AppNode and show it. When you create an AppNode, you need to specify the HTTPmanagement port for the bwagent to be able to communicate with the AppNode.

The management port must be unique across all defined AppNodes on the same machine. If theport you specify is already in use, you will see an error and the AppNode cannot be created. Youcan get a list of defined AppNodes for a given domain, including port numbers, using the showcommand: show -d <DomainName> appnodes

When you create the AppNode, you can optionally specify a port for the OSGi console sothat you can monitor the AppNode. (You should only enable this port for troubleshootingpurposes.) See Enabling the OSGi Console for an AppNode for more information.

For more information on AppNodes, Creating an AppNode for more information.

After the AppNode has been created, you can use the show command for the AppSpace to see thatthe AppSpace status has changed from Degraded to Stopped.bwadmin[admin@MyDomain/MyAppSpace]> create -httpPort 8060 appnode MyAppNodeTIBCO-BW-ADMIN-CLI-300300: AppNode [MyAppNode] in AppSpace [MyAppSpace], Domain [MyDomain] created.

bwadmin[admin@MyDomain/MyAppSpace]> show appnode MyAppNodeName Status AppSpace MgmtPort Agent ConfigState Up TimeMyAppNode Stopped MyAppSpace 8060 localhost InSync 0d 00:00:00Listed all AppNodes in 0 seconds

8. Upload the archive into the AppSpace.

The following command assumes that the BookStore archive has been copied to the c:\eardirectory. Note the use of forward slashes (/) in the Windows path in the command.bwadmin[admin@MyDomain/MyAppSpace]> upload c:/ear/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earTIBCO-BW-ADMIN-CLI-500438: Uploaded archive [c:/ear/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear]

9. Show that the archive was uploaded:bwadmin[admin@MyDomain/MyAppSpace]> show archivesName tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earPath Version Domain AppName 1.0.0.201403201653 MyDomain1 tibco.bw.sample.binding.rest.BookStore.application Uploaded Time Uploaded By Size(Kb)2014/04/27 10:18:10 67

10. Start the AppSpace. This starts the AppNode in the AppSpace.bwadmin[admin@MyDomain/MyAppSpace]> start appspace MyAppSpaceTIBCO-BW-ADMIN-CLI-300203: AppSpace [MyAppSpace| in Domain [MyDomain] started.

9

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 10: TIB BW Administration 6.1.0

11. Deploy the application into the AppSpace. This deploys the application to the AppNode.bwadmin[admin@MyDomain/MyAppSpace]> deploy tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earTIBCO-BW-ADMIN-CLI-300403: Deployed application [tibco.bw.sample.binding.rest.BookStore.application:1.0]

12. Show the running application.bwadmin[admin@MyDomain/MyAppSpace]> show applicationDomain: MyDomainNametibco.bw.sample.binding.rest.BookStore.application Version AppSpace Status Deployment Status (Running/Total)1.0 MyAppSpace Start Deployed (1/1)Listed all Applications in 0 seconds

13. Start and stop the application. The start and stop commands for an application require theapplication version number. In this case, the version is 1.0. (Before you stop the application, you canuse the show command to verify that the application has been started.)bwadmin[admin@MyDomain/MyAppSpace]> start application tibco.bw.sample.binding.rest.BookStore.application 1.0TIBCO-BW-ADMIN-CLI-300405: The application [tibco.bw.sample.binding.rest.BookStore.application:1.0] started.

bwadmin[admin@MyDomain/MyAppSpace]> stop application tibco.bw.sample.binding.rest.BookStore.application 1.0TIBCO-BW-ADMIN-CLI-300406: The application [tibco.bw.sample.binding.rest.BookStore.application:1.0] stopped.

14. You can optionally undeploy the application, stop the AppSpace, and delete the entities (archive,AppNode, AppSpace, and domain).

Result

You have used the bwadmin console in local mode to create a domain, an AppSpace, and an AppNode.You uploaded an archive to the domain, deployed the application, and started and stopped theapplication. Spend some time experimenting the command line utility. For more information, see bwadmin. For more information about domains, AppSpaces, AppNodes, and applications, see Administration Tasks and Reference.

Running in Enterprise Mode using the Command LineIn enterprise mode, bwagents can communicate across machines and can be configured to form abwagent network.

The bwagent is located in the BW_HOME\bin folder.

Prerequisites

Walk through the steps in the section called Running Applications in Local Mode. This will help orientyou to the bwadmin console. The instructions in this section assume you have completed those steps.

Install ActiveMatrix BusinessWorks on two machines. Machines are noted as Machine1 and Machine2in the instructions.

Before starting this tutorial, copy the BookStore sample archive located in BW_HOME\samples\core\admin\ears\bookstore to c:\ear.

10

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 11: TIB BW Administration 6.1.0

Procedure

1. Configure the bwagent on Machine1.a) On Machine1, navigate to BW_HOME\config and open the bwagent.ini file in a text editor.b) Set the admin.mode property to enterprise.c) Edit the discoveryURL property by adding the IP address and port or the host name and port of

Machine2.discoveryURL=tcp://Machine1:5050;Machine2:5050

Important: The discoveryURL property must be the same for all bwagents in the network.d) Verify the setting of the memberName property. The member name must be unique in a network.

If not unique, the network will not start.e) Verify that the bwadmin.cluster.name property is set to the default setting: bwmetaspace

This setting must be the same for all bwagents in the network.f) Save the file.

2. Repeat the configuration for the bwagent on Machine2.a) On Machine2, navigate to BW_HOME\config and open the bwagent.ini file in a text editor.b) Set the admin.mode property to enterprise.c) Edit the discoveryURL property by adding the IP address and port or the host name and port of

Machine1 to the property.

Machine1 and Machine2 will need to be able to communicate with each other over thenetwork. Choose a public interface to ensure discoverability.

discoverURL=tcp://Machine2:5050;Machine1:5050

d) Verify the setting of the memberName property. The member name must be unique in a network.If not unique, the duplicate member will not start.

e) Verify that the bwadmin.cluster.name property is set to the default setting: bwmetaspaceThis setting must be the same for all bwagents in the network.

f) Save the file.

3. Start the bwagent on Machine1.a) Open a terminal on Machine1 and navigate to BW_HOME\bin folder.b) Type bwagent. The bwagent starts:

TIBCO ActiveMatrix BusinessWorks version 6.1.0, build V4, 2014-05-0BW Agent name Machine1BW Agent stores data locallyInitializing datastore using TIBCO ActiveSpaces (Java). Enterprise Edition. Version 2.1.2.124 .............. Initialization of datastore completeBW Agents in the group that store data:Name Machine1, Host 10.98.201.5TIBCO-BW-AGENT-300002: BusinessWorks Agent started successfully.

11

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 12: TIB BW Administration 6.1.0

4. Start the bwagent on Machine2.a) Open a terminal on Machine2 and navigate to BW_HOME\bin folder.b) Type bwagent. The bwagent starts:

TIBCO ActiveMatrix BusinessWorks version 6.1.0, build V4, 2014-05-09BW Agent name Machine2BW Agent stores data locallyunable to resolve network specification ('Machine1')unable to resolve network specification ('Machine1')unable to resolve network specification ('Machine1')Initializing datastore using TIBCO ActiveSpaces (Java). Enterprise Edition. Version 2.1.2.124 .............. Initialization of datastore completeBW Agents in the group that store data:Name Machine2, Host 10.98.201.96Name Machine1, Host 10.98.201.5There are [2] agents in the BW Agent group that store data. However, the property "minSeederCount" in the bwagent.ini file is set to [1], refer to the bwagent.ini file or the documentation and choose an appropriate value.There are [2] agents in the BW Agent group that store data. However, the property "quorumSize" in the bwagent.ini file is set to [1], refer to the bwagent.ini file or the documentation and choose an appropriate value.TIBCO-BW-AGENT-300002: BusinessWorks Agent started successfully.

Note that the connection to the bwagent on Machine1 is tried several times. Once this bwagentfinds networked bwagents, the machine names and IP addresses are listed. The bwagent alsoreports warnings about other property settings in the bwagent.ini file that should be adjustedto provide fault tolerance.

5. Start the bwadmin console on each machine and show the bwagents.a) On Machine1, navigate to BW_HOME\bin and type bwadmin.b) On Machine2, navigate to BW_HOME\bin and type bwadmin.c) In both terminals, type show to view the bwagents.

6. Go to the bwadmin console on Machine1. Create a domain on Machine2 by specifying the bwagentin the command line:bwadmin[admin]> create -agent Machine2 domain DomainMachine2Connecting to the BW Agent using TIBCO ActiveSpaces (Java). Enterprise Edition. Version 2.1.2.124Connected to BW AgentTIBCO-BW-ADMIN-CLI-300100: Domain [DomainMachine2] created.

7. On Machine1, use the show domains command to show the domain.bwadmin[admin]> show domainsDomains in the enterprise: DomainMachine2

12

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 13: TIB BW Administration 6.1.0

8. Create an AppSpace on Machine2 using the bwadmin console on Machine1.a) Change to the domain on Machine1.

bwadmin[admin]> cd DomainMachine2 bwadmin[admin@DomainMachine2]>

b) Create an AppSpace on Machine2 by specifying the bwagent. Two AppNodes are specified:bwadmin[admin@DomainMachine2]> create -agent Machine2 -minNodes 2 appspace AppSpaceMachine2TIBCO-BW-ADMIN-CLI-300200: AppSpace [AppSpaceMachine2] in Domain [DomainMachine2] created.

c) View the file system on Machine1 to verify that the AppSpace was created.

Each runtime entity is created in the file system. It is critical that all runtime entities are managedusing the bwadmin utility so that they are in sync with the datastore.

9. On Machine1, change to the AppSpace AppSpaceMachine2 in the bwadmin console and create the 2AppNodes for the AppSpace. Specify the bwagent for the AppNodes.bwadmin[admin@DomainMachine2]> cd AppSpaceMachine2bwadmin[admin@DomainMachine2/AppSpaceMachine2]

bwadmin[admin@DomainMachine2/AppSpaceMachine2]> create -agent Machine2 -httpPort 8070 appnode AppNodeMachine2ATIBCO-BW-ADMIN-CLI-300300: AppNode [AppNodeMachine2A] in AppSpace [AppSpaceMachine2], Domain [DomainMachine2] created.

bwadmin[admin@DomainMachine2/AppSpaceMachine2]> create -agent Machine2 -httpPort 8071 appnode AppNodeMachine2BTIBCO-BW-ADMIN-CLI-300300: AppNode [AppNodeMachine2B] in AppSpace [AppSpaceMachine2], Domain [DomainMachine2] created.

The -httpPort argument is required. The values must be unique for each AppNode.

10. On Machine1, upload the archive that exists in the c:/ear folder on Machine1 toAppSpaceMachine2.bwadmin[admin@DomainMachine2/AppSpaceMachine2]> upload c:/ear/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.earTIBCO-BW-ADMIN-CLI-300410: Uploaded archive [c:/ear/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear].

11. Use the bwadmin console on Machine1 to start the AppSpace on Machine2. This will start theAppNodes in the AppSpace on Machine2. Type: start appspace AppSpaceMachine2

12. On the bwadmin console on Machine2, verify that the AppNodes are running:bwadmin[admin@DomainMachine2/AppSpaceMachine2]> show appnodesName Status AppSpaceMgmtPort Agent ConfigState Up TimeAppNodeMachine2B Running AppSpaceMachine28071 Machine2 InSync 0d 00:09:42AppNodeMachine2A Running AppSpaceMachine28070 Machine2 InSync 0d 00:09:42

Listed all AppNodes in 0 seconds

13

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 14: TIB BW Administration 6.1.0

13. Use the bwadmin console on Machine1 to stop the AppSpace on Machine2. This will stop theAppNodes in the AppSpace on Machine2. Type: stop appspace AppSpaceMachine2

14. Back up the domain. This exports the persisted state into a bwadmin command file. This file can beread by the bwadmin utility at the command line to recreate the environment, for example: bwadmin-f backup.cmd

When you run the backup command, you need to specify the entity you are backing up (domain,agent, AppSpace or AppNode) and provide the path to a destination file. In this example,DomainMachine2 is backed up.bwadmin[admin@DomainMachine2/AppSpaceMachine2]> backup -s backup.cmd domain DomainMachine2TIBCO-BW-ADMIN-CLI-300131: Backed up Domain [DomainMachine2]TIBCO-BW-ADMIN-CLI-300008: Backup completed.

The bwadmin backup command and the bwadmin restore command are notcomplimentary. The backup command exports the current state of the environment to acommand file. The restore command restores the file system of a bwagent to the state ofthe persistent datastore.

Result

You set up a network with two bwagents on two machines. You used the bwadmin console on onemachine to create runtime entities on the other machine. You uploaded an archive to the domain andstarted the AppSpace. You also backed up the environment.

You can continue experimenting by adding additional machines to the network, adding more runtimeentities, or deploying the archive (you'll need to start the AppSpace again).

When you are done, you can force delete the domain from the bwadmin console on either machinewith the following command: delete -force domain DomainMachine2

To exit the bwadmin console, type exit in the bwadmin terminal. To exit the bwagent, type ^C (thismay take a few seconds). At the command line, type bwagent stop to completely stop the agent.

Running Applications in Enterprise Mode using the Web UIYou can use the TIBCO® Enterprise Administrator (TEA) server web UI to create, view, and monitorActiveMatrix BusinessWorks runtime entities.

A bwagent contains an implementation of a TEA agent that allows the bwagent to be accessed from theTIBCO Enterprise Administrator server web UI or command shell. Only one TEA agent can beregistered with a bwagent at a time.

Prerequisites

Before starting this tutorial:

● Install TIBCO Enterprise Administrator and start the server.● If you have not already copied the BookStore sample archive to a local folder, do so now. Copy the

archive located in BW_HOME\samples\core\admin\ears\bookstore\ear to c:\ear.

Stop any entities that are running (AppSpaces and/or AppNodes) and close any open bwadmin orbwagent sessions.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.Start the bwadmin console by typing bwadmin at the command line.

14

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 15: TIB BW Administration 6.1.0

2. Set the mode to enterprise:bwadmin[admin]> mode enterpriseAdmin mode set to enterprise

3. Open a new terminal and navigate to BW_HOME\bin. Type bwagent.The bwagent starts.

4. Return to the bwadmin terminal and register the ActiveMatrix BusinessWorks TEA agent with theTEA server. This allows the bwagent to be available in the TIBCO Enterprise Administrator serverweb UI. The URL to the TIBCO Enterprise Administrator server is required for the registration. (TheURL is available from the terminal where you started the server.)bwadmin[admin]> registerteaagent http://NWOOD-W530:8777/Connecting to the BW Agent using TIBCO ActiveSpaces (Java). Enterprise Edition. Version 2.1.2.123 Connected to BW AgentTIBCO-BW-ADMIN-CLI-300010: Registered TEA Agent [NWOOD-W530] with TEA Server.

5. Open TIBCO Enterprise Administrator in a web browser and sign in, using admin/admin for theuser name and password.BusinessWorks is displayed in the Products list.

15

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 16: TIB BW Administration 6.1.0

6. Click the BusinessWorks icon to go to your ActiveMatrix BusinessWorks integration with TIBCOEnterprise Administrator. The Domain Management page is displayed.a) Click Create Domain to open the Create Domain dialog box.b) Enter the domain name in the Name field. Do not use spaces. Click Create to create the domain

with the default bwagent.The domain is created and displayed on the Domain Management page. It will look similar to thefollowing image:

7. Click the domain name to open the domain.

8. Add an AppSpace to the domain.

a) Click the AppSpaces icon to open the AppSpaces page.b) Click Create AppSpace.c) In the Create AppSpace dialog box, enter the name of the AppSpace in the Name field. Accept

the value of 1 in the MinNodes field.d) Accept the default agent and click Create.The AppSpace is created. A success notification is displayed at the top of the page. Notice that theAppSpace status is set to Degraded. This will change to Stopped when you add an AppNode to theAppSpace. The AppSpaces page will look similar to this:

16

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 17: TIB BW Administration 6.1.0

9. Add an AppNode to the AppSpace.

a) Click the AppNodes icon to open the AppNodes page.b) Click Create AppNode.c) In the Create AppNode dialog box, enter the name of the AppNode in the Name field.d) Choose the agent from the Agent drop-down.e) Leave the HTTP Interface and HTTP Port set to the defaults.f) Leave the OSGi fields empty. (This are optional fields for debugging your AppNode. For more

information, see Enabling the OSGi Console for an AppNode.)g) Click Create.The AppNode is created. A success notification is displayed at the top of the page and theAppNode is displayed. The AppNodes page will look similar to the following image:

10. Open the AppSpaces page and notice that the status is set to Stopped.

a) Start the AppSpace by clicking the Start icon .The AppSpace starts and starts its one contained node. The status changes to Starting, then Runningto indicate that both the AppNode and AppSpace are running.

17

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 18: TIB BW Administration 6.1.0

11. Upload an application archive to the AppSpace.

a) Click the Application Archives icon .b) In the Application Archives page, click the Upload link and drag the BookStore sample archive

from c:\ear to the Upload Ear File dialog box.c) Click Upload.d) A success message is displayed in the dialog box. Click Done to close the dialog box.The application archive is displayed on the Application Archives page:

12. Deploy the application.a) Click the application archive link on the Application Archives page, then click Deploy to deploy

the BookStore application.b) In the Deploy Applications dialog box, select the AppSpace you want to deploy to from the

AppSpace drop-down and check the Start applications on AppNodes after deployment option.This option starts the application after successful deployment.

c) Click Deploy.The application is deployed to the selected AppSpace and is started on the AppNode.

Result

You registered the bwagent with the TEA server. You used ActiveMatrix BusinessWorks integratedwith TIBCO Enterprise Administrator to create a domain, AppSpace, and AppNode; start the

18

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 19: TIB BW Administration 6.1.0

AppSpace; upload an archive; deploy the application, and start the application. For more informationabout domains, AppSpaces, AppNodes, and applications, see Administration Tasks and Reference.Spend some time experimenting with TIBCO Enterprise Administrator. The web interface allows youto drill down into entities and pivot views. For more information, see Integrating with TIBCOEnterprise Administrator.

19

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 20: TIB BW Administration 6.1.0

ActiveMatrix BusinessWorks Administrator and Agent

The ActiveMatrix BusinessWorks Administrator and ActiveMatrix BusinessWorks Agent are used tomanage domains, AppSpaces, AppNodes, archives, and applications.

For more information, see bwadmin and bwagent.

bwadminbwadmin is the utility used to create ActiveMatrix BusinessWorks runtime entities. It provides acommand line interface that can be used in local mode or enterprise mode to create and managedomains, AppSpaces, AppNodes, archives, and applications. Collectively, the entities provide thelogical and physical structure for the runtime environment.

bwadmin provides these features:

● One tool for both local and enterprise mode with identical commands● Interactive shell● Batch/silent mode by passing a command file as argument● Ability to execute commands locally as well as remotely● Ability to address different bwagent networks● Simple and intuitive command structures● Scoped commands● Nested commands● UNIX style commands for complex scripting● Command completion

A full range of commands is available in the bwadmin utility. Each command can be executed stand-alone with the provided syntax, or the utility can be launched as a shell and execute any number ofcommands in a sequence. A set of commands can also be stored with all the necessary inputs in a fileand then executed in batch mode from bwadmin. In enterprise mode, remote command invocations tobwagents running on remote machines are supported.

The cd command also sets the context for some commands. For example, setting the domain contextallows you to omit the domain argument for commands like create, delete, start, or stop.

To view available commands, press the tab key from the bwadmin console.

To get comprehensive help using a command, type: help <command>

bwagentA bwagent is a daemon process that is responsible for provisioning AppNodes and applications,performing administrative commands, and synchronizing data from the datastore with the local filesystem.

There is one bwagent for each ActiveMatrix BusinessWorks installation. The bwagent enablescommunication between agents located on different machines. When multiple bwagents are configuredto communicate with each other using a common datastore, they form a bwagent network.

When multiple bwagents belong to a network and one of the system fails due to some reason, the failedsystem can be restored after a restart. The bwagent restores the system by synchronizing data from thedatastore with the local file system.

There are multiple ways to access the bwagent: the bwadmin command line utility, the TIBCOEnterprise Administrator UI, or the REST API.

20

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 21: TIB BW Administration 6.1.0

Creating an Agent NetworkThis section shows how to configure bwagents so they can be members of the same agent network.

To create a bwagent network, verify the following properties in each bwagent's BW_HOME\config\bwagent.ini file:

● discoveryURL: The URLs of bwagents to connect to the datastore. Each bwagent must use the samesetting for this property.

● bwadmin.cluster.name: The network name. Each bwagent must use the same agent networkname.

● memberName: The name of the bwagent. Must be unique for each bwagent.

● listenURL: The listen port and interface that the bwagent uses to listen for client connections.

Complete the following steps for each bwagent that is to join the agent network:

Procedure

1. For each bwagent, open the BW_HOME\config\bwagent.ini file in a text editor.a) Edit the discoveryURL property by adding the hostname and port for each bwagent in the agent

network.For example:discoveryURL=tcp://machine1:5050;machine2:5050;machine3:5050

b) Make sure the bwadmin.cluster.name property is the same for each bwagent.For example:bwadmin.cluster.name=bwmetaspace

c) Make sure the memberName property is unique for each bwagent.

2. Stop and restart bwagent. In a new terminal, navigate to BW_HOME\bin and type bwagent stop. Inthe bwagent terminal, restart by typing bwagent.

Result

Use the show agents command to show all discovered bwagents. Agents in a network can be managedby any other bwagent.

21

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 22: TIB BW Administration 6.1.0

Administration Tasks and Reference

Managing DomainsA domain is a collection of users, machines, and applications. A domain provides an administrativeboundary for an integration project. Each domain may share machines with other domains, but do notcommunicate with other domains. A domain includes servers that may or may not be distributed overdifferent machines and operating systems. Applications running in a domain are isolated from theapplications running in other domains.

Creating a DomainA domain comprises AppSpaces and AppNodes.

You must first create a domain and then add the AppSpaces and AppNodes to the domain.

If the -home option is not used, the domain is created in the default location under the TIBCO_HOME\bw\domains directory.

Procedure

1. In the terminal, navigate to BW_HOME\bin and type bwadmin.

2. Run the following command to create a domain named MyDomain:bwadmin[admin]> create domain MyDomain

Deleting a DomainWhen you force delete a domain, all domain entities including AppSpaces and AppNodes are deleted.

You cannot undo a domain deletion. After you force delete a domain, the domain and all entities insidethe domain are deleted.

Procedure

1. In the terminal, navigate to BW_HOME\bin and type bwadmin.

2. A domain can be empty or contain AppSpaces. You can delete an empty domain and also a domainthat contains one or more AppSpaces.Option Command

To delete an empty domain bwadmin[admin]> delete domain MyDomain

To delete a domain that contains one or moreAppSpaces

bwadmin[admin]> delete -force domain

MyDomain

Managing AppSpacesAn application is deployed to a single AppSpace.

An AppSpace is a virtual pool of AppNodes where an application is deployed. When an application isdeployed, the AppSpace starts the application on each of its AppNodes. More AppNodes can be addeddynamically to the AppSpace to manage the load-balancing and fault-tolerance needs for anapplication.

22

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 23: TIB BW Administration 6.1.0

You can specify a minimum number of AppNodes as a threshold for determining the AppSpace state.If the threshold falls below the minimum, the runtime state becomes Degraded.

When an application deployed to an AppSpace runs, and scalability is enabled, all the AppNodes in theAppSpace are started and share the load for the application. If scalability is turned off for a deployedapplication, the application executes on just one AppNode.

Creating an AppSpaceAn AppSpace is created under a domain, which must exist before adding an AppSpace to it.An AppSpace contains AppNodes.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. To create an AppSpace named MyAppSpace under the existing domain, MyDomain, execute thefollowing command:bwadmin[admin]> create -d MyDomain -minNodes 3 appspace MyAppSpace

Result

The MyAppSpace AppSpace is created under the domain MyDomain that exists on the machine wherethe bwagent is running. Use the -agent option to create an AppSpace running on a remote machine.Run the show agents command on the remote machine to get the agent name.

Starting an AppSpaceTo run applications in an AppSpace, you must first start the AppSpace.

When using bwadmin to start an AppSpace, you must be working on the machine that hosts thedomain.

If an AppSpace does not contain any AppNodes, it will not be able to start completely. The AppSpacestatus is set to Degraded.

Procedure

1. In the terminal, navigate to BW_HOME\bin and type bwadmin.

2. Execute the following command:bwadmin[admin]> start -d MyDomain appspace MyAppSpace

Viewing AppSpace StatesAn AppSpace has two states, deployment and runtime, which can have the following values:

Deployment State Description

In Sync The AppSpace is synchronized with its bwagents.

Out of Sync The AppSpace is out of synchronization. The out-of-sync state may occurwhen:

● a bwagent is not reachable due to network failure, or● the bwagent configuration may not have been applied remotely.

The Runtime state can have the following states:

23

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 24: TIB BW Administration 6.1.0

Runtime State

OperationsAllowed in ThisState Applies to:

Running Stop All AppNodes running in the configured AppSpace .

Stopped Start, Delete All AppNodes running in the configured AppSpace .

Degraded Stop All AppNodes configured in this AppSpace that fallbelow the minimum specified threshold.

The state also occurs when the AppSpace is not running.

Stopping an AppSpaceWhen you stop an AppSpace, all applications running in the AppSpace stop.

When using bwadmin to stop an AppSpace, you must be working on the machine that hosts thedomain.

To stop MyAppSpace in MyDomain:

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Execute the following command:bwadmin[admin]> stop -d MyDomain appspace MyAppSpace

Deleting an AppSpaceAn AppSpace can be deleted if it has no attached AppNodes.You can force delete an AppSpace if needed.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. To delete an AppSpace named MyAppSpace under the existing domain, MyDomain, execute thefollowing command:bwadmin[admin]> delete -d MyDomain appspace MyAppSpace

If the AppSpace has an attached AppNode, the delete command will fail.

You can either stop the attached AppNode and then retry the delete command or use the deletecommand with the -force option.bwadmin[admin@MyDomain> delete -force appspace MyAppSpaceThe command line option -force on AppSpace [MyAppSpace] would stop and delete all the AppNodes in the AppSpaceand delete the AppSpace from all the remote agents. TIBCO-BW-ADMIN-CLI-300206: AppSpace [MyAppSpace] in Domain [MyDomain] deleted.

24

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 25: TIB BW Administration 6.1.0

Managing AppNodesAn AppNode is a runtime entity for hosting application modules and libraries.

An AppNode represents a physical engine process that is launched when an application starts to run.

● You must install ActiveMatrix BusinessWorks on each machine hosting an AppNode.● One or more AppNodes can be created in an AppSpace.

Creating an AppNodeAn AppNode is created under an AppSpace.

Multiple AppNodes are typically created for an AppSpace.

If you are testing applications locally, you may need only one AppNode defined where yourapplications run. In a production environment, you'll need multiple AppNodes defined to handle loadbalancing and scalability.

When creating an AppNode that is on a remote machine, you must specify the name of the bwagentrunning on the remote machine.

When you create an AppNode, do not specify the OSGi port. Only open this port for debugging whenyou are ready to enable the OSGi console on an AppNode. For details, see Enabling the OSGi Consolefor an AppNode.

The following section explains how to create an AppNode on a remote machine.

Prerequisites

● The bwagent is running on the remote machine.● You have the member name of the bwagent that is assigned to the machine where you want the

AppNode to run. You can get the member name value by invoking the bwadmin show agentscommand on the remote machine.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Create an AppNode and specify the bwagent member name for the -agent option. Note that thehttpPort option is required. If the port you specify is already in use, you will see an error and theAppNode cannot be created. You can get a list of defined AppNodes for a given domain, includingport numbers, using the show command: show -d <DomainName> appnodes

The following command creates a domain, an Appspace in the domain, and an Appnode in theAppSpace. The AppNode is assigned to run on machine2, identified by the -agent option.bwadmin[admin]> create -d MyDomain -a MyAppSpace -httpPort 2222 -agent machine2 appnode MyAppNodeOnMacTIBCO-BW-ADMIN-CLI-300300: AppNode [MyAppNodeOnMac] in AppSpace [MyAppSpace], Domain [MyDomain] created successfully.

Starting an AppNodeYou use the start command to manually start an AppNode.

When you start an AppSpace, all AppNodes associated with the AppSpace automatically start.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

25

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 26: TIB BW Administration 6.1.0

2. Run the following command to start an AppNode:bwadmin[admin]> start -d MyDomain -a MyAppSpace appnode MyAppNodeOnMac

Viewing AppNode StatesThis section describes the deployment and runtime states that can be returned for an AppNode.

An AppNode has two states, Deployment and Runtime.

Deployment State

This state can have the following values.

Deployment State Description

In Sync AppNode is in a synchronized state with deployment features,configurations, or both.

Out of Sync AppNode is out of synchronization with certain deploymentfeatures, configurations, or both.

Runtime State

An AppNode's Runtime state relies on the timestamp of the hosting machine and on the timestamp ofthe machine hosting the bwagent. The machines must be within 20 seconds difference for the status ofthe AppNode to be reported correctly. This state can have the following values.

Runtime StateOperations AllowedWhen in This State Description

Running Stop Reported only by the AppNode. The AppNode hassuccessfully initialized all the product bundles andreached the target start level.

Stopped Start, Delete The AppNode is not running. This is determined onlyby the bwagent.

Impaired Stop The AppNode is in an impaired state after it hasencountered an error during the startup in one of theproduct bundles.

This may impact the functionality of the AppNode.

Unreachable <none> The AppNode is unreachable when a remote bwagentand the remote machine is down, or a network failureoccurs resulting in network partitioning. This state isdetermined only by the bwagent.

Start Failed Start, Delete This is determined by the bwagent when it is makingan attempt to start the AppNode process when theAppNode does not start.

26

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 27: TIB BW Administration 6.1.0

Runtime StateOperations AllowedWhen in This State Description

Starting Stop This is a transitional state reported by the AppNodewhen the Web API layer has been initialized, but theWeb API is still accessible and can report the state.

This happens when a bundle blocks the shutdownthread.

Stopping an AppNodeWhen you stop an AppNode, applications running on the AppNode stop.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Execute the following command:bwadmin[admin]> stop -d MyDomain -a MyAppSpace appnode MyAppNodeOnMac

Enabling the OSGi Console for an AppNodeThe enableconsole command dynamically enables the OSGi console on the given port for a runningAppNode. Advanced users can telnet to the port and execute native OSGi commands to getinformation about an AppNode's status. This is useful when collecting diagnostic data remotely. Bydefault, the OSGi port is closed.

Although you can create an AppNode with the OSGi port details specified, this is not recommended.Keeping this port open when you're not using the console poses a security risk. The enableconsolecommand can only be executed against a running AppNode.

Prerequisites

The following names are used in the following steps.

● MyDomain is the domain name.● MyAppSpace is the AppSpace name.● MyAppNode is the AppNode name and it is running on the ASMITH-W520 machine on port 1113.● The OSGi console port is defined as 9060.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Go to MyDomain.bwadmin[admin]> cd MyDomain

3. Go to the MyAppSpace.bwadmin[admin@MyDomain]> cd MyAppSpace

4. Start the AppNode, if it is not already running:bwamdin[admin@MyDomain/MyAppSpace]> start appnode MyAppNode

5. Run the enableconsole command, passing the host and OSGi port number. For example:bwamdin[admin@MyDomain/MyAppSpace]> enableconsole -n MyAppNode ASMITH-W520 1113

TIBCO-BW-ADMIN-CLI-300304: Console enabled for AppNode [MyAppNode] in Domain [MyDomain]

27

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 28: TIB BW Administration 6.1.0

Result

Use the telnet command to access the OSGi console where you can run commands to get informationabout running AppNodes and applications.telnet ASMITH-W520 1113admin@MyAppNode> helpbw:dsrbw:laesbw:laisbw:lapibw:lapicbw:lasbw:latbw:lebw:lecbw:lendpointsbw:lesbw:lfpicbw:lpesbw:lpisbw:lrbw:lrhandlersbw:lrproxiesbw:lselbw:ltpicbw:startaescbw:startpescbw:startpiscbw:stopaescbw:stoppescbw:stoppiscbwadmin:installbwadmin:restartbwadmin:shutdownbwadmin:uninstallbwadmin:version

Some of the statistics retrieval commands such as laes, lpes, lpis, and lais require statisticsactivation commands (startaesc, startpesc, startpisc) to be executed first.

You can use the disconnect command to gracefully quite the telnet session, but leave the OSGi portopen for reentry. Use the telnet stop command to close the connection after the debugging session iscomplete.

Do not use the exit command as this will shut down the AppNode.

If you are using the TIBCO Enterprise Administrator, you can display the OSGi port console with thetools button on the AppNodes page.

Managing an ApplicationAn application is an instance of a deployed archive. It has an independent lifecycle with regard to anAppSpace or AppNode. After completing the design process in TIBCO Business Studio, you can deploythe application.

An application provides the business logic to perform one or more related tasks and contains anapplication module that was defined in TIBCO Business Studio. The module itself can includeprocesses, sub processes, a process starter or a process service, and multiple activities. See TIBCOActiveMatrix BusinessWorks Application Development for information about creating applications inTIBCO Business Studio.

The following diagram depicts the lifecycle of an application.

28

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 29: TIB BW Administration 6.1.0

Deployment occurs after an archive is uploaded to a domain and before an application is started. Anarchive is deployed to an AppSpace.

If an AppSpace spans multiple machines, the application is deployed onto each of the machines. If thereare multiple AppNodes attached to the AppSpace either on a single machine or across multiplemachines, the start command starts the application on each of the AppNodes. The runtime status ofthe application is reported for each AppNode and can be monitored using bwadmin.

When you deploy an application, you can choose to also start the application by giving the -as optionon the command line. By default, this option is off and the application must be started explicitly afterbeing deployed.

To configure an application, provide the desired profile that should contain the variable values for theapplication. This step is necessary if you want to run the application with different sets of variables anddeploy it with different argument values, for example, for a Windows machine or a Mac.

Preparing for Deployment

Preparation for deployment involves the following steps:

● Creating an Application● Creating Application with Multiple Profiles● Creating an ArchiveAfter creating the application, the profile, and the archive, you are ready to deploy the application intoan AppSpace. Deploying an application involves the following steps:

● Uploading an Archive● Deploying an Archive● Configuring an Application● Starting an Application

29

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 30: TIB BW Administration 6.1.0

Creating an ApplicationThis section shows how to create a simple TIBCO ActiveMatrix BusinessWorks project where youdesign and create an application.

After creating the project, you choose activities from the palettes to design and create an application.See TIBCO ActiveMatrix BusinessWorks Application Development for more information.

Procedure

1. Start TIBCO_HOME\studio\n.n\eclipse\TIBCOBusinessStudio.exe.

2. Launch the BusinessWorks Application Module wizard by selecting File > New > Project >BusinessWorks > BusinessWorks Application Module and click Next.

3. In the Project name field, provide a project name.Select the Use default location, Create empty process, and Create Application check boxes.

4. Click Finish.

Result

The new project is visible in the Project Explorer.

Creating an Application with Multiple ProfilesYou can define multiple profiles when creating an application in TIBCO Business Studio.

A profile is the configuration of the variables an application uses. When an application is deployed withdifferent variables, different profiles are available for each deployment. For example, you can create aWindows profile for an application that runs on a Windows machine and another for the sameapplication running on a UNIX machine.

Prerequisites

An application is created with profiles using TIBCO Business Studio. See the TIBCO ActiveMatrixBusinessWorks Application Development guide for details about creating applications. The followingdiagram shows an application with a profile for Windows and another for UNIX. Each profile has a setof properties and values defined. The values use the appropriate operating system syntax to point tothe files in the file system. The files are created and maintained outside of TIBCO Business Studio.

Procedure

1. Start TIBCO Business Studio and open an application.

30

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 31: TIB BW Administration 6.1.0

2. Expand the application and double-click the Properties directory under the Package Unit.This displays the Properties window in the Process Editor.

3. Click the New Profile button to add a new profile.

4. In the Create New Profile window, enter a new profile name. For example, enter WindowsProfileand click OK.The WindowsProfile is visible to the right of the [default] column in the Properties window.

5. Double-click the field under a profile that is opposite a property, and type the location of the filethat contains values defined for the property.

6. Save the project.

Creating an ArchiveYou can create an archive in TIBCO Business Studio by dragging and dropping the application projectfrom the Project Explorer to the File Explorer window. You create an archive after designing andtesting the application.

Procedure

1. In TIBCO Business Studio, go to File Explorer tab and click the Open Directory to Browse icon.

2. Select the directory where you want to store the archive and click OK.The new directory displays in the File Explorer window.

3. Drag an application from the Project Explorer to the directory in the File Explorer.The archive is written to the directory using the syntax <application>_<version>.ear where the<version> starts from 1.0.0 and increments as more generations occur.

Uploading an ArchiveUploading an archive copies the specified file to the TIBCO_HOME\bw\domains\<domain_name>\archives directory.

The following steps show how to upload an archive to the domain, MyDomain.

Prerequisites

You must have created:

● An application in TIBCO Business Studio● The archive in TIBCO Business Studio● The domain where the archive will be uploaded

Procedure

1. In the terminal, navigate to BW_HOME\bin and type bwadmin.

2. Upload the archive specifying the fully qualified location of the archive file. Note the use of forwardslashes "/" for the Windows path. This example uploads the BookStore sample that has been copiedto the c:/ear folder.bwadmin[admin]> upload -d MyDomain c:/ear/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear

31

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 32: TIB BW Administration 6.1.0

3. By default, the upload command copies the archive file to the domain. If you would like to create asubdirectory under the domain home to organize your files, use the -path option. For example, youcan organize all the finance applications in the bin directory under MyDomain as follows:bwadmin[admin]> upload -d MyDomain -path bin c:/ear/tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear

Deploying an ArchiveYou use the deploy command to assign an archive to an AppSpace.

You can deploy multiple archives to an AppSpace.

The earFileName is the relative location of the archive with respect to the TIBCO_HOME\bw\domains\<domain_name>\archives directory. For example, if MyDomain contains the AppSpace to deploy toand the archive file is located in the TIBCO_HOME\bw\domains\MyDomain\archives directory, do notspecify a qualifier for the archive file location.

Prerequisites

Before deploying an archive, you must:

● Create an application project in TIBCO Business Studio. See Creating an Application.● Create an archive for the application in TIBCO Business Studio. See Creating an Archive.● Upload the archive into the domain. See Uploading an Archive.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. To deploy an archive to MyAppSpace, run the following command:bwadmin[admin]> deploy -d MyDomain -a MyAppSpace tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear

Configuring an ApplicationYou can change an application's properties after it has been deployed by editing its profile files.

The profile for an application is located under the META-INF folder in the application's archive. Theprofile is the file with the extension .substvar.

When you apply the config command to an application, by default, the profile changes are applied toall application instances. If you want to apply a profile change to a specific application, use the config-appnode option to identify the specific AppNode.

Prerequisites

To configure, you must have:

● Uploaded an archived to a domain and deployed the application to an AppSpace, and● Created multiple profiles in the archive or have a separate profile for the application. For details on

how you can generate more than the default profile for an application, see Creating an Applicationwith Multiple Profiles.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

32

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 33: TIB BW Administration 6.1.0

2. If the archive contains the WindowsProfile.substvar file, use the following command:bwadmin[admin@MyDomain/MyAppSpace]> config -d MyDomain -a MyAppSpace -n MyAppNode -p WindowsProfile.substvar application tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear

If the archive does not contain the WindowsProfile.substvar file, use the following command:bwadmin[admin@MyDomain/MyAppSpace]> config -d MyDomain -a MyAppSpace -n MyAppNode -pf c:\temp\WindowsProfile.substvar application tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear

Exporting a Configuration

You can export a configuration for an AppSpace, AppNode or an application from an applicationarchive.

After you configure an application with a profile, it becomes part of the application archive. Anapplication's configuration can be exported to the file system so that it can be used to configure anotherapplication. An archive must be uploaded into a domain before it can be exported.

For example, the following steps export the configuration for the given application.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Go to the AppSpace where your application is deployed. For example, if your application isdeployed to MyDomain/MyAppSpace, type:bwadmin[admin]> cd MyDomain/MyAppSpace

3. In the AppSpace directory, run the export command:bwadmin[admin@MyDomain/MyAppSpace]> export application tibco.bw.sample.binding.rest.BookStore.application 1.0

Result

An application config (a .substvar file) as well as AppNode config (a .config file) can be exported.

● An application profile is exported to BW_HOME\bin using the format: application name_profilename.substvar.

● An AppNode config file is exported to BW_HOME\bin using the format:domain_name_appspace_name_appnode_name_config.ini.

Starting an ApplicationTo start an application after deployment, run the start command from the bwadmin utility.

When you deploy an archive, the default is to start the application on each AppNode defined in theAppSpace. However, you can deploy an archive file with the -startondeploy property set to falseand then use the start command after configuring an application or to start the application on a specificAppNode.

Prerequisites

● You have deployed the archive into an AppSpace● The AppSpace has been started.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

33

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 34: TIB BW Administration 6.1.0

2. Execute the start command for the application. For example:bwadmin[admin]> start -d MyDomain -a MyAppSpace -n MyAppNode application tibco.bw.sample.binding.rest.BookStore.application 1.0

Verifying Deployed ApplicationsYou can verify the an application using the bwadmin show command.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. After navigating to your AppNode, run the show command:bwadmin[admin@MyDomain/MyAppSpace/MyAppNode]> show applications

Domain: MyDomainName Version AppSpace Profile Runtime StatusConfig Status Detailstibco.bw.sample.binding.rest.BookStore.application 1.0 MyAppSpace null RunningInSync

Listed all Applications in 0 seconds

Stopping an ApplicationYou can stop an application running on a specified AppNode by using the stop command.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. To stop an application:bwadmin[admin]> stop -d MyDomain -a MyAppSpace application tibco.bw.sample.binding.rest.BookStore.application 1.0

Undeploying an ApplicationUndeploying an application or a library removes the deployed application or library from theAppSpace.

Prerequisites

You have deployed an application or a library to an AppSpace.

Procedure

1. In a terminal, navigate to BW_HOME\bin and type bwadmin.

2. Run the following command:bwadmin[admin]>undeploy -d MyDomain -a MyAppSpace application tibco.bw.sample.binding.rest.BookStore.application 1.0

34

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 35: TIB BW Administration 6.1.0

Using bwdesign UtilityThe bwdesign utility provides a command line interface for creating, validating, importing or exportingresources stored in a workspace.

The following commands are available.DESCRIPTION system:create

Create resource(s) in the workspace

SYNTAX system:create [options] [outputfolder]

ARGUMENTS outputfolder The destination folder to contain the created resource that will exist in the workspace.

OPTIONS application [name] [modules] Create an application project with the given name, including the given module(s) --help Display this help message.

DESCRIPTION system:validate

Validate BW modules from a workspace

SYNTAX system:validate [options] [modules]

ARGUMENTS modules The name of the module(s) to validate, separated by commas, e.g. module[,module]*. Defaults to all modules in the workspace.

OPTIONS -d <Directory path>,--directory <Directory path> Path of the directory to store validation result. -h,--help Display help for this command.

DESCRIPTION system:import

Import flat or zip projects into current workspace.

SYNTAX system:import [options] files

ARGUMENTS files The names of the folders which contain the target flat projects to import. All the flat projects found in the specified folders will be imported. The folders are separated by commas. By default, zip files will be ignored. If the items to import are zip archives, use -z, -zip, -fz, -fzip options.

OPTIONS -z, -zip The specified items to import are zip archives specified by the arguments. Multiple zip files are separated by commas. -fz, -fzip The specified items to import are zip archives located in the folders specified by the arguments. All the zip projects in these folders will be imported, while flat projects will be ignored. Multiple folders are separated by commas.

35

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 36: TIB BW Administration 6.1.0

OUTPUT file status status Result of the import, either "imported", "ignored", or "failed {message}" file Name of the project

DESCRIPTION system:export

Generate BW artifacts into a folder from the projects in the workspace. The artifacts can be zip files or ear files.

SYNTAX system:export [options] [projects] [outputfolder]

ARGUMENTS projects The name of the project(s) to export, separated by commas, e.g. project[,project]*., Must specify at least one project. BW Applications can be exported as EAR files. outputfolder The destination folder to contain the exported module(s). Defaults to local folder.

OPTIONS -e, -ear Export the application as a deployable ear file (default). -z, -zip Export the model as a zip file. Cannot be used with -ear option. -pf, -profile name Export the named profile of the given module. NOTE: not yet implemented. -name [name] Use the supplied name for the exported module force Export the BW Application as an EAR file even though there are validation errors. By default, erroneous applications can be generated as ear files. --help Display this help message.

Procedure

● In a terminal, navigate toBW_HOME\bin and type bwdesign.

36

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 37: TIB BW Administration 6.1.0

Integrating ActiveMatrix BusinessWorks with TIBCOEnterprise Administrator

The TIBCO® Enterprise Administrator server is an application administration UI that supports multipleTIBCO products. It allows you to create, view, and monitor ActiveMatrix BusinessWorks runtimeentities.

The TIBCO Enterprise Administrator server is built on a shared services model that provides commonadministrative access with reusable shared administrative services. The server communicates with itsproducts through agents. Each product registers its own agent with the server or an administrator candevelop self described agents using the REST based protocol the server provides. The agent processesmessages between the on boarding product and the server. The server provides a common login page,landing page, configuration screens, agent registration screens, users, groups and permissions andpervasive UI elements like bread crumbs.

See the TIBCO Enterprise Administrator User's Guide for an introduction to TIBCO EnterpriseAdministrator server concepts, architecture, agent management, and components. The guide alsoexplains how to start and manage the server and use the TEA shell utility. The guide is available from https://docs.tibco.com/products/tibco-enterprise-administrator

The bwagent interacts with the TIBCO Enterprise Administrator server through a TEA agent. After youhave registered the TEA agent, you can open the web UI and start creating runtime entities. For a walk-through of the steps to start working with ActiveMatrix BusinessWorks the TIBCO EnterpriseAdministrator web UI, see Running Applications in Enterprise Mode Using the Web UI.

TIBCO Enterprise Administrator allows you to perform almost all bwadmin administrative tasks usingthe user interface. For more information, see the TIBCO Enterprise Administrator User's Guide.

TEA Shell

The TIBCO Enterprise Administrator server comes with the command line utility called TEA shell. It isa remote shell based on the SSH protocol that provides the command line interface for the full range ofTEA operations for ActiveMatrix BusinessWorks applications. The scripting language is similar to thatof bash from Unix.

The TEA shell has the following key features:

● Piping of commands● Completion of commands● Help on commands

When you are in the TEA shell, the shell will display the banner similar to the figure below:

37

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 38: TIB BW Administration 6.1.0

When you are in the shell, press the Tab key for a list of available commands. Commands are alignedwith bwadmin commands. See bwadmin Commands for information.

Registering a bwagent with TIBCO Enterprise AdministratorA bwagent TEA agent must be registered with the TIBCO Enterprise Administrator server before it isavailable in the TIBCO Enterprise Administrator web UI.

Procedure

1. Start the TIBCO Enterprise Administrator server.

2. Start bwadmin. In a terminal, navigate to BW_HOME\bin and type bwadmin.

3. Change the mode to enterprise:bwadmin[admin]> mode enterpriseAdmin mode set to enterprise

4. Start bwagent. In a terminal, navigate to BW_HOME\bin and type bwagent startagent.A message similar to TIBCO-BW-AGENT-300002: BusinessWorks Agent started successfullyappears in the terminal.

5. Stop and restart bwadmin. In the bwadmin terminal, type Ctrl-D to exit bwadmin. Restart bytyping bwadmin in the same terminal.

6. Register the bwagent TEA agent with the TIBCO Enterprise Administrator server. Provide the URLto the TEA server. Only one TEA agent can be registered at a time.bwadmin[admin]> registerteaagent http://localhost:8777/tea/

Result

Verify that the bwagent was successfully registered by logging in to the TIBCO EnterpriseAdministrator server and clicking the Agents icon. If the server was installed on your local machine,type the following in a web browser. You need to provide your credentials to log in. The default username is admin and default password is admin.http://localhost:8777/tea

Click the Agents icon and the registered bwagent TEA agent should appear.

Autoregistering a bwagent with TIBCO Enterprise Administrator serverA bwagent can be part of an agent network, which allows commands to be distributed to multiplebwagents simultaneously.

For an agent network to be managed from a TIBCO Enterprise Administrator server, one bwagent inthe agent network must be registered with the server. If the registered bwagent terminates, theconnection between the server and the agent network is automatically recovered. Another bwagent inthe agent network will auto-register with the server.

The following diagram shows an agent network with three members. Commands sent using webbrowser are sent to the registered bwagent via the TIBCO Enterprise Administrator server. Theregistered bwagent forwards the commands to each bwagent in the agent network. The bwadmin

38

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 39: TIB BW Administration 6.1.0

utility can also send commands to any bwagent in the agent network. For example, commands sent viabwadmin in machine 3 will be sent to all other bwagents in the agent network.

Commands for Disabling and Enabling Auto Registration

The bwadmin disableautoregistration and enableautoregistration commands togglemechanism used to auto register a bwagent. The commands can be run against any bwagent in anagent network and act on all bwagents in the agent network. If you disable auto registration for anagent network, the members of the network will be unable to communicate with the TIBCO EnterpriseAdministrator server. You will have to manually register a bwagent in the agent network for it tocommunicate with the server.

39

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 40: TIB BW Administration 6.1.0

Monitoring using TIBCO Hawk

ActiveMatrix BusinessWorks provides the TIBCO Hawk MicroAgent that allows you to do someadministrative functions on applications and processes.

This section describes the methods available.

Enabling TIBCO Hawk MicroAgentBefore using TIBCO Hawk with ActiveMatrix BusinessWorks, you must enable the TIBCO HawkMicroAgent.

Prerequisites

To use TIBCO Hawk MicroAgent features, install TIBCO Rendezvous and set the RV_HOMEenvironment variable on the machine where the AppNode is running. For information on setting thevariable, see the Post Installation Tasks topic in the Installation Guide.

To enable the MicroAgent, uncomment the bw.hawk.hma.transport property in the AppNode'sconfiguration file. Follow the instructions below.

Procedure

1. Stop the AppNode.

2. Copy the existing AppNode config.ini file (located in the root of the AppNode) to a temporarylocation.

3. Uncomment the bw.hawk.hma.transport and make sure the value is set to: tibrv

4. Save the file.

5. Use the config admin command to push the configuration to the AppNode: bwadmin[admin]>config –d myDomain -a MyAppSpace –n myAppNode –cf <temporaryLocation>/config.ini

6. Restart the AppNode.

TIBCO Hawk MicroAgent MethodsThe TIBCO MicroAgent Hawk methods available to monitor ActiveMatrix BusinessWorks applicationsare listed below.

DisableProcessStatsCollectionDisables statistics collection for the process(es) in a given application.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

ApplicationVersion

Version of the application. Yes

Process Name Name of the process. If not configured, the instrumentationwill be disabled for all processes in the application.

No

Output: None

40

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 41: TIB BW Administration 6.1.0

EnableProcessStatsCollectionEnables statistics collection for the process(es) in a given application.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

Application Version Version of the application. Yes

Process Name Name of the process. If not configured, theinstrumentation will be enabled for all processes in theapplication.

No

Output: None

GetActivitiesStatsRetrieves statistics about the activities of processes that have been executed for a given applicationsince the instrumentation was enabled.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

Application Version Version of the application. Yes

Process Name Name of the process. If not configured, the statisticsfor all activities in all processes in the applicationwill be retrieved.

No

Output: The following table describes the output of this method.

Item Description

ProcessDefName Name of the process definition.

Name Name of the activity.

ExecutionCount Number of times the activity has been executed.

ElapsedTime Total clock time (in milliseconds) used by all executions of thisactivity. This includes waiting time for Sleep, Call Process, and WaitFor... activities.

ExecutionTime Total clock time (in milliseconds) used by all executions of thisactivity. This does not include waiting time for Sleep, Call Process,and Wait For... activities.

41

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 42: TIB BW Administration 6.1.0

Item Description

ErrorCount Total number of executions of the activity that have returned anerror.

LastReturnCode Status code returned by most recent execution of this activity. Thiscan be either OK, DEAD, or ERROR.

MinElapsedTime Elapsed clock time (in milliseconds) of the activity execution thathas completed in the shortest amount of elapsed time.

MaxElapsedTime Elapsed clock time (in milliseconds) of the activity execution thathas completed in the longest amount of elapsed time.

MinExecutionTime Execution time (in milliseconds) of the activity execution that hascompleted in the shortest amount of execution time.

MaxExecutionTime Execution time (in milliseconds) of the activity execution that hascompleted in the longest amount of execution time.

MostRecentElapsedTime Elapsed clock time (in milliseconds) of the most recently completedactivity execution.

MostRecentExecutionTime Execution time (in milliseconds) of the most recently completedactivity execution.

ExecutionCountSinceReset Number of activity executions that have completed since the lastreset of the statistics.

GetProcessInstanceCountReturns the total number of running process instances for an application.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

Application Version Version of the application. If not configured, all versionsof the application will be considered.

No

Process Name Name of the process. If not configured, the processinstances of all running processes in the application willbe returned

No

Output: The following table describes the output of this method.

Argument Name Description

TotalRunningProcesses Total number of currently executing process instances.

42

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 43: TIB BW Administration 6.1.0

GetProcessInstanceInfoReturns details about the running process instances for an application.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

Application Version Version of the application. If not configured, all versionsof the application will be considered.

No

Process ID Process Instance ID. If configured, the details about thematching process instance will be returned. If notconfigured, the details about all active process instancesin a given application will be returned.

No

Process Name Name of the process. If configured, the details about allprocess instances for a given process will be returned. Ifnot configured, the details about process instances of allrunning processes in a given application will bereturned.

No

Output: The following table describes the output of this method.

Item Description

ID ID for the process instance.

Name Name of the process definition used by the process instance.

TrackingId Tracking ID for the process instance.

Status Status of the process.

StartTime Time when the process instance started.

Duration Elapsed clock time (in milliseconds) since the process instance started.

MainProcessName Name of the main process definition.

GetProcessStatsRetrieves statistics about the processes that have been executed for a given application since theinstrumentation was enabled.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

43

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 44: TIB BW Administration 6.1.0

Argument Name Description Required?

Application Version Version of the application. Yes

Process Name Name of the process. If not configured, the statisticsfor all processes in the application will be retrieved.

No

Output: The following table describes the output of this method.

Item Description

Name Name of the process definition.

Starter Name of the process starter for the process.

Created Number of process instances created for this process definition.

Suspended Number of times process instances have been suspended.

Completed Number of process instances that have been successfullycompleted.

TotalExecution Total execution time (in milliseconds) for all successfullycompleted process instances.

AverageExecution Average execution time (in milliseconds) for all successfullycompleted process instances.

AverageElapsed Average elapsed clock time (in milliseconds) for all successfullycompleted process instances.

MinElapsed Elapsed clock time (in milliseconds) of the process instance thathas completed in the shortest amount of elapsed time.

MaxElapsed Elapsed clock time (in milliseconds) of the process instance thathas completed in the longest amount of elapsed time.

MinExecution Execution time (in milliseconds) of the process instance that hascompleted in the shortest amount of execution time.

MaxExecution Execution time (in milliseconds) of the process instance that hascompleted in the longest amount of execution time.

MostRecentExecutionTime Execution time (in milliseconds) of the most recently completedprocess instance.

MostRecentElapsedTime Elapsed clock time (in milliseconds) of the most recentlycompleted process instance.

CountSinceReset Number of process instances that have completed since the lastreset of the statistics.

44

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 45: TIB BW Administration 6.1.0

ListApplicationsReturns list of applications deployed on the AppNode.

Method arguments: None

Output: The following table describes the output of this method.

Item Description

Name Name of the application.

Version Version of the application.

Application Module Name and version of application module included in the application.

Shared Module Name and version of shared module(s) included in the application.

State State of the application.

ListProcessEnabledForStatsLists all processes currently enabled for statistics collections on the AppNode.

Method Arguments: None

Output: The following table describes the output of this method.

Argument Name Description

Application Name Name of the application.

Application Version Version of the application.

Process Name Name of the process. The value [*] indicates that instrumentation isenabled for all processes in the application.

ResetActivityStatsResets the minimum, maximum, and average time statistics gathered for each activity in the process.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

Application Version Version of the application. Yes

Process Name Name of the process. If not configured, the statisticswill be reset for all activities for all processes in theapplication.

No

Output: None

45

TIBCO ActiveMatrix BusinessWorks™ Administration

Page 46: TIB BW Administration 6.1.0

ResetProcessStatsResets the minimum, maximum, and average time statistics gathered for the process.

Method arguments: The following table describes the inputs to this method.

Argument Name Description Required?

Application Name Name of the application. Yes

Application Version Version of the application. Yes

Process Name Name of the process. If not configured, the statisticswill be reset for all processes in the application.

No

Output: None

46

TIBCO ActiveMatrix BusinessWorks™ Administration