Вы находитесь на странице: 1из 46

TIBCO ActiveMatrix BusinessWorks

Administration
Software Release 6.1.0
May 2014
Two-Second Advantage

Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH
EMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY
(OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE
EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY
OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND
CONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED
SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE
CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD
OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE)
OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER
LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE LICENSE FILE(S) OF THE
SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND
YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE
BOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws
and treaties. No part of this document may be reproduced in any form without the written
authorization of TIBCO Software Inc.
TIBCO, 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 TIBCO
Software Inc. in the United States and/or other countries.
Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform Enterprise
Edition (J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle Corporation in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of their
respective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT
ALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED
AT THE SAME TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWARE
VERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL
ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE
CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO
SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S)
AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR
INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE,
INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright

2001-2014 TIBCO Software Inc. ALL RIGHTS RESERVED.


TIBCO Software Inc. Confidential Information
2
TIBCO ActiveMatrix BusinessWorks

Administration
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
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
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 TIBCO
Documentation 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 TIBCO
Documentation 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 as
follows:

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 can
request one.
How to Join TIBCOmmunity
TIBCOmmunity is an online destination for TIBCO customers, partners, and resident experts. It is a
place to share and access the collective experience of the TIBCO community. TIBCOmmunity offers
forums, blogs, and access to a variety of resources. To register, go to:
http://www.tibcommunity.com
5
TIBCO ActiveMatrix BusinessWorks

Administration
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 your
runtime environment as needed. The runtime also provides an option to execute the engine so that the
risk 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 Business
Studio.

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

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

AppNode is a runtime entity that hosts ActiveMatrix BusinessWorks applications. AppNodes are
contained in an AppSpace.

bwagent is a daemon that runs on every ActiveMatrix BusinessWorks installation. When multiple
installations across machines are configured as a network, the bwagents interact with each other
using 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 and
Machine B. Domain N1 is on Machine A. Domain M1 contains two AppSpaces; one of the AppSpaces
S2 spans both the machines. The bwagent on Machine A is configured to interact with the bwagent on
Machine B through the datastore.
6
TIBCO ActiveMatrix BusinessWorks

Administration
The bwagent on Machine A is registered with the TIBCO Enterprise Administrator (TEA) server. If the
registered bwagent becomes unavailable, the connection between the TIBCO Enterprise Administrator
server and the agent network is automatically recovered. The bwagent on Machine B will autoregister
with 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 action
performed on the runtime entities results in an update to the file system. When the runtime entities
span machines, the bwagent synchronizes the data from the datastore with the local file system. At any
given point in time, the data in the file system is the source of truth. This ensures that in case of a failure
in 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
Getting Started
Run and manage the applications you create in TIBCO Business Studio

using the TIBCO ActiveMatrix


BusinessWorks

administrator command line console, bwadmin.


The bwagent is a daemon that runs on every ActiveMatrix BusinessWorks installation. The bwadmin
console and the bwagent are included with the ActiveMatrix BusinessWorks installation in the bin
folder. See ActiveMatrix BusinessWorks Administration and Agent for more details.
Important: BW_HOME points to TIBCO_HOME\bw\n.n
Execution Modes
The execution mode is set using the bwadmin command line console or in the bwagent's configuration
file.
When ActiveMatrix BusinessWorks is installed, the default mode of the bwagent is set to local.
Local mode
In local mode the bwadmin utility modifies the local file system directly instead of delegating the
work to a bwagent. Local mode does not provide data storage and runtime entities are created in the
file system. This mode is useful for developers during development and testing cycles. See Running
Applications in Local Mode.
Enterprise mode
Configure enterprise mode to start the bwagent. Then, use the bwadmin console to execute
commands, 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 Mode
Using the Command Line.
Running Applications in Local Mode
Local 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 MyDomain
Domains in the enterprise:
MyDomain
5. Change directory to the domain:
bwadmin[admin]> cd MyDomain
bwadmin[admin@MyDomain]>
8
TIBCO ActiveMatrix BusinessWorks

Administration
6. Create an AppSpace, show it, and change directory to the AppSpace. See Creating an AppSpace for
more information.
Note that the status of a newly created AppSpace is Degraded. This will change once AppNodes are
added to the AppSpace to satisfy the minimum number of AppNodes. The default is 1. The number
of AppNodes can be set when you create the AppSpace using the -minNodes option.
bwadmin[admin@MyDomain]> create appspace MyAppSpace
TIBCO-BW-ADMIN-CLI-300200: AppSpace [MyAppSpace] in Domain [MyDomain] created.
bwadmin[admin@MyDomain]> show appspace MyAppSpace
Domain: MyDomain
Name MinNodes Status Nodes Applications Libraries
MyAppSpace 1 Degraded 0 0 0
Listed all AppSpaces in 0 seconds
bwadmin[admin@MyDomain]> cd MyAppSpace
bwadmin[admin@MyDomain/MyAppSpace]>
7. Create an AppNode and show it. When you create an AppNode, you need to specify the HTTP
management 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 the
port you specify is already in use, you will see an error and the AppNode cannot be created. You
can get a list of defined AppNodes for a given domain, including port numbers, using the show
command: show -d <DomainName> appnodes
When you create the AppNode, you can optionally specify a port for the OSGi console so
that you can monitor the AppNode. (You should only enable this port for troubleshooting
purposes.) 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 that
the AppSpace status has changed from Degraded to Stopped.
bwadmin[admin@MyDomain/MyAppSpace]> create -httpPort 8060 appnode MyAppNode
TIBCO-BW-ADMIN-CLI-300300: AppNode [MyAppNode] in AppSpace [MyAppSpace], Domain
[MyDomain] created.
bwadmin[admin@MyDomain/MyAppSpace]> show appnode MyAppNode
Name Status AppSpace MgmtPort Agent ConfigState Up Time
MyAppNode Stopped MyAppSpace 8060 localhost InSync 0d 00:00:00
Listed 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:\ear
directory. 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.ear
TIBCO-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 archives
Name
tibco.bw.sample.binding.rest.BookStore.application_1.0.0.ear
Path 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 MyAppSpace
TIBCO-BW-ADMIN-CLI-300203: AppSpace [MyAppSpace| in Domain [MyDomain] started.
9
TIBCO ActiveMatrix BusinessWorks

Administration
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.ear
TIBCO-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 application
Domain: MyDomain
Name
tibco.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 the
application version number. In this case, the version is 1.0. (Before you stop the application, you can
use 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.0
TIBCO-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.0
TIBCO-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 the
application. 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 Line
In enterprise mode, bwagents can communicate across machines and can be configured to form a
bwagent 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 orient
you 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 Machine2
in 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
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 the
network. 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: bwmetaspace
This 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-0
BW Agent name Machine1
BW Agent stores data locally
Initializing datastore using
TIBCO ActiveSpaces (Java). Enterprise Edition. Version 2.1.2.124
.............. Initialization of datastore complete
BW Agents in the group that store data:
Name Machine1, Host 10.98.201.5
TIBCO-BW-AGENT-300002: BusinessWorks Agent started successfully.
11
TIBCO ActiveMatrix BusinessWorks

Administration
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-09
BW Agent name Machine2
BW Agent stores data locally
unable 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 complete
BW Agents in the group that store data:
Name Machine2, Host 10.98.201.96
Name Machine1, Host 10.98.201.5
There 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 bwagent
finds networked bwagents, the machine names and IP addresses are listed. The bwagent also
reports warnings about other property settings in the bwagent.ini file that should be adjusted
to 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 bwagent
in the command line:
bwadmin[admin]> create -agent Machine2 domain DomainMachine2
Connecting to the BW Agent using
TIBCO ActiveSpaces (Java). Enterprise Edition. Version 2.1.2.124
Connected to BW Agent
TIBCO-BW-ADMIN-CLI-300100: Domain [DomainMachine2] created.
7. On Machine1, use the show domains command to show the domain.
bwadmin[admin]> show domains
Domains in the enterprise:
DomainMachine2
12
TIBCO ActiveMatrix BusinessWorks

Administration
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
AppSpaceMachine2
TIBCO-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 managed
using 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 2
AppNodes for the AppSpace. Specify the bwagent for the AppNodes.
bwadmin[admin@DomainMachine2]> cd AppSpaceMachine2
bwadmin[admin@DomainMachine2/AppSpaceMachine2]
bwadmin[admin@DomainMachine2/AppSpaceMachine2]> create -agent Machine2 -httpPo
rt 8070 appnode AppNodeMachine2A
TIBCO-BW-ADMIN-CLI-300300: AppNode [AppNodeMachine2A] in AppSpace [AppSpaceMachin
e2], Domain [DomainMachine2] created.
bwadmin[admin@DomainMachine2/AppSpaceMachine2]> create -agent Machine2 -httpPo
rt 8071 appnode AppNodeMachine2B
TIBCO-BW-ADMIN-CLI-300300: AppNode [AppNodeMachine2B] in AppSpace [AppSpaceMachin
e2], 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 to
AppSpaceMachine2.
bwadmin[admin@DomainMachine2/AppSpaceMachine2]> upload c:/ear/tibco.bw.sample.bi
nding.rest.BookStore.application_1.0.0.ear
TIBCO-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 the
AppNodes 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 appnodes
Name Status AppSpace
MgmtPort Agent ConfigState Up Time
AppNodeMachine2B Running AppSpaceMachine2
8071 Machine2 InSync 0d 00:09:42
AppNodeMachine2A Running AppSpaceMachine2
8070 Machine2 InSync 0d 00:09:42
Listed all AppNodes in 0 seconds
13
TIBCO ActiveMatrix BusinessWorks

Administration
13. Use the bwadmin console on Machine1 to stop the AppSpace on Machine2. This will stop the
AppNodes 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 be
read 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 Doma
inMachine2
TIBCO-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 not
complimentary. The backup command exports the current state of the environment to a
command file. The restore command restores the file system of a bwagent to the state of
the persistent datastore.
Result
You set up a network with two bwagents on two machines. You used the bwadmin console on one
machine to create runtime entities on the other machine. You uploaded an archive to the domain and
started the AppSpace. You also backed up the environment.
You can continue experimenting by adding additional machines to the network, adding more runtime
entities, 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 machine
with the following command: delete -force domain DomainMachine2
To exit the bwadmin console, type exit in the bwadmin terminal. To exit the bwagent, type ^C (this
may take a few seconds). At the command line, type bwagent stop to completely stop the agent.
Running Applications in Enterprise Mode using the Web UI
You can use the TIBCO

Enterprise Administrator (TEA) server web UI to create, view, and monitor


ActiveMatrix BusinessWorks runtime entities.
A bwagent contains an implementation of a TEA agent that allows the bwagent to be accessed from the
TIBCO Enterprise Administrator server web UI or command shell. Only one TEA agent can be
registered 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 or
bwagent 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
2. Set the mode to enterprise:
bwadmin[admin]> mode enterprise
Admin 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 the
TEA server. This allows the bwagent to be available in the TIBCO Enterprise Administrator server
web UI. The URL to the TIBCO Enterprise Administrator server is required for the registration. (The
URL 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 Agent
TIBCO-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 the
user name and password.
BusinessWorks is displayed in the Products list.
15
TIBCO ActiveMatrix BusinessWorks

Administration
6. Click the BusinessWorks icon to go to your ActiveMatrix BusinessWorks integration with TIBCO
Enterprise 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 the
following 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 the
AppSpace status is set to Degraded. This will change to Stopped when you add an AppNode to the
AppSpace. The AppSpaces page will look similar to this:
16
TIBCO ActiveMatrix BusinessWorks

Administration
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 the
AppNode 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 Running
to indicate that both the AppNode and AppSpace are running.
17
TIBCO ActiveMatrix BusinessWorks

Administration
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 integrated
with TIBCO Enterprise Administrator to create a domain, AppSpace, and AppNode; start the
18
TIBCO ActiveMatrix BusinessWorks

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

Administration
ActiveMatrix BusinessWorks Administrator and Agent
The ActiveMatrix BusinessWorks Administrator and ActiveMatrix BusinessWorks Agent are used to
manage domains, AppSpaces, AppNodes, archives, and applications.
For more information, see bwadmin and bwagent.
bwadmin
bwadmin is the utility used to create ActiveMatrix BusinessWorks runtime entities. It provides a
command line interface that can be used in local mode or enterprise mode to create and manage
domains, AppSpaces, AppNodes, archives, and applications. Collectively, the entities provide the
logical 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 of
commands in a sequence. A set of commands can also be stored with all the necessary inputs in a file
and then executed in batch mode from bwadmin. In enterprise mode, remote command invocations to
bwagents running on remote machines are supported.
The cd command also sets the context for some commands. For example, setting the domain context
allows 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>
bwagent
A 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 file
system.
There is one bwagent for each ActiveMatrix BusinessWorks installation. The bwagent enables
communication between agents located on different machines. When multiple bwagents are configured
to 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 failed
system can be restored after a restart. The bwagent restores the system by synchronizing data from the
datastore with the local file system.
There are multiple ways to access the bwagent: the bwadmin command line utility, the TIBCO
Enterprise Administrator UI, or the REST API.
20
TIBCO ActiveMatrix BusinessWorks

Administration
Creating an Agent Network
This 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 same
setting for this property.

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

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. In
the bwagent terminal, restart by typing bwagent.
Result
Use the show agents command to show all discovered bwagents. Agents in a network can be managed
by any other bwagent.
21
TIBCO ActiveMatrix BusinessWorks

Administration
Administration Tasks and Reference
Managing Domains
A domain is a collection of users, machines, and applications. A domain provides an administrative
boundary for an integration project. Each domain may share machines with other domains, but do not
communicate with other domains. A domain includes servers that may or may not be distributed over
different machines and operating systems. Applications running in a domain are isolated from the
applications running in other domains.
Creating a Domain
A 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 Domain
When 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 inside
the 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 domain
that 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 more
AppSpaces
bwadmin[admin]> delete -force domain
MyDomain
Managing AppSpaces
An application is deployed to a single AppSpace.
An AppSpace is a virtual pool of AppNodes where an application is deployed. When an application is
deployed, the AppSpace starts the application on each of its AppNodes. More AppNodes can be added
dynamically to the AppSpace to manage the load-balancing and fault-tolerance needs for an
application.
22
TIBCO ActiveMatrix BusinessWorks

Administration
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 the
AppSpace are started and share the load for the application. If scalability is turned off for a deployed
application, the application executes on just one AppNode.
Creating an AppSpace
An 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 the
following 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 where
the 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 AppSpace
To 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 the
domain.
If an AppSpace does not contain any AppNodes, it will not be able to start completely. The AppSpace
status 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 States
An 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 occur
when:

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
Runtime State
Operations
Allowed in This
State 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 fall
below the minimum specified threshold.
The state also occurs when the AppSpace is not running.
Stopping an AppSpace
When 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 the
domain.
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 AppSpace
An 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 the
following 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 delete
command with the -force option.
bwadmin[admin@MyDomain> delete -force appspace MyAppSpace
The command line option -force on AppSpace [MyAppSpace] would stop and delete
all the AppNodes in the AppSpace
and delete the AppSpace from all the remote agents.
TIBCO-BW-ADMIN-CLI-300206: AppSpace [MyAppSpace] in Domain [MyDomain] deleted.
24
TIBCO ActiveMatrix BusinessWorks

Administration
Managing AppNodes
An 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 AppNode
An 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 your
applications run. In a production environment, you'll need multiple AppNodes defined to handle load
balancing and scalability.
When creating an AppNode that is on a remote machine, you must specify the name of the bwagent
running on the remote machine.
When you create an AppNode, do not specify the OSGi port. Only open this port for debugging when
you are ready to enable the OSGi console on an AppNode. For details, see Enabling the OSGi Console
for 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 agents
command 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 the
httpPort option is required. If the port you specify is already in use, you will see an error and the
AppNode cannot be created. You can get a list of defined AppNodes for a given domain, including
port numbers, using the show command: show -d <DomainName> appnodes
The following command creates a domain, an Appspace in the domain, and an Appnode in the
AppSpace. 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 MyAppNodeOnMac
TIBCO-BW-ADMIN-CLI-300300: AppNode [MyAppNodeOnMac] in AppSpace [MyAppSpace],
Domain [MyDomain] created successfully.
Starting an AppNode
You 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
2. Run the following command to start an AppNode:
bwadmin[admin]> start -d MyDomain -a MyAppSpace appnode MyAppNodeOnMac
Viewing AppNode States
This 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 deployment
features, configurations, or both.
Runtime State
An AppNode's Runtime state relies on the timestamp of the hosting machine and on the timestamp of
the machine hosting the bwagent. The machines must be within 20 seconds difference for the status of
the AppNode to be reported correctly. This state can have the following values.
Runtime State
Operations Allowed
When in This State Description
Running Stop Reported only by the AppNode. The AppNode has
successfully initialized all the product bundles and
reached the target start level.
Stopped Start, Delete The AppNode is not running. This is determined only
by the bwagent.
Impaired Stop The AppNode is in an impaired state after it has
encountered an error during the startup in one of the
product bundles.
This may impact the functionality of the AppNode.
Unreachable <none> The AppNode is unreachable when a remote bwagent
and the remote machine is down, or a network failure
occurs resulting in network partitioning. This state is
determined only by the bwagent.
Start Failed Start, Delete This is determined by the bwagent when it is making
an attempt to start the AppNode process when the
AppNode does not start.
26
TIBCO ActiveMatrix BusinessWorks

Administration
Runtime State
Operations Allowed
When in This State Description
Starting Stop This is a transitional state reported by the AppNode
when the Web API layer has been initialized, but the
Web API is still accessible and can report the state.
This happens when a bundle blocks the shutdown
thread.
Stopping an AppNode
When 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 AppNode
The enableconsole command dynamically enables the OSGi console on the given port for a running
AppNode. Advanced users can telnet to the port and execute native OSGi commands to get
information about an AppNode's status. This is useful when collecting diagnostic data remotely. By
default, 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 enableconsole
command 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
Result
Use the telnet command to access the OSGi console where you can run commands to get information
about running AppNodes and applications.
telnet ASMITH-W520 1113
admin@MyAppNode> help
bw:dsr
bw:laes
bw:lais
bw:lapi
bw:lapic
bw:las
bw:lat
bw:le
bw:lec
bw:lendpoints
bw:les
bw:lfpic
bw:lpes
bw:lpis
bw:lr
bw:lrhandlers
bw:lrproxies
bw:lsel
bw:ltpic
bw:startaesc
bw:startpesc
bw:startpisc
bw:stopaesc
bw:stoppesc
bw:stoppisc
bwadmin:install
bwadmin:restart
bwadmin:shutdown
bwadmin:uninstall
bwadmin:version
Some of the statistics retrieval commands such as laes, lpes, lpis, and lais require statistics
activation commands (startaesc, startpesc, startpisc) to be executed first.
You can use the disconnect command to gracefully quite the telnet session, but leave the OSGi port
open for reentry. Use the telnet stop command to close the connection after the debugging session is
complete.
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 the
tools button on the AppNodes page.
Managing an Application
An application is an instance of a deployed archive. It has an independent lifecycle with regard to an
AppSpace or AppNode. After completing the design process in TIBCO Business Studio, you can deploy
the application.
An application provides the business logic to perform one or more related tasks and contains an
application module that was defined in TIBCO Business Studio. The module itself can include
processes, sub processes, a process starter or a process service, and multiple activities. See TIBCO
ActiveMatrix BusinessWorks Application Development for information about creating applications in
TIBCO Business Studio.
The following diagram depicts the lifecycle of an application.

28
TIBCO ActiveMatrix BusinessWorks

Administration

Deployment occurs after an archive is uploaded to a domain and before an application is started. An
archive is deployed to an AppSpace.
If an AppSpace spans multiple machines, the application is deployed onto each of the machines. If there
are multiple AppNodes attached to the AppSpace either on a single machine or across multiple
machines, the start command starts the application on each of the AppNodes. The runtime status of
the 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 option
on the command line. By default, this option is off and the application must be started explicitly after
being deployed.
To configure an application, provide the desired profile that should contain the variable values for the
application. This step is necessary if you want to run the application with different sets of variables and
deploy 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 Archive
After creating the application, the profile, and the archive, you are ready to deploy the application into
an 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
Creating an Application
This section shows how to create a simple TIBCO ActiveMatrix BusinessWorks project where you
design 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 Profiles
You 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 with
different variables, different profiles are available for each deployment. For example, you can create a
Windows profile for an application that runs on a Windows machine and another for the same
application running on a UNIX machine.
Prerequisites
An application is created with profiles using TIBCO Business Studio. See the TIBCO ActiveMatrix
BusinessWorks Application Development guide for details about creating applications. The following
diagram shows an application with a profile for Windows and another for UNIX. Each profile has a set
of properties and values defined. The values use the appropriate operating system syntax to point to
the 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
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 WindowsProfile
and 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 file
that contains values defined for the property.
6. Save the project.
Creating an Archive
You can create an archive in TIBCO Business Studio by dragging and dropping the application project
from the Project Explorer to the File Explorer window. You create an archive after designing and
testing 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 Archive
Uploading 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 forward
slashes "/" for the Windows path. This example uploads the BookStore sample that has been copied
to 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
3. By default, the upload command copies the archive file to the domain. If you would like to create a
subdirectory under the domain home to organize your files, use the -path option. For example, you
can 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 Archive
You 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 to
and the archive file is located in the TIBCO_HOME\bw\domains\MyDomain\archives directory, do not
specify 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 Application
You 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. The
profile is the file with the extension .substvar.
When you apply the config command to an application, by default, the profile changes are applied to
all 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 Application
with Multiple Profiles.
Procedure
1. In a terminal, navigate to BW_HOME\bin and type bwadmin.
32
TIBCO ActiveMatrix BusinessWorks

Administration
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 application
archive.
After you configure an application with a profile, it becomes part of the application archive. An
application's configuration can be exported to the file system so that it can be used to configure another
application. 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 is
deployed 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_profile


name.substvar.

An AppNode config file is exported to BW_HOME\bin using the format:


domain_name_appspace_name_appnode_name_config.ini.
Starting an Application
To 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 the
AppSpace. However, you can deploy an archive file with the -startondeploy property set to false
and then use the start command after configuring an application or to start the application on a specific
AppNode.
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
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 Applications
You 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: MyDomain
Name Version AppSpace
Profile Runtime Status
Config Status Details
tibco.bw.sample.binding.rest.BookStore.application 1.0
MyAppSpace
null Running
InSync
Listed all Applications in 0 seconds
Stopping an Application
You 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 Application
Undeploying an application or a library removes the deployed application or library from the
AppSpace.
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
Using bwdesign Utility
The bwdesign utility provides a command line interface for creating, validating, importing or exporting
resources 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
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
Integrating ActiveMatrix BusinessWorks with TIBCO
Enterprise Administrator
The TIBCO

Enterprise Administrator server is an application administration UI that supports multiple


TIBCO products. It allows you to create, view, and monitor ActiveMatrix BusinessWorks runtime
entities.
The TIBCO Enterprise Administrator server is built on a shared services model that provides common
administrative access with reusable shared administrative services. The server communicates with its
products through agents. Each product registers its own agent with the server or an administrator can
develop self described agents using the REST based protocol the server provides. The agent processes
messages 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 and
pervasive UI elements like bread crumbs.
See the TIBCO Enterprise Administrator User's Guide for an introduction to TIBCO Enterprise
Administrator server concepts, architecture, agent management, and components. The guide also
explains 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 you
have 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 Enterprise
Administrator web UI, see Running Applications in Enterprise Mode Using the Web UI.
TIBCO Enterprise Administrator allows you to perform almost all bwadmin administrative tasks using
the 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 is
a remote shell based on the SSH protocol that provides the command line interface for the full range of
TEA operations for ActiveMatrix BusinessWorks applications. The scripting language is similar to that
of 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
When you are in the shell, press the Tab key for a list of available commands. Commands are aligned
with bwadmin commands. See bwadmin Commands for information.
Registering a bwagent with TIBCO Enterprise Administrator
A bwagent TEA agent must be registered with the TIBCO Enterprise Administrator server before it is
available 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 enterprise
Admin 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 successfully
appears in the terminal.
5. Stop and restart bwadmin. In the bwadmin terminal, type Ctrl-D to exit bwadmin. Restart by
typing bwadmin in the same terminal.
6. Register the bwagent TEA agent with the TIBCO Enterprise Administrator server. Provide the URL
to 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 Enterprise
Administrator 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 user
name 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 server
A bwagent can be part of an agent network, which allows commands to be distributed to multiple
bwagents simultaneously.
For an agent network to be managed from a TIBCO Enterprise Administrator server, one bwagent in
the agent network must be registered with the server. If the registered bwagent terminates, the
connection between the server and the agent network is automatically recovered. Another bwagent in
the agent network will auto-register with the server.
The following diagram shows an agent network with three members. Commands sent using web
browser are sent to the registered bwagent via the TIBCO Enterprise Administrator server. The
registered bwagent forwards the commands to each bwagent in the agent network. The bwadmin
38
TIBCO ActiveMatrix BusinessWorks

Administration
utility can also send commands to any bwagent in the agent network. For example, commands sent via
bwadmin 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 toggle
mechanism used to auto register a bwagent. The commands can be run against any bwagent in an
agent network and act on all bwagents in the agent network. If you disable auto registration for an
agent network, the members of the network will be unable to communicate with the TIBCO Enterprise
Administrator server. You will have to manually register a bwagent in the agent network for it to
communicate with the server.
39
TIBCO ActiveMatrix BusinessWorks

Administration
Monitoring using TIBCO Hawk
ActiveMatrix BusinessWorks provides the TIBCO Hawk MicroAgent that allows you to do some
administrative functions on applications and processes.
This section describes the methods available.
Enabling TIBCO Hawk MicroAgent
Before using TIBCO Hawk with ActiveMatrix BusinessWorks, you must enable the TIBCO Hawk
MicroAgent.
Prerequisites
To use TIBCO Hawk MicroAgent features, install TIBCO Rendezvous and set the RV_HOME
environment variable on the machine where the AppNode is running. For information on setting the
variable, see the Post Installation Tasks topic in the Installation Guide.
To enable the MicroAgent, uncomment the bw.hawk.hma.transport property in the AppNode's
configuration 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 temporary
location.
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 Methods
The TIBCO MicroAgent Hawk methods available to monitor ActiveMatrix BusinessWorks applications
are listed below.
DisableProcessStatsCollection
Disables 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, the instrumentation
will be disabled for all processes in the application.
No
Output: None
40
TIBCO ActiveMatrix BusinessWorks

Administration
EnableProcessStatsCollection
Enables 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, the
instrumentation will be enabled for all processes in the
application.
No
Output: None
GetActivitiesStats
Retrieves statistics about the activities of processes that have been executed for a given application
since 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 statistics
for all activities in all processes in the application
will 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 this
activity. This includes waiting time for Sleep, Call Process, and Wait
For... activities.
ExecutionTime Total clock time (in milliseconds) used by all executions of this
activity. This does not include waiting time for Sleep, Call Process,
and Wait For... activities.
41
TIBCO ActiveMatrix BusinessWorks

Administration
Item Description
ErrorCount Total number of executions of the activity that have returned an
error.
LastReturnCode Status code returned by most recent execution of this activity. This
can be either OK, DEAD, or ERROR.
MinElapsedTime Elapsed clock time (in milliseconds) of the activity execution that
has completed in the shortest amount of elapsed time.
MaxElapsedTime Elapsed clock time (in milliseconds) of the activity execution that
has completed in the longest amount of elapsed time.
MinExecutionTime Execution time (in milliseconds) of the activity execution that has
completed in the shortest amount of execution time.
MaxExecutionTime Execution time (in milliseconds) of the activity execution that has
completed in the longest amount of execution time.
MostRecentElapsedTime Elapsed clock time (in milliseconds) of the most recently completed
activity execution.
MostRecentExecutionTime Execution time (in milliseconds) of the most recently completed
activity execution.
ExecutionCountSinceReset Number of activity executions that have completed since the last
reset of the statistics.
GetProcessInstanceCount
Returns 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 versions
of the application will be considered.
No
Process Name Name of the process. If not configured, the process
instances of all running processes in the application will
be 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
GetProcessInstanceInfo
Returns 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 versions
of the application will be considered.
No
Process ID Process Instance ID. If configured, the details about the
matching process instance will be returned. If not
configured, the details about all active process instances
in a given application will be returned.
No
Process Name Name of the process. If configured, the details about all
process instances for a given process will be returned. If
not configured, the details about process instances of all
running processes in a given application will be
returned.
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.
GetProcessStats
Retrieves statistics about the processes that have been executed for a given application since 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
43
TIBCO ActiveMatrix BusinessWorks

Administration
Argument Name Description Required?
Application Version Version of the application. Yes
Process Name Name of the process. If not configured, the statistics
for 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 successfully
completed.
TotalExecution Total execution time (in milliseconds) for all successfully
completed process instances.
AverageExecution Average execution time (in milliseconds) for all successfully
completed process instances.
AverageElapsed Average elapsed clock time (in milliseconds) for all successfully
completed process instances.
MinElapsed Elapsed clock time (in milliseconds) of the process instance that
has completed in the shortest amount of elapsed time.
MaxElapsed Elapsed clock time (in milliseconds) of the process instance that
has completed in the longest amount of elapsed time.
MinExecution Execution time (in milliseconds) of the process instance that has
completed in the shortest amount of execution time.
MaxExecution Execution time (in milliseconds) of the process instance that has
completed in the longest amount of execution time.
MostRecentExecutionTime Execution time (in milliseconds) of the most recently completed
process instance.
MostRecentElapsedTime Elapsed clock time (in milliseconds) of the most recently
completed process instance.
CountSinceReset Number of process instances that have completed since the last
reset of the statistics.
44
TIBCO ActiveMatrix BusinessWorks

Administration
ListApplications
Returns 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.
ListProcessEnabledForStats
Lists 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 is
enabled for all processes in the application.
ResetActivityStats
Resets 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 statistics
will be reset for all activities for all processes in the
application.
No
Output: None
45
TIBCO ActiveMatrix BusinessWorks

Administration
ResetProcessStats
Resets 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 statistics
will be reset for all processes in the application.
No
Output: None
46
TIBCO ActiveMatrix BusinessWorks

Administration

Вам также может понравиться