TIBCO ActiveMatrix BusinessWorks™ Application Development

TIBCO ActiveMatrix BusinessWorks™ Application Development
TIBCO ActiveMatrix BusinessWorks™
Application Development
Software Release 6.4.0
May 2017
Two-Second Advantage®
2
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-2017 TIBCO Software Inc. All rights reserved.
TIBCO Software Inc. Confidential Information
TIBCO ActiveMatrix BusinessWorks™ Application Development
3
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
TIBCO Documentation and Support Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Changing Help Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Application Development Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Application Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Process Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Service Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
TIBCO Business Studio Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
File Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
API Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Process Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Palette Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Entity Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Developing a Basic Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Creating an Application Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Creating a Shared Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Exporting a Shared Module as a Binary Shared Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Using Binary Shared Modules in your Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Creating a Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Configuring a Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Creating a Subprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Creating an Activator Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Adding Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Working with Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Working with Standard Activity Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Creating a Module Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
Editing a Module Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Promoting Module Properties for Visibility at the Application Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Deleting a Promoted Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Importing WSDLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Using Additional Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
TIBCO ActiveMatrix BusinessWorks™ Application Development
4
Using Scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Adding Scope Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Defining and Using Shared Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Retrieving and Assigning a Value of a Shared Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Working with Critical Section Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using Fault Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Using Conversations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Using Checkpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Using Coercions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Adding a Single Coercion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Adding Multiple Coercions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Editing Coercions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Removing Coercions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Configuring Database for the Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Configuring the Engine for Group Persistence Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Configuring EMS as the Group Provider for Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Configuring TIBCO FTL® as the Group Provider for Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Overview of Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Managing Policy Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Creating a Folder for Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Creating an Authentication Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Associating Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Removing a Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
HTTP Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Enforcing Basic Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Enforcing Basic Credential Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
SOAP Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Enforcing WSS Consumer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Enforcing WSS Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Deploying an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
XPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
XPath Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
XPath Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
XPath Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Developing a SOAP Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Consuming SOAP Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Developing a RESTful Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
Implementing a REST Service Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Discovering API Models from TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
TIBCO ActiveMatrix BusinessWorks™ Application Development
5
Importing an API Model into your Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Creating an XML Schema for a Swagger 2.0 File Imported in TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Synchronizing the Imported REST API Models in the TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Developing Java Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
Using a Simple Java Invoke Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Accessing Module Properties from Java Global Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Accessing Module Properties from Java Invoke Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Accessing Module Properties in User-Defined Java Code Referenced in JavaProcessStarter . . . . . . . . . . . . . . . . . . . . . 106
Creating an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Generating Deployment Artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
Refactoring a Shared Resource or Policy Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Renaming a Resource or a Policy Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Changing the Location of a Resource or a Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Adding and Removing Multiple Component Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Adding Multiple Component Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Deleting Multiple Component Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Using the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Configuring the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Testing an Application in TIBCO Business Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Remote Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Setting Up a Test File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Adding a Process to a Test File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Uploading and Deploying a Test File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
TIBCO Business Studio™ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
REST APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Using the bwdesign Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Mapping and Transforming Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
TIBCO ActiveMatrix BusinessWorks™ Application Development
6
Figures
Approaches to Application Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
TIBCO Business Studio Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Parent Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Sub Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Drag-and-Drop a Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Drag-and-Drop a Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Input Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Input Editor Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Output Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Output Editor Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Fault Handler Attached to an Inner Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Schema Elements in Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
XPath Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
TIBCO ActiveMatrix BusinessWorks™ Application Development
7
TIBCO Documentation and Support Services
Documentation for this and other TIBCO products is available on the TIBCO Documentation site. This
site is updated more frequently than any documentation that might be included with the product. To
ensure that you are accessing the latest available help topics, visit:
https://docs.tibco.com
Product-Specific Documentation
Documentation for TIBCO products is not bundled with the software. Instead, it is available on the
TIBCO Documentation site. To directly access documentation for this product, double-click the
following file:
TIBCO_HOME/release_notes/TIB_BW_version_docinfo.html
The following documents for this product can be found on the TIBCO Documentation site:
●
Concepts
●
Installation
●
Getting Started
●
Application Development
●
Administration
●
Bindings and Palettes Reference
●
Samples
●
Error Codes
●
Migration
●
Performance Benchmarking and Tuning Guide
●
API Reference
●
REST Reference
How to Contact TIBCO Support
For comments or problems with this manual or the software it addresses, contact TIBCO Support:
●
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 TIBCO Community
TIBCO Community 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. TIBCO Community offers
forums, blogs, and access to a variety of resources. To register, go to the following web address:
https://community.tibco.com
TIBCO ActiveMatrix BusinessWorks™ Application Development
8
Changing Help Preferences
By default, documentation access from TIBCO Business Studio™ is online, through the TIBCO Product
Documentation site (Doc site) at https://docs.tibco.com/which contains the latest version of the
documentation. Check the Doc site frequently for updates. To access the product documentation offline,
download the documentation to a local directory or an internal web server and then change the help
preferences in TIBCO Business Studio™.
Prerequisites
Before changing the help preferences to access documentation locally or from an internal web server,
download the documentation from https://docs.tibco.com/.
1. Go to https://docs.tibco.com/
2. In the Search field, enter ActiveMatrix
BusinessWorks
and press Enter.
3. Select the ActiveMatrix BusinessWorks™ https://docs.tibco.com/ product from the list. This opens
the product documentation page for the latest version.
4. Click Download All.
5. A zip file containing the latest documentation downloads to your web browser's default download
location. Copy the zip file to a local directory or to an internal web server and unzip the file.
To point to a custom location:
Procedure
1. In TIBCO Business Studio™, click Window > Preferences. On Mac OS X, click TIBCO Business
Studio > Preferences.
2. In the Preferences dialog, click BusinessWorks > Help.
3. Click Custom Location then Browse to select the html directory in the folder where you unzipped
the documentation, or provide the URL to the html directory on your internal web server.
4. Click Apply then OK.
TIBCO ActiveMatrix BusinessWorks™ Application Development
9
Application Development Overview
ActiveMatrix BusinessWorks applications can be developed using either the traditional phases of
waterfall development, or using an incremental and iterative approach such as Scrum.
The Application Development guide explains the following:
●
Approaches to application development.
●
Considerations to be made when building an application.
●
Information on how to work with various software components and how to generate the
deployment artifact.
Application development consists of the following phases:
●
Analysis - Analyze the business problem and identify the applications, modules, services, and
processes that need to be created to solve the problem.
●
Application Creation/Design - Create one or more applications identified during the analysis
phase. TIBCO Business Studio™ provides the design-time environment to design an application and
its components that implement the business logic.
●
Service Design - Create the services identified in the analysis phase. The services can be accessed by
processes that are used to implement the business logic.
●
Process Design - Create the processes that implement the business logic. These processes can access
the services configured.
●
Generating Deployment Artifacts - Create a deployment artifact — an archive file, after creating
and configuring the processes and services.
If any changes to the design or configurations are made, the archive file must be
regenerated.
There are two main approaches to application development: top-down and bottom-up.
Top-down is a design approach that begins with a holistic view of the application, specifying the major
functions or interfaces it will need before the next level of details. This process is repeated until the
most granular pieces are designed and implemented. The application is then ready for testing. Toplevel services and processes can be designed and developed first before moving to the lower levels.
In the bottom-up approach, the basic elements of the application are first specified and developed as
building blocks. These reusable parts are then connected to form functional units that serve a higher
purpose. This process is repeated until the design grows in complexity and completeness to form an
application. The building blocks can be created as layers of services, subprocesses, and shared
resources. These building blocks are assembled together to form application modules or shared
modules. These modules are then assembled together to form an application.
In practice, even a new application can have existing services to leverage from. As a result, a problem
can be approached from both top and bottom, resulting in a hybrid approach. The bottom part can start
creating reusable shared modules to encapsulate existing system services that are well defined. The top
part can start with the business requirements and break it down to intermediate layers, until the
reusable modules are reached.
Either top-down or bottom-up approaches can be used with service-driven or process-driven design
patterns. Service-driven means the service contract or interface of each functional component is
formalized first. The processing logic behind the service simply becomes an implementation detail that
is encapsulated. This is where these SOA design principles can be followed: standardized service
contract, loose coupling, service abstraction, service reusability, service statelessness, and service
composability.
TIBCO ActiveMatrix BusinessWorks™ Application Development
10
Process-driven means the business processes or integration flows are first realized and captured.
Service contracts may or may not be applicable in a process-centric application, especially for batch or
EAI-type automation scenarios.
Approaches to Application Development
Each of these approaches can be followed in conjunction with the waterfall or Scrum development
methods.
The generation of the deployment artifact indicates that the application can be deployed to the run
time. Any further changes to the design-time configurations require the deployment artifact to be
regenerated. See TIBCO ActiveMatrix BusinessWorks Administration for deployment and administration
details.
TIBCO ActiveMatrix BusinessWorks™ Application Development
11
Application Design Considerations
Applications help solve integration problems of varying complexity. This section describes some
important factors to consider when designing an application.
Choosing Between Integration Styles
The table, Salient features of integration styles, provides guidelines to choose a high-level integration
style for your applications.
Salient features of integration styles
Speed of
Integration
Data
Abstraction
Richness of
Orchestration
Primitives
Batch-oriented
Non-real time
Record
Low
Databases, files,
and so on
Applicationoriented
Real-time
Message
Medium
Application APIs,
Adapters, and so
on
Service-oriented
Real-time
Service,
Operation
High
Web services and
APIs
Resourceoriented
Real-time
Resource
Medium
Mobile/Web
Applications and
APIs
Typical
Endpoints
In an application-oriented integration style, each operation in a process can be invoked by a call to the
process. Invoking multiple operations requires multiple calls to the process, that are then executed
sequentially.
A service-oriented style exposes multiple operations available in a process and each of the operations
can be called directly. These operations are not related and can be executed independently. However,
you can use conversations to correlate the related messages between two or more parties.
Choosing the Modularity
An application module is the smallest unit of resources that is named, versioned, and packaged as part
of an application, and then executed in the ActiveMatrix BusinessWorks runtime environment. It
cannot provide capabilities to other modules.
A shared module is the smallest unit of resources that is named, versioned, and packaged as part of an
application and can be used by other modules that are part of the same application. Shared modules
export their functionality (process, shared resources, and schema namespaces) to application modules
or to other shared modules. When creating a new module, select a shared module if the business logic
needs to be shared across multiple applications. Shared modules can also be used if XML collisions
exist.
TIBCO ActiveMatrix BusinessWorks™ Application Development
12
Differences between Application and Shared Modules
XML
Namespace
Restrictions
Runtime
Reusability
Encapsulation
Application
Modules
Can be executed
by the run time
when packaged
as part of an
application.
Can be used by
one or more
applications.
Processes within
an application
module are
visible to each
other. However,
the processes are
not visible
outside of the
module.
Namespace can
be provided by
multiple
documents.
Shared Modules
Cannot be
executed by the
run time unless
utilized by an
application
module.
Can be used by
one or more
application
modules or
shared modules.
Processes within
a shared module
are visible to each
other. However,
only the
processes defined
as public are
visible outside of
the shared
module.
Only one
document can
provide the
namespace; that
is two documents
cannot have the
same namespace.
All schemas and
WSDL files are
visible to other
modules that
depend on the
shared module.
Choosing Implementation Technologies for the Modules
When implementing the business logic, ActiveMatrix BusinessWorks provides flexibility ranging from
developing applications graphically without coding, to using existing Java classes (or libraries), to
writing custom code. Application modules or shared modules typically consist of one or more business
processes that define the business logic. Create an application or shared module using the GUI to
leverage the rich orchestration capabilities provided by ActiveMatrix BusinessWorks.
Choose to create (or use) a Java module (or a Java OSGi bundle), if multiple calls from a process to other
Java libraries are needed to compute the result. Java modules provide a high degree of customization.
To use the enhanced Java development tooling such as source folders, JRE libraries, and so on, select the
Use Java Configuration check box in TIBCO Business Studio when creating an application module.
Alternatively, create a module that contains existing Java code or custom code.
TIBCO ActiveMatrix BusinessWorks™ Application Development
13
Differences between Process Modules and Java Modules
Orchestration
Capabilities
Visibility
Granularity
Examples
Process Modules
High
High visibility of
process flow
logic, services,
and bindings.
Better suited for
coarse-grained
functionality that
consists of more
discrete
functionality and
process
constructs.
Account opening,
mortgage loan,
and so on.
Java Modules
Low
Low
Better suited for
fine-grained
functionality that
has a very
specific function,
and often
requires very
little or no
process
constructs.
Query flight
status, update
product
description, and
so on.
TIBCO ActiveMatrix BusinessWorks™ Application Development
14
Process Design Considerations
In process-driven design, the business processes or integration flows are first realized and captured.
Service contracts might be applicable in a process-centric application, especially for batch or EAI-type
automation scenarios. This topic describes some important factors to be considered when using a
process-driven approach.
Choosing Between Stateful and Stateless Processes
Stateful processes maintain the state across multiple operations. They are better suited when you need
the server to maintain the state across operations. For processes that involve related message exchanges
between the same or different consumers, conversations can be used to maintain state across
operations.
Stateless processes do not maintain state. They are better suited when you need to process higher loads
of requests as each operation is executed independently. They do not require correlation or
conversations between multiple operations in a process, thus allowing the server to process each
operation without maintaining any state information. The client can choose to maintain the state
information, if needed.
Maintains State
Data Sharing
Conversations
Stateful Processes
Across multiple
operations and
interfaces.
Data can shared by
activities across
operations that
executing as part of
the same job.
Uses conversations to
enable correlation.
Stateless Processes
Does not maintain
state.
Data is not shared.
No conversations.
Choosing Between Properties and Variables
Properties are used to save configuration data at different levels. They can be classified into application
properties, module properties, and process properties. See Choosing Between Process Properties,
Module Properties, Shared Module Properties, and Application Properties for details.
Variables are used to save the state at different levels. They can be classified into process variables,
scope variables, and shared variables. See Choosing Between Process Variables, Scope Variables, and
Shared Variables for details.
Choosing Between Process Properties, Module Properties, Shared Module Properties, and
Application Properties
Properties can be classified into application properties, module properties, shared module properties,
and process properties. Properties follow the layered configuration model where configuration is
pushed from top to the bottom as seen in the illustration:
TIBCO ActiveMatrix BusinessWorks™ Application Development
15
Properties defined in the inner layer can reference a property defined at the parent layer. For example, a
process property can reference a module property instead of providing a literal value. Public properties
are visible to the encapsulating layers.
Choosing the right level ensures an easier to maintain list of properties in your application and keeps
the number of properties at the application level to a minimum.
Comparing Process, Module, Shared Module and Application Properties
Scope/Visibility
Datatype
Values
Additional
Information
Process
Properties
Visible within a
process.
Literal or shared
resource reference.
Literal, shared
resource
reference, or a
module
property
reference.
Literal values
cannot be
modified at the
module or
application
level.
Module
Properties
●
Visible
within the
module.
●
Private
module
properties
cannot be
viewed from
the Admin
UI.
●
Not visible
or
changeable
from
Administrat
or.
Literal or shared
resource reference.
●
Literal or a
shared
resource
reference.
●
Private
module
property
values
cannot be
edited from
the Admin
UI.
Cannot be
assigned to an
activity directly.
You need to
reference a
module
property from a
process
property, and
then reference
the process
property from
the activity.
TIBCO ActiveMatrix BusinessWorks™ Application Development
16
Scope/Visibility
Shared Module
Properties
●
Visible
within the
module.
●
Visible
within
projects that
contain
dependencie
s to the
Shared
Module that
the Shared
Module
Property
came from.
●
Private
module
properties
cannot be
viewed from
the Admin
UI.
●
Not visible
or
changeable
from the
Admin UI.
Datatype
Values
Literal or a shared
resource reference.
●
Literal or a
shared
resource
reference.
●
Private
module
property
values
cannot be
edited from
the Admin
UI.
Additional
Information
●
Shared
Module
Properties
are module
properties
that come
from a
Shared
Module.
●
Cannot be
assigned to
an activity
directly. You
need to
reference a
module
property
from a
process
property,
and then
reference the
process
property
from the
activity.
●
Can be used
for activities,
process
properties,
shared
resources,
and SOAP
Bindings.
TIBCO ActiveMatrix BusinessWorks™ Application Development
17
Application
Properties
Scope/Visibility
Datatype
Displays all the
module
properties in the
application.
These properties
are visible in
Administrator.
Literal.
Values
●
Literal.
●
Profiles can
be used to
provide a
new set of
values for
the
application.
Additional
Information
●
Overrides
module
properties,
thus
enabling you
to use
different
values for
the same
module.
●
Cannot add
new
properties at
application
level.
Choosing Between Process Variables, Scope Variables, and Shared Variables
A process variable saves the state at the process level and a scope variable saves the state within the
scope.
Variables defined within a scope are visible only within the scope. If the scope variable name is the
same as a process variable name, then the scope variable takes precedence over the process variable
within the scope.
Shared variables are used to save the state. There are two types of shared variables:
●
Module shared variable - saves the state at a module level.
●
Job shared variable - saves the state for the duration of a job.
See the Concepts guide and Using Shared Variables for more information about shared variables.
Handling Exceptions
Errors can occur when executing a process. The potential runtime errors in your process can be handled
in one of the following ways:
●
Catch Specific: Used to catch a specific kind of fault at either activity, scope, or process levels.
●
Catch All: Used to catch all error or faults thrown at the selected level.
You can add an error transition to an activity or a group to specify the transition to take in case of an
error.
Service Design Considerations
In service-driven design, the service contract or interface of each functional component is formalized
first. The processing logic behind the service simply becomes an implementation detail that is
encapsulated. This section describes some important factors to consider when using the service-driven
approach.
Choosing Between Abstract Process Starters, Services, and Service Subprocesses
Choose a process starter activity to start a process when an event occurs. There can be only one process
starter in a process.
TIBCO ActiveMatrix BusinessWorks™ Application Development
18
Do not create a process with a technology specific process starter such as an HTTP or JMS process
starter.
Choose a service if you want to expose the operations available in a process outside the application
module.
Choose a service subprocess to make your business process easier to understand and debug. A
subprocess is invoked by a parent process and the output of the subprocess is used in the main process.
A parent process calls a subprocess in two ways: in-line and non-in-line. At run time, an in-line
subprocess executes as part of the parent process' job, while a non-in-line subprocess spawns a new job.
Choosing between REST and SOAP Bindings
A process service is exposed to external consumers by configuring bindings such as REST or SOAP.
Overhead of
Additional
Parameters
Data Abstraction
State Information
(Headers or other
SOAP elements)
REST Services
Resources
Stateless
Less
SOAP Services
Operations
Stateful
High
TIBCO ActiveMatrix BusinessWorks™ Application Development
19
TIBCO Business Studio Essentials
TIBCO Business Studio is an Eclipse-based integration development environment that is used to design
and test TIBCO ActiveMatrix BusinessWorks™ applications.
If you are familiar with the TIBCO Business Studio user interface, skip to the section Developing a Basic
Process.
Using TIBCO Business Studio, designers implement an executable application that can be deployed to
ActiveMatrix BusinessWorks.
Starting TIBCO Business Studio
To start TIBCO Business Studio on Windows, select Start > All Apps > TIBCO_HOME > Studio for
Designers. On Linux or Mac OS, select the TIBCO Business Studio executable located at
<TIBCO_HOME>/studio/<version>/eclipse/.
On the Workspace Launcher dialog, accept the default workspace or browse to create a new workspace,
and then click OK. TIBCO Business Studio starts and the default development environment, called a
workbench, displays. A welcome screen is displayed in the window when a workspace is opened for the
first time.
On Mac OS, TIBCO Business Studio displays the Subversion Native Library Not Available dialog box if
the SVN interface is set to JavaHL (default) and the JavaHL libraries are not available. To ensure that
the dialog box is not displayed each time you start TIBCO Business Studio, perform one of the
following:
●
Install the JavaHL libraries. See http://subclipse.tigris.org/wiki/JavaHL for instructions.
●
Update the SVN interface to use SVNKit instead of JavaHL. Select Window > Preferences and in the
Preferences dialog box, select Team > SVN. For the SVN interface Client field, select SVNKit
(Pure Java) interface from the drop-down list.
TIBCO Business Studio Development Environment
TIBCO Business Studio provides a workbench that is used to create, manage, and navigate resources in
your Eclipse workspace. A workspace is the location on your machine where the artifacts related to your
ActiveMatrix BusinessWorks™ projects are stored.
TIBCO Business Studio Workbench
TIBCO ActiveMatrix BusinessWorks™ Application Development
20
The TIBCO Business Studio workbench has features such as:
●
Menu: Contains menu items such as File, Edit, Navigate, Search, Project, Run, Window, and Help.
●
Toolbar: Contains buttons for the frequently used commands such as:
●
—
New
—
Save
—
Enable/Disable Business Studio Capabilities
—
Create a new BusinessWorks Application Module
—
Create a new BusinessWorks Shared Module
—
Debug
—
Run
Perspectives: Contain an initial set and layout of views that are needed to perform a certain task.
TIBCO Business Studio launches the Design perspective by default. Use the Design perspective
when designing a process and the Debug perspective when testing and debugging a process. To
change the perspective, select Window > Open Perspective > perspective_name from the main
menu. Or, you can click the icon
perspective to open.
at the top right-hand side of the workbench and select the
●
Views: Display resources and allow for navigation in the workbench. For example, the Project
Explorer view displays the ActiveMatrix BusinessWorks applications, modules, and other resources
in your workspace, and the Properties view displays the properties for the selected resource. To
open a view, select Window > Show View > view_name from the main menu.
●
Editors: Provide a canvas to configure, edit, or browse a resource. Double-click a resource in a view
to open the appropriate editor for the selected resource. For example, double-click on a process
(MortgageAppConsumer.bwp) in the Project Explorer view to open the process in the editor.
Explorers
The TIBCO Business Studio consists of the following tabs in the left pane:
●
Project Explorer
●
API Explorer
●
File Explorer
●
Outline tab
●
Module tab
●
Deployment Servers
Creating an Application and Designing a Process
Create an application and design one or more process(es) within the application in TIBCO Business
Studio to implement the business logic. See Developing a Basic Process.
Testing and Debugging an Application
Using TIBCO Business Studio you can test and debug your application from the design-time.
TIBCO ActiveMatrix BusinessWorks™ Application Development
21
To run the selected application, select Run > Run from the main menu, or click
on the toolbar.
To execute and debug the application, select Run > Debug from the main menu, or click
toolbar.
on the
By default, the project displayed in the Process Editor launches. You can run or debug an application
using a specific configuration. Create one or more configurations for your application by selecting Run
> Run Configurations from the main menu and specifying the following:
●
Bundles to be executed.
●
Arguments such as the target operating system, target architecture, target web services, engine
properties, and so on.
●
Settings that define the Java Runtime Environment including the Java executable, runtime JRE,
configuration area, and so on.
●
Tracing criteria for the OSGi JAR file, if needed.
●
Common options such as saving the results either as local files or as shared files, displaying them in
the menus (Debug and/or Run), and defining encoding for the result files.
Outline
The Outline view displays the details of a currently selected process or artifact in a tree like structure. It
shows a more in-depth view of the selected artifact as compared to the Project Explorer.
Use this view while you are actively editing a process to select an artifact and see its properties right
away.
Module
The Module tab displays the module properties and shared variables for the selected module. It
displays the variables in the module.
Click on a module name in the Project Explorer to view the default values of the module properties
defined in the module and/or the shared variables that exist in the module. This tab is useful as it saves
to the additional step of having to open the Module Descriptor editor to view the default values of the
selected module. You can also drag and drop a shared variable from the Module tab into a process that
is open in the Process Editor.
File Explorer
The File Explorer displays a view of selected folders in your local file system.
By default, the File Explorer displays the samples directory.
) to open your file system and navigate to the
Click the Open Directory to Browse button (
directory that you want to view in the File Explorer. The File Explorer can display one directory at any
given time.
To revert to the samples directory, click the Go to Default Samples Directory button (
).
Click the back arrow to go to a previous location or the forward arrow to go to the next location in case
you had navigated to a previous location.
You can also open the directory in your Windows file system by right-clicking on the path in the File
Explorer and selecting Open Location from the resulting menu. Select Create Folder to create a new
folder under that directory. The Import Selected Projects option allows you to open the projects in the
Project Explorer.
TIBCO ActiveMatrix BusinessWorks™ Application Development
22
API Explorer
Displays a connected view of the ActiveMatrix BusinessWorks API Modeler residing in the cloud. This
view shows abstract APIs that were created in API Modeler. You can also view the APIs residing on
your local machine from the API Explorer.
When you open the TIBCO Business Studio for the very first time, you will need to enter your
credentials for the registry site by opening the Settings dialog and double-clicking on the registry name
and entering your username and password for the site in the resulting dialog. To open the Settings
dialog click the ( ) button on the upper right corner of the API Explorer view and click Settings. This
will populate the API Explorer with the APIs that are available in the registry.
Adding a new registry to the API Explorer view
Use the Settings dialog in the API Explorer to add a new registry (location) from where you want to
view the APIs. To open the Settings dialog click the ( ) button on the upper right corner of the API
Explorer view and click Settings.
TIBCO ActiveMatrix BusinessWorks™ Application Development
23
By default, the Settings dialog is configured with a Cloud registry which is set to the URL for the API
Modeler.
To create a new registry:
1. Click the New button.
2. Enter a name for the registry Name field.
3. Select whether the registry will be pointing to a local folder on your machine (Local Folder) or to a
URL in the cloud (Cloud).
4. Provide the location of the registry in the URL field. If the registry points to a location on the cloud,
you will need to provide the authentication details for it in the Username and Password text boxes.
5. Click Finish.
To edit an existing registry entry:
1. Click the name of the registry and click Edit.
2. Make your edits to the entry. You can change the name of the registry, delete the registry
configuration by clicking Remove, or changing the order in which the registries show up in the API
Explorer by using the Up and Down button.
3. Click Finish when you are done with your edits.
To select specific registries to display in the API Explorer view, select the checkbox next to the entry you
want to display. You can also do so at a later time. See Filtering the APIs in the API Explorer View for
details on how to do this.
TIBCO ActiveMatrix BusinessWorks™ Application Development
24
Setting the presentation of the APIs in the API Explorer view:
In this dialog, you can specify how the discovered APIs will appear in the API Explorer:
●
API Presentation - specifies how the APIs will appear in the API Explorer
Flat - displays the APIs as a flat list with each API's version number displayed next to its name in
parenthesis. If there are multiple versions of the same API, each version will be shown as a separate
API, hence multiple APIs with the same name but different version numbers.
Hierarchical - displays every API as a hierarchy of API name lable with version number folder
under it and the actual API under the version folder. If there are multiple versions for an API, each
version will be listed in its own separate folder under the API name label.
Latest Version - displays only the latest version of the API, even though there might be multiple
versions available.
●
Group by API registry - groups the APIs according to the registry from which they were
discovered. You also have the option to display the URL of the APIs next to the registry name by
selecting the Show API Registry URL check box.
You should now see the APIs displayed in the API Explorer in the format that you specified in the
Settings dialog. Expanding an API will show you its version, the resource path, and the operations you
can perform on that resource.
The API Explorer view has the following quick-access buttons that you can use to format the way the
APIs are listed:
●
Refresh
●
Expand All
●
Collapse All
●
●
●
Group by API Registry
API Presentation
API Registries. Selecting a registry from this drop-down list toggles between displaying and
hiding the registry in the API Explorer.
Searching for APIs in API Explorer:
Use the search filter that appears at the bottom of the API Explorer view to search for API names that
match the string that you enter in the Filter text box. You can search by typing in the version number,
the full API name, or a full word within an API name. Wildcards is not supported. The search is case
insensitive.
Filtering the APIs in the API Explorer view
If your APIs reside in multiple locations and you have set up the API registries in the Settings dialog of
the API Modeler view, you can filter the APIs in API Modeler such that it shows you only the APIs
available in a certain registry.
To do so, click the ( ) button on the upper right corner of the API Modeler view and select the registry
whose APIs you want to view.
TIBCO ActiveMatrix BusinessWorks™ Application Development
25
Process Editor
Process Editor is the canvas in which you design and create your process.
You can click on an activity in the activities palette located to the right of the Process Editor and drop it
in the Process Editor by clicking anywhere within the process boundary or you can add an activity
from the right-click menu accessible from within the Process Editor. Use Transitions to create a flow
between the activities.
To open an existing process in the Process Editor, double-click the <process>.bwp in the Project
Explorer. The process diagram will open in the Process Editor.
Palette Library
TIBCO Business Studio comes with a variety of Palettes each of which contain multiple activities
relevant to the Palette.
Click on a Palette name to see which activities are available for the palette. To use an activity in your
process, click on the activity, then move your cursor anywhere within the process boundary in the
Process Editor and click again.
TIBCO ActiveMatrix BusinessWorks™ Application Development
26
Entity Naming Conventions
Most of the ActiveMatrix BusinessWorks named entities are modeled as NCNames (or as a subset of an
NCNames). These include activity names, service names, reference names, binding names, and
component names.
Process names and shared resource names are represented as a subset of an NCName as they do not
allow the use of a dot (.) character in their names. A small set of named entities are modeled as OSGi
symbolic names. This set includes application names, module names, process package names, and
shared resource package names.
NCName stands for XML "non-colonized" name. See http://www.w3.org/TR/xmlschema-2/#NCName
for the W3C definition of NCName. NCName represents the set of characters that conforms to the
following restrictions:
●
Can include letters or numbers A-Z, a-z (lower case letters), 0-9, -, _ (underscore)
●
Cannot include the following characters: @, :, $, %, &, /, +, ,, ;, ), A-Z (uppercase letters), - (hyphen)
and white space characters.
●
Cannot begin with a number, dot (.), or minus (-) character. However, these characters can appear
later in an NCName.
The OSGi symbolic name is defined as part of the OSGi Specification, which is available at http://
www.osgi.org/download/r5/osgi.core-5.0.0.pdf. OSGi symbolic names are represented using the
following syntax:
symbolic-name ::= token('.'token)*
token ::= ( alphanum | ’_’ | ’-’ )+
alphanum ::= alpha | digit
digit ::= [0..9]
alpha ::= [a..zA..Z]
TIBCO ActiveMatrix BusinessWorks™ Application Development
27
Developing a Basic Process
Using processes you can implement business logic that obtains and manages the flow of information in
an enterprise between a source and different destinations.
TIBCO Business Studio Workbench provides a design environment to develop and test a process.
Developing a simple process consists of the following phases:
1. Creating an Application Module to contain the processes and shared resources.
2. Creating a Shared Module (optional).
3. Creating a Process that implements the business logic.
4. Configuring a Process to define the runtime behavior of the process.
5. Adding activities to the process that describe the tasks in the business logic.
6. Connecting Activities with Transitions to describe the business process flow between activities in a
process.
7. Configuring the input and output data for the activities. See Working with Standard Activity
Features for details.
At run time, the process engine executes the process definition and creates an instance of the process
definition called a job. A job automates your business process by executing what is described in the
process definition.
Conceptual information about processes and their use is provided in the Concepts guide.
Creating an Application Module
Application modules are packages containing one or more processes, shared resources, and metadata
such as name, version, dependencies, and so on.
The New BusinessWorks Application Module wizard helps create an application module. There are
multiple ways to launch the wizard:
●
From the main menu, select File > New > BusinessWorks Resources and then select
BusinessWorks Application Module.
●
Right-click in the Project Explorer view and choose New > BusinessWorks Application Module.
Specify the values for the following fields in the wizard:
1. Project name: Name of the application module.
2. Use default location: Specifies the location on disk to store the application module's data files. By
default, this value is set to the workspace. To change, clear the check box and browse to select the
location to be used.
3. Version: Version of the application module.
4. Create empty process: Selected by default to create an empty process with the specified name
(default: Process). Clear the check box if you do not want to create an empty process.
5. Create Application: Selected by default to create an application with the specified name. Clear the
check box if you do not want to create an application.
6. Use Java Configuration: Select to provide the Java tooling capabilities in your module. Selecting this
option creates a Java module.
7. Click Finish.
TIBCO ActiveMatrix BusinessWorks™ Application Development
28
Package names must be unique within an application. If there are two packages with the same name in
an application, then you must either rename one of the packages or remove one of the packages from
the application.
Result
An application module with the specified name is created and opened in the workbench. If the options
to create an empty process and an application were selected, the process and application with the
specified names are also created.
Creating a Shared Module
Shared modules are the smallest unit of resources that are named, versioned, and packaged as part of
an application and can be used by other modules that are part of the same application.
The New BusinessWorks Shared Module wizard helps create a shared module. There are multiple ways
to launch the wizard:
●
From the main menu, select File > New > BusinessWorks Resources and then select
BusinessWorks Shared Module.
●
Right-click in the Project Explorer view and select New > BusinessWorks Shared Module.
Specify the values for the following fields in the wizard:
1. Project name: Name of the shared module.
2. Use default location: Specifies the location on disk to store the shared module's data files. By
default, this value is set to the workspace. To change, clear the check box and browse to select the
location to be used.
3. Version: Version of the shared module.
4. Use Java Configuration: Select to provide the Java tooling capabilities in your module. Selecting this
option creates a Java module.
5. Click Finish.
Result
A shared module with the specified name is created and opened in the workbench.
Exporting a Shared Module as a Binary Shared Module
You can create a binary shared module from a shared module. However, you cannot convert a binary
shared module to a regular shared module.
To export a shared module as a binary shared module, begin by implementing the process you want to
share. The process must have a descriptive name and a description. Next, test the process by calling it
from a test application. Once satisfied, you create a zip archive file for the project which contains the
process and distribute that zip using a mechanism such as email, FTP, or a web page, that is external to
TIBCO Business Studio.
Back up the shared module by exporting the project as an archive file. To do this, select Export > Studio
Projects to Archives.
TIBCO ActiveMatrix BusinessWorks™ Application Development
29
TIBCO Business Studio
To export a shared module as a binary shared module from TIBCO Business Studio, follow these steps.
Procedure
1. In Project Explorer, right-click on the shared module folder, and choose one of the following options
to begin exporting the shared module as a binary shared module:
●
Select Export > Export. In the Export dialog, expand the General node, select Binary Shared
Modules to Archive, and click Next.
●
Select Export > Binary Shared Modules to Archive.
2. Select the checkbox next to the shared module that you want to convert to a binary shared module.
3. In the To Archive File field, navigate to the folder where you want it created and enter a name for
the binary shared module you want to create and click Save.
4. Click Finish in the Export Project dialog.
Result
The shared module is exported as a binary shared module.
To confirm the shared module was successfully exported as a binary shared module, import the binary
shared module into a new workspace, and expand the project. All application folders and details, with
the exception of the folders under the Module Descriptors folder, are hidden. Optionally, check the
MANIFEST.MF file, and confirm the TIBCO-BW-SharedModuleType header is set as follows:
TIBCO-BW-SharedModuleType: binary
CLI
To export a shared module as a binary shared module from the command line, follow these steps:
Prerequisites
●
Start the bwdesign utility. To do this, follow these steps:
1.
Open a terminal and navigate to BW_HOME\bin.
TIBCO ActiveMatrix BusinessWorks™ Application Development
30
2.
●
Type bwdesign
-data <TIBCO_BusinessStudio_workspace_absolutePath>.
bwdesign -data C:\myWorkspace.
For example,
Back up the shared module by exporting the project as a zip or EAR file. To do this, type -export
[options] [projects] [outputfolder]
Type export -binary <shared_module> . For example, export -binary shared_petstore.
Optionally, type export -bin <shared_module>. For more details about the -binary and -bin
commands, type export --help .
Result
The shared module is exported as a binary shared module.
To confirm the shared module was exported as binary shared module, import the binary shared
module into a new workspace by typing bwdesign -data
<TIBCO_BusinessStudio_workspace_absolutePath>. After doing this, expand the project in the
Project Explorer to verify that all application folders and details, with the exception of the folders under
the Module Descriptors folder, are hidden. Optionally, check the MANIFEST.MF file, and confirm the
TIBCO-BW-SharedModuleType header is set as follows:
TIBCO-BW-SharedModuleType: binary
Using Binary Shared Modules in your Project
To use a binary shared module, you begin by importing the archive into your workspace where it
appears like any other shared module, except that the internal details of the shared module are not
visible. You use a binary shared module in the same way as you would use any other shared module.
You can see the processes in the Project Explorer but cannot view their diagrams in the Process Editor
or open them with a text editor to decipher their models.
You can see the following artifacts associated with a binary shared module:
●
Process and package name
●
XML schema files associated with the module
Since the schema files are in plain text, you will be able to modify them. Keep in mind
though that if and when you import a newer version of the module into your workspace,
your modifications to the schema files will be overwritten.
●
Shared resources - you can reference them, but cannot edit them
●
Module Descriptor folder - only the Overview item is available under this folder
●
Module Descriptor editor will be able to display the Overview page only. All other fields will be
disabled
You can implement a Call Process activity that invokes the functionality in the binary shared module.
When deploying your application, the binary shared modules are included in the application like any
other shared module.
Difference between a Shared Module and a Binary Shared Module
This section describes the difference between a shared module and a binary shared module.
In Project Explorer
The image below shows you the difference between a shared module (shared5, in the image below) and
a binary shared module (shared4). Notice that almost all the editable artifacts (such as Module
Properties, Dependencies and Shared Variables) are missing from the binary shared module tree. This
is one way to prevent the binary shared module from being edited.
TIBCO ActiveMatrix BusinessWorks™ Application Development
31
Menu Items
At the project level some of the context menus items are disabled in the binary shared modules. At the
resource level all the menu items except for Show Properties View are disabled.
Context
Menu
Shared Module
Binary Shared Module
At the
project
level:
Right-click
menu from
process
name
TIBCO ActiveMatrix BusinessWorks™ Application Development
32
Context
Menu
Shared Module
Binary Shared Module
Repair
BusinessW
orks Project
dialog
Context
menus at
Processes,
Service
Descriptors
, Resources,
and
Schemas
level
Public Processes and Internal Processes
A binary shared module can contain two types of processes - public processes and private (internal or
inline) processes. While a public process in a binary shared module can be called by an application, a
private process within the module is meant for consumption by the public processes within that binary
shared module only. By default, the private processes are not visible in the Project Explorer.
To view the private processes in the Project Explorer, do the following:
1. In the Project Explorer, click the View Menu button ( ) and select Customize View.
TIBCO ActiveMatrix BusinessWorks™ Application Development
33
2. In the Available Customizations dialog, uncheck the BW binary private processes check box and
click OK.
Creating a Process
Processes are always contained in a process package. When creating a process, either create a new
process package or select an existing package in which the new process is to be created.
Prerequisites
A module must exist to which processes can be added. If a module does not exist, create a new module
before creating a process.
The BusinessWorks Process Creation wizard helps create a generic business process. By default, it is
configured to create a process with name Process. There are multiple ways to launch the wizard:
●
From the main menu, select File > New > BusinessWorks Resources and then select
BusinessWorks Process.
●
From the Module Descriptors > Overview getting started area, click
BusinessWorks Process.
●
Right-click on the Processes folder in the Project Explorer view, and then select New >
BusinessWorks Process.
Create a New
Specify the values for the following fields in the wizard:
1. Process Folder: Name of the module and the Process special folder where the process will be
located. You can add multiple folders in Project Explorer and then update this field to select the new
folder. For example: bw.test.app/Processes.
2. Package: Name of the package in the module where the new process is added. Accept the default
package, or browse to select a different package name. For example: bw.test.app.main.
3. Process Name: Name of the new process. For example: MainProcess
4. Modifiers: Designate whether the process will be public or private. This can be changed later.
5. Patterns: Choose the pattern Empty Process when creating a process.
To create a subprocess, choose the pattern Subprocess. See Creating Sub-Processes for
details on creating a subprocess.
6. Click Finish to create a new empty process.
Result
A process with the specified name is created and opened in the Process Editor.
What to do next
After creating the process proceed to:
●
Configure the process as described in Configuring a Process.
●
Add activities to the process as described in Adding Activities.
TIBCO ActiveMatrix BusinessWorks™ Application Development
34
Configuring a Process
Process configuration defines the behavior of a process at runtime. You can specify, or edit, the
modifiers, mode, and activation type for a process. You can also define process properties and process
variables, add or remove services and references, and configure the process dependencies.
Prerequisites
Open a process in TIBCO Business Studio if it is not already open and go to the Properties view.
Procedure
● Configure the properties for a process by selecting the appropriate tab in the Properties view.
Property
Name
Description
Package
Displays the name of the package containing the package. This field is not
editable.
Name
Name of the process. This field is not editable.
Target
Namespace
Target namespace for the process. You can specify a different target namespace for
the process.
Modifiers
Modifiers define the visibility of the process outside its package:
Mode
Activation
●
Public: can be invoked by processes that are defined either inside or outside
the package.
●
Private:
can be invoked only by processes that are part of the same package.
Mode defines whether the process depends on the engine to maintain its state:
●
Stateful:
relies on the ActiveMatrix BusinessWorks engine to maintain its
state across invocations.
●
Stateless:
requires the ActiveMatrix BusinessWorks engine to maintain its
state across invocations
Activation mode for a process defines the way in which processes are activated at
runtime.
●
Multiple AppNodes: At runtime, the application is distributed and activated
on all the AppNodes in the AppSpace. In the event of a failure on one of the
AppNodes, the application continues to run with fewer AppNodes.
●
Single AppNode: At runtime, the application is activated on only one
AppNode in the AppSpace. In the event of a failure, another AppNode will be
activated and any check pointed data can be recovered.
This feature requires the engine persistence mode to be set to group and
the database and group provider to be configured. See Configuring
Database for the Engine and Configuring the Engine for Group
Persistence Mode for details.
Activity Error By default, this check box is selected for migrated processes. During migration,
Variable
activity error variables are created for activities in the process that contain error
transitions. Additional activity error variables are also created for activities with
fault types, and or, if new activities with fault types are added to the process.
TIBCO ActiveMatrix BusinessWorks™ Application Development
35
Property
Name
Description
If you are configuring a process created in ActiveMatrix BusinessWorks 6.x, and
you select this check box, activity error variables are created for activities in the
process that have fault types. If new activities with fault types are added to
process, additional activity error variables are created.
De-selecting this check box removes activity error variables created for activities
with fault types. Global error variables and activity error variables for activities
with error transitions are not affected.
Creating a Subprocess
Subprocesses are designed for complex business processes to make the main process easier to
understand and debug. Subprocesses are called inside the main process and their output is used in the
main process.
The BusinessWorks Process Creation wizard helps create a subprocess. There are multiple ways to
launch the wizard:
●
From the main menu, select File > New > BusinessWorks Resources and then select
BusinessWorks Sub Process.
●
From the Module Descriptors > Overview getting started area, click
BusinessWorks Sub Process.
●
Right-click on the Processes folder in the Project Explorer view, and then select New >
BusinessWorks Sub Process.
●
Right-click on the Processes folder in the Project Explorer view, and then select New >
BusinessWorks Process.
Create a New
Specify the values for the following fields in the wizard:
1. Process Folder: Name of the module and the special folder where the subprocess will be located.
2. Package: Name of the package in the module where the new subprocess is to be added. Accept the
default package, or browse to select a different package name.
3. Process Name: Name of the subprocess.
4. Modifiers: Designate whether the process will be public or private. This can be changed later.
5. Interface Mechanism: Select either Direct or Service.
●
Direct: Select this option to create a non-WSDL-based subprocess. When you select this option,
a new subprocess, containing a Start and End activity, is created.
●
Service: Select this option to create a WSDL-based subprocess. Next, choose one of the
following options:
—
Default: Select Inline to create an inline subprocess. Select Standalone to create a
standalone subprocess.
—
Custom: Select this option and click Next to create a new WSDL interface or use an existing
WSDL interface for the subprocess.
6. Click Finish to create a service subprocess.
TIBCO ActiveMatrix BusinessWorks™ Application Development
36
Result
A subprocess with the specified name, and containing a Start and End activity, is created and opened in
the Process Editor.
Parent Process and a SubProcess Example
Consider an example that illustrates how a parent process is designed to call a subprocess and
collect data from that subprocess.
The parent process consists of a getEvent activity that calls the subprocess.
Parent Process
The subprocess implements the interface getEvent and returns the output back to the parent
process. The parent process then logs the output received from the subprocess in a log file.
Sub Process
Creating an Activator Process
An activator process consists of two service operations, On StartUp and On ShutDown, which can be
used to perform tasks when an application starts or after an application stops.
An application module can contain only one activator process. The following steps describe how to
create an activator process for an application module.
Procedure
1. From the Module Descriptors > Overview > General Information area, click the
the Activator Process field.
icon in front of
TIBCO ActiveMatrix BusinessWorks™ Application Development
37
2. Review the fields in the Create Activator Process wizard and click Finish to create an activator
process.
Result
An activator process with the service operations On StartUp and On ShutDown is created.
Adding Activities
Activities are the individual units of work in a process.
There are multiple ways to add activities in a process: from the right-click menu on the Process Editor,
from the palettes, and from the File Explorer or Project Explorer.
Adding Activities from the Palettes
To add an activity to a process using the palette:
1. In the Palette view, select a palette from the library. All the activities available in the palette are
displayed.
TIBCO ActiveMatrix BusinessWorks™ Application Development
38
2. Select the activity that you want to add and drop it onto the process in Process Editor.
3. Configure the activity by specifying the values for the properties in the Properties view. The
configuration properties are grouped under different tabs such as General, Description, Input,
Output, Conversation, and so on. For example, upon adding a Log activity, you can configure it by
specifying the values for the properties under the tabs: General, Description, and Input. See
Working with Standard Activity Features for details.
General and Description tabs are available for all activities to enter their name and a short description.
Depending on the activity, these tabs may include additional fields such as variables, time, shared
configurations, and other values that are required by the activity. Activities can also contain additional
tabs such as Input, Output, Conversation, Fault, and so on.
Adding Activities From the Project Explorer
You can add pre-configured activities to a process by dragging-and-dropping a selected resource such
as a schema (XSD) or WSDL file from the Project Explorer. To do so, follow these steps:
1. In the Project Explorer, select a file such as a WSDL file that you want to use to create an activity.
2. Drag and drop the resource onto an existing process. The software parses the resource and provides
a menu consisting of a list of pre-configured activities.
3. From the menu, select the activity you want to add to the process.
In the example, drag and drop the file HelloWorld.wsdlEcho.wsdl from the Project Explorer onto the
process. A menu with a list of activities is presented. Select an activity to be added to the process.
Drag-and-Drop a Resource
An activity is connected to another activity by dragging the [+] symbol, positioning and dropping it,
and then selecting the next activity from the menu selection. See Working with Transitions for details.
Adding Activities From the File Explorer
You can add pre-configured activities to a process by dragging-and-dropping a selected file such as an
XML file from the File Explorer. To do so, follow these steps:
1. In the File Explorer, select a file you want to use to create an activity.
2. Drag and drop the resource onto an existing process. The software parses the resource and provides
a menu consisting of a list of pre-configured activities from the File palette.
3. From the menu, select the activity you want to add to the process.
TIBCO ActiveMatrix BusinessWorks™ Application Development
39
In the example, drag and drop the file Book-0001.xml from the File Explorer onto the process. A menu
with a list of activities is presented. Select an activity to be added to the process.
Drag-and-Drop a Resource
An activity is connected to another activity by dragging the [+] symbol, positioning and dropping it,
and then selecting the next activity from the menu selection.
Working with Transitions
Transitions are used to connect two activities to represent the flow of process execution from one
activity to the other.
Transitions are added between activities in a process and are configured to fit the process goal.
Adding a Transition
You can choose to add a transition in one of the following ways:
●
Click the Create a Transition icon
activities that are to be connected.
in the Palette view's toolbar and draw a line between two
●
Select the beginning activity of the transition, click the icon
ending activity of the transition.
and drag and drop it on to the
Configuring a Transition
After creating a transition specify the configuration information in the General tab of the Properties
view:
1. Label: Add a label for the transition that will be available in the diagram. This label can be changed
later.
2. Fill Color: Select Color for the transition from the basic colors or define a custom color. Color coding
helps you distinguish among different transitions based on the conditions that are defined for them.
The default color for Error is red, while the default color for other transition types is black.
TIBCO ActiveMatrix BusinessWorks™ Application Development
40
3. Condition Type: Select the type of the condition for the selected transition: Success, Success with
condition, Success with no matching condition, and Error.
You can define several types of conditions for a transition:
Success
Take this transition unconditionally. If the activity completes successfully, always transition to the
activity the transition points to. This is the default condition for transitions.
Success with Condition
Specify a custom condition using XPath. If the activity completes successfully, and the condition
evaluates to true, take the transition to the pointed-to activity.
Success with no Matching Condition
Take this transition when the activity completes successfully but only if no other transitions are taken.
This is useful when multiple transitions with conditions are drawn to other activities. This condition
type can be used to handle any cases not handled by the conditions on the other transitions.
Error
Take this transition if there is an error during the activity processing.
Error Transitions
Error transitions are taken if there is an error during the processing of an activity or group. When an
activity or group throws an error or fault, none of the success conditions are taken; only the error
transition is executed. An error transition can be added to process starter activities, signal-in activities,
regular activities, and groups.
Activities and groups only support one error transition at a time.
Working with Standard Activity Features
Specify the required configuration elements to make the activity work. These configuration elements
are available in the Properties view.
Each activity usually has two or more of the following tabs for specifying the characteristics of the
activity:
General
This tab is available for all activities. In addition to the name of the activity, it also sets other
parameters such as questions about directories and overwriting for file activities, class name for Java
activities, host name, and port number for mail activities, modifiers, mode, and activation settings.
Description
This tab is available for all activities. You can write down any information you need to preserve for the
activity.
Statement
This tab is available for query activities; used to define, validate, and execute a query.
Advanced
You can specify any advanced configuration parameters here.
Event
For activities that wait for incoming events, such as incoming TIBCO Rendezvous™ messages, this tab
specifies the timeout for the incoming event.
Conversations
TIBCO ActiveMatrix BusinessWorks™ Application Development
41
Used to add new conversations. See Using Conversations for details about conversations.
Input Editor
Used to edit an output element by adding a complex anonymous type, complex element, primitive
element, and so on. Not all activities have this option enabled. For more details see Input and Output.
Input
Using the tab you can map and transform output data from the previous activities in the process
(including the event that starts the process) to input data for Input the activity. For more details see
Input and Output.
Output Editor
This tab is used to choose or configure the output header element. Not all activities have this option
enabled. For more details see Input and Output.
Output
This tab displays the output of the activity’s data to the activities that follow in the process definition.
For more details see Input and Output.
Fault
Lists the activity faults or various exceptions that might occur with this activity, such as
FileNotFoundException or IllegalCopyException.
Input and Output
The Input tab is used to enter the data for an activity and the Output tab displays the output schema of
an activity.
Configuring the Input Tab
The Input tab is available in the Properties view and is used to enter data for an activity. Input data for
an activity can be any of the following:
●
Constant/Literal specified using numbers or strings enclosed in quotes.
●
Regular Expression specified using an existing schema item or by keying in a constant expression in
the field.
●
Mapping the output from previous activities to the current activity's input. Using the mapper, you
can choose functions or constants from the Functions and Constants tabs with the mapped data.
Input Tab
To create a mapping:
1. Click on the desired item in the available schema in the Data Source panel. Drag the item to the
desired item in the Activity Input panel.
2. To type in a constant or expression, click on the schema item in the Activity Input panel and type
the constant or expression into the field.
TIBCO ActiveMatrix BusinessWorks™ Application Development
42
Configuring the Input Editor Tab
Using the Input Editor tab you can configure the input data for an activity.
Input Editor Tab
Instead of specifying a constant or an expression for the schema item, you can first configure the
sequence in which this message will appear by setting up the element it is contained in.
You can define the sequence of an element using the icons on the right:
1.
2.
Add Complex Anonymous Type: Adds an element sequence that is defined by the following:
a.
Schema type definition or creating a new type definition.
b.
Number of Minimum Occurs (default is 1).
c.
Number of Maximum Occurs (1 or unbounded).
d.
Number of references to this resource (generated, in this case it is 0).
e.
Initiate Rename Schema Element: rename the schema element by entering the New Name and
choosing the option whether to update the references to this element.
f.
The remaining icons are Go To
general editing tools.
, Accept Changes
, and Delete
, which invoke the
Add Complex Element: This option adds a complex element that you can further define by the
following:
a.
The schema type definition or a new type definition (default is anyType)
b.
Number of Minimum Occurs (default is 1).
c.
Number of Maximum Occurs (1 or unbounded).
d.
Number of references to this resource (generated, in this case it is 0).
e.
Initiate Rename Schema Element: rename the schema element by entering the New Name and
choosing the option whether to update the references to this element.
TIBCO ActiveMatrix BusinessWorks™ Application Development
43
f.
3.
4.
The remaining icons are Go To
general editing tools.
, Accept Changes
, and Delete
, which invoke the
Add Primitive Element: This option adds a primitive element that you can further define by
the following:
a.
Choosing by the Primitive Types: String, Integer, Decimal, Boolean, Date&Time, Binary, URI or
Any.
b.
Choosing by the Primitive Sub Types: String, Normalized String, Token, Language, Name. NCName, Q-Name, Name Token, Name Tokens, ID, ID ref, ID refs, Entity, and Entities.
c.
Number of Minimum Occurs (default is 1).
d.
Number of Maximum Occurs (1 or unbounded).
e.
Number of references to this resource (generated, in this case it is 0).
f.
Initiate Rename Schema Element: rename the schema element by entering the New Name and
choosing the option whether to update the references to this element.
g.
The remaining icons are Go To
general editing tools.
, Accept Changes
, and Delete
, which invoke the
Add Reference Element: This option adds a reference element that you can further define by
the following:
a.
The schema type definition or a new type definition.
b.
Specifying the Minimum Occurs number (default is 0).
c.
Selecting from the drop-down list the Maximum Occurs number (1 or unbounded.)
d.
The remaining icons are Go To
general editing tools.
5.
, Accept Changes
, and Delete
, which invoke the
Add Attribute: This option adds an attribute that you can further define by the following:
a.
Choosing by the Primitive Types: String, Integer, Decimal, Boolean, Date&Time, Binary, URI or
Any.
TIBCO ActiveMatrix BusinessWorks™ Application Development
44
b.
Choosing by the Primitive Sub Types: String, Normalized String, Token, Language, Name. NCName, Q-Name, Name Token, Name Tokens, ID, ID ref, ID refs, Entity, and Entities.
c.
Use Optional/Required (default is Optional).
d.
The remaining icons are Go To
general editing tools.
6.
, Accept Changes
, and Delete
, which invoke the
Add Any Element: This option adds an element that you can further define by the following:
a.
Wildcard Namespace (a space-delimited list of the namespaces can be entered).
b.
Entering the Minimum Occurs number (default is 0).
c.
Selecting from the drop-down list the Maximum Occurs number (1 or unbounded.)
d.
The remaining icons are Go To
general editing tools.
, Accept Changes
, and Delete
, which invoke the
Viewing the Output Tab
The Output tab is available in the Properties view and is used to display the activity output schema.
The output of an activity is displayed for informational purposes only and cannot be modified or
altered.
The output tab displays the activity output schema. This name appears in subsequent activities input
tabs. The activity output data is displayed for informational purposes only and cannot be modified or
altered.
Output Tab
Configuring the Output Editor Tab
Input Editor allows for GUI based approach in configuring the output data.
TIBCO ActiveMatrix BusinessWorks™ Application Development
45
Output Editor Tab
Using the icons on the right, additionally define the Name in element. The icons have same meaning as
when used for the Input Editor.
Creating a Module Property
Module properties can be used to define configuration for shared resources, policy resources, and
activities. Activities can use process properties or module properties. When a module property is
referenced directly in an activity, a new process property is created automatically and mapped to
module property with same name as the module property.
To create a module property, follow these steps:
Procedure
1. Expand the module in Project Explorer.
2. Expand Module Descriptors.
3. Double-click Module Properties.
This opens the Module Properties page in the right pane.
4. Click New Property to create a new module property.
5. Edit the name of the property by clicking its default name in the Groups/Properties column.
6. Optional. Change the property type by clicking in its Type column and selecting a type from the
drop-down list.
7. Enter a value for the property by clicking in its default column.
You can organize the related properties into various groups. To create a group, click New Group
and then move the property under the group using the Move Up or Move Down buttons.
Editing a Module Property
You can edit a module property from the Module Properties page or override its value from the
Properties page that is accessed from the application. Before you edit a module property, keep in mind
that the change will be propagated to any activity, binding, or shared resource that uses or references
the property.
To edit the value of a module property, do the follow these steps:
Procedure
1. In Project Explorer, expand the application module completely and double-click Module
Properties to open the Module Properties page in the right pane. Alternatively, to open the
Properties page, expand the application completely and double-click Properties.
TIBCO ActiveMatrix BusinessWorks™ Application Development
46
2. Double-click in its [default] column and enter a new value or edit the existing value.
3. Save the application.
The value of the property changes color from black to blue. If you edit the module property value in
the Properties page accessed from the application, it will override the original value of the property
that was defined in the Module Properties page.
Promoting Module Properties for Visibility at the Application Level
Module properties in an application module are visible and applicable only to the module in which
they were created. They are internal to the application module and are not available at the application
level.
To promote a module property to the application level, do the following:
Procedure
1. In Project Explorer, fully expand the application and double-click Properties under Package Unit.
This opens the Properties editor in the right pane which displays both application properties as well
as the module properties.
2. Expand the application module name, select the module property, and double-click its value
column ([default]) to reveal the edit buttons.
3. Click the
button to promote the module property to the application level and save the
application.
The property should appear under Application. Also, the value of the original module property
will change color to blue and enclosed in %% indicating that the property has been promoted. The
property will now be visible at the application level.
To revert the promotion, double-click the [default] column and click the
button. This removes
the mapping of the promoted application property from its source module property but will not
delete the promoted property appearing under Application. Make sure to manually delete the
promoted property under Application in order to clean up unwanted properties.
If you edit a module property on this page, its color changes to blue indicating that the value of this
property was overridden.
Deleting a Promoted Property
To delete a promoted property, select it under Application and click Delete.
Importing WSDLs
Follow these steps to import WSDL files from the internet into TIBCO Business Studio.
Procedure
1. Right-click the Service Descriptors folder, and select Import > Import WSDL from URL
2. Enter the URL of the WSDL in the Resource URL field.
The Import Location field is automatically populated with the import location of the WSDL and
XSD files being imported. By default, WSDL file are imported to the Service Descriptors folder and
XSD files are imported to the Schemas folder. You can update these import locations in the wizard.
If you enter a remote WSDL URL, and the WSDL contains dependencies, these
dependencies will be listed in the Dependencies section of the Import WSDL from URL
wizard.
TIBCO ActiveMatrix BusinessWorks™ Application Development
47
3. Optional. Unselect the Update import location attribute and include location attribute to reference
WSDL and XSD files imported locally check box if you do not the import location to be
automatically updated with the relative locations of corresponding and already imported WSDL
and XSD files.
TIBCO ActiveMatrix BusinessWorks™ Application Development
48
Using Additional Features
Complex business processes make use of additional features such as process scopes, fault handlers,
conversations, checkpoints, and so on.
The sections that follow describe how to use the specified feature when developing a process.
Using Scopes
A scope is a group without any conditions that is used to encapsulate activities and variables from the
outer scope.
Prerequisites
Select the activities you want to add to a Scope.
Procedure
1. Right-click on the selection and select Create Group > Scope
.
The selected activities will be encapsulated in a new scope.
2. Configure the new scope from the Properties view.
a) General tab
●
Name: Specify a name for the scope.
Group Type: Default is set to Scope, which is a group of activities without any conditions.
Change the group type to create a group with conditions.
b) Description tab
●
●
Description: Enter a description for the new scope.
c) Variables tab
You can add local variables to the group from the Variables tab. See Adding Scope Variables for
details on adding variables.
A scope variable can override a process variable if they have the same name. Use the Assign activity
to override a process variable with the scope variable.
Adding Scope Variables
A scope variable saves the state within the scope.
To add scope variables, select the scope in the Process Editor and then select the Variables tab in the
Properties view.
Adding a Complex Type Variable
Click the icon
Add complex type Variable and select an existing schema or create a new schema to
be added from the Select Schema Element Declaration dialog box.
Select Schema Element Declaration
Field/Action
Description
Workspace
When selected, the variable is valid only during the designtime.
TIBCO ActiveMatrix BusinessWorks™ Application Development
49
Field/Action
Description
Current and Dependent Modules
When selected, the variable is valid for the current module and
the modules that are dependent on it.
Current Module
When selected, the variable is restricted to the current module.
Display all XSD Elements
Select the check box to display all the XSD elements in the
module. This check box is selected by default.
Include Process Inline Schemas
Select the check box to display the process inline schemas in
the module.
Include WSDL Inline Schemas
Select the check box to display the WSDL inline schemas in the
module.
If you chose an existing schema, click OK to select it. If you choose to create a new schema, click Create
New Schema to create a new XML schema.
Create XML Schema
Field/Action
Description
Resource Name
Specify a name for the new schema.
Workspace Location
Specify a location to store the new schema. The wizard
displays the default location for the particular module. You
can choose to keep the default or browse to select a different
location.
Choose a Root Element
Add a primitive element to the new schema using the icon
Add Primitive Element
.
The new primitive element will appear listed under the root
element. Double-click the element to configure it.
Primitive Types
Select the primitive type for the element from the drop-down
list:
●
String
●
Integer
●
Decimal
●
Boolean
●
Date & Time
●
Binary
●
URI
●
Any
TIBCO ActiveMatrix BusinessWorks™ Application Development
50
Field/Action
Description
Subtypes
Select the subtypes for the element from the drop-down list:
Number of references to this
resource
Initiate Element Rename
Refactoring
Accept Changes
Cancel Changes
Remove Selected Element
●
String
●
Normalized String
●
Token
●
Language
●
Name
●
NC-Name
●
Q-Name
●
Name Token
●
Name Tokens
●
ID
●
ID ref
●
ID refs
●
Entity
●
Entities
Displays the number of references to this resource.
Use to rename the schema element. You can choose to
preview and update all references to the element.
Accept the changes entered for the new schema element.
Cancel the changes accepted for the new schema element.
Any of the element added to the schema can be deleted using
this option.
Click OK when you are done editing the XML schema.
Adding a Simple Type Variable
Add a simple variable by clicking the icon
Add simple type Variable. Select the variable type from
the drop-down list and specify a default value.
Variable Type
Default Value
String
None.
Integer
1
Decimal
1
TIBCO ActiveMatrix BusinessWorks™ Application Development
51
Variable Type
Default Value
Boolean
true (You can select false from the drop-down
list.)
Date & Time
None. Enter a date and time.
XSD Element
To select an XSD element, follow the instructions
provided in Adding Scope Variables
Defining and Using Shared Variables
Shared variables are defined at a module level.
Defining a Shared Variable
Procedure
1. In the Project Explorer view, double-click Shared Variables under the Module Descriptors to open
the Shared Variables tab.
Two panes are displayed:
●
Module Shared Variables
●
Job Shared Variables
2. Click one of the following icons in the respective sections to define a module shared variable or a
job shared variable:
●
●
- Add a complex element. You can choose from an existing schema declaration or create a
new schema.
- Add a simple element.
3. In the Properties view, provide the information as described in the following table.
TIBCO ActiveMatrix BusinessWorks™ Application Development
52
General Tab
Field Name
Description
Variable Name
Name of the shared variable
Type
After adding a complex or simple element, specify
the Module Data type for the shared variable to
use by selecting one of the following options from
the drop-down menu:
Persistent
●
String
●
Integer
●
Boolean
●
Date&Time
●
Complex Element...
By default, the value of a module shared variable
is stored in memory and the current state of the
module shared variable would be lost in case the
engine (or the AppNode) crashes.
Select the check-box to persist the current value of
the module shared variable. The current state of
the variable in the engine's persistent storage is
only updated when the value of the variable
changes. Also, a persistent module shared variable
can be made visible across AppNodes in an
AppSpace when the engine persistent mode is set
to "group".
The engine persistence must be
configured for the current value of the
module shared variable to persist. See
Configuring Database for the Engine for
details.
This check-box only displays when
configuring module shared variables.
Job shared variables cannot be
configured to be persistent.
Description Tab
Description
Description for the shared variable.
TIBCO ActiveMatrix BusinessWorks™ Application Development
53
Initial Value Tab
Field Name
Description
Initial Value
Enter an initial value for the shared variable. Select
one from the following options:
●
None: Specifies that no initial value is set for
the shared variable. Ensure that you set the
value using the Set Shared Variable activity in
the business process before you retrieve the
value of the variable using the Get Shared
Variable activity.
●
Select Value: Select this option to browse and
select a file containing the initial value for the
shared variable.
●
Build Value: Select this option to enter an
initial value for the shared variable.
Retrieving and Assigning a Value of a Shared Variable
To retrieve the value of a shared variable, use the
Get Shared Variable activity in the General
Activities palette. To assign a value to a shared variable, use the
the General Activities palette.
Set Shared Variable activity in
Working with Critical Section Groups
Critical Section groups and shared locks can be used to synchronize access to shared variables.
A Critical Section group allows only one process instance to execute the Critical Section group and its
contents at a time. Use a Critical Section group to contain the activities that access the shared variables,
Set Shared Variable and Get Shared Variable. Once a process instance begins executing a Critical
Section group, other concurrently running process instances that are associated with that Critical
Section group wait at the start of the group until the currently running process instance exits the
Critical Section group. This ensures that the value of the shared variable is not modified while another
process instance is accessing it. See Bindings and Palettes Reference > Basic Activities Palette > Critical
Section for more information about using Critical Section groups and shared locks.
Best Practices
Critical section groups cause multiple process instances to wait for one process instance to execute the
activities in the group. As a result, there may be performance implications when using these groups.
When creating critical section groups, use the following guidelines to avoid potential performance
issues:
●
Keep the duration of a Critical Section group as short as possible. That is, put only a very few
activities in a Critical Section group, and only use activities that execute very quickly.
●
Avoid nesting Critical Section groups. If you must use nesting, ensure that Lock shared
configuration resources are used in the same order in all process definitions. Deadlocks can occur if
you do not specify the Lock resources in the same order in nested Critical Section groups for all
process definitions.
TIBCO ActiveMatrix BusinessWorks™ Application Development
54
●
Do not include any activities that wait for incoming events or have long durations, such as Request/
Reply activities, Wait For, Sleep, or other activities that require a long time to execute.
Using Fault Handlers
Fault handlers are used to catch faults or exceptions and create fault-handling procedures to deal with
potential errors.
Fault handlers are defined at the scope level allowing you to catch faults or exceptions thrown by
activities within a scope. There are two types of fault handlers: Catch Specific Fault and Catch All
Faults.
Fault handlers can be defined at the process level, or at a scope level within a process. The diagram
below shows two fault handlers - one defined at the process level and the other defined at an inner
scope level.
Fault Handler Attached to an Inner Scope
Procedure
1. Select the activities inside the process where the exception is expected to occur and select Create
Scope > Scope from the right-click menu.
2. Move the cursor right underneath the scope's lower border to view the icons to create fault
handlers.
3. Click on one the following:
TIBCO ActiveMatrix BusinessWorks™ Application Development
55
●
Create Catch
●
Create Catch All
to create a fault handler for a specific exception.
to create a fault handler to catch all exceptions.
A new fault handler is added under the scope.
4. Add activities and configure the fault handling procedure inside the fault handler area. For
example, add a Log activity inside the fault handler area to record messages from the exception.
Using Conversations
Conversations are used for stateful business processes, which means that for completion, processes
require correlation of message exchanges. Such processes can be reentrant and so the previous process
context is maintained for continuity.
Conversations are always initiated by one activity and joined by other activities. All operations that are
part of the stateful process must generate a conversation ID and reply to the original client that contains
the conversation ID.
For example, an operation Submit Purchase Order in a stateful process gets the Purchase Order ID in
response. If the client wishes to cancel the purchase order, the client must use this correlation ID
(Purchase Order ID) to invoke the Cancel Purchase Order operation.
Building a Conversation
Procedure
1. Right-click the activity that needs to initiate the conversation and select Conversation > Create New
Conversation.
The Conversations tab in the Properties view displays the conversation name and action 'Initiate'.
2. Right-click the activity that needs to join the conversation and select Conversation > Join
Conversation > Conversation_Name.
The Conversations tab in the Properties view displays the conversation name and action 'Join'.
The Conversations tab of any activity that participates in conversations lists all the conversations it
is participating in.
3. Click on the conversation name to specify the key data.
TIBCO ActiveMatrix BusinessWorks™ Application Development
56
The initiating key is returned as a part of the response, and the client must provide the same key
when calling a related operation the next time. This ensures that the first and second operations are
called by the same client and the two operations are part of the same conversation.
Using Checkpoints
A Checkpoint activity saves the state and data of a process instance so that it can be recovered at a later
time, in case of a failure.
If an ActiveMatrix BusinessWorks engine fails, all processes that have a Checkpoint activity can be
recovered and resume execution from the last checkpoint executed in the process instance.
Only the most recent state is saved by a checkpoint. If you have multiple checkpoints in a process, only
the state from the last executed checkpoint is available for recovering the process.
Checkpoints save the state of the entire process instance. A process (parent process) can call another
process (sub-process) in two ways: in-line and non-inline. An in-line sub-process is executed as part of
the parent process job, while the non-inline sub-process spawns a new job. When a checkpoint activity
is executed in an in-line sub-process, the checkpoint saves the state of the current process instance,
including the state of the parent processes. However, when a checkpoint occurs in a non-in-line subprocess, the checkpoint saves the state of the spawned process instance only.
Checkpoints require the engine persistence mode to be either datastore or group. To configure the
persistence modes, see:
●
For Datastore : Configuring Database for the Engine
●
For Group : Configuring Database for the Engine and Configuring the Engine for Group Persistence
Mode
If the engine persistence mode is not configured with the correct value, an application with Checkpoint
activity encounters an error at deployment.
Recovering After a Failure
Following a crash, when the engine is restarted, the process instances are recovered from the last
checkpoint automatically. That is, all process instances that were check pointed will continue processing
from the last executed checkpoint activity.
Ensure that the process has all of the data required to continue processing following a recovery. When
placing your checkpoint in a process, be careful with certain types of process starters or incoming
events, so that a recovered process instance does not attempt to access resources that no longer exist.
For example, consider a process with an HTTP process starter that takes a checkpoint after receiving a
request but before sending a response. In this case, when the engine restarts after a crash, the recovered
process instance cannot respond to the request since the HTTP socket is already closed. As a best
practice, place the response activity before the checkpoint so that any response is sent before a
checkpoint is taken. Also, do not place the Checkpoint activity in a critical section or an event handler.
Test checkpoints in your applications through the Admin UI or with bwadmin.
Using Coercions
In some scenarios, the datatype of a Data Source element might be undefined. If you know the datatype
of an element, you can coerce the element into a specific type using the Add/Edit Coercion... option in
TIBCO Business Studio. Additionally, you can use the Add/Edit Coercion... option to create, modify, or
delete coercions for any element in the Data Source schema.
TIBCO ActiveMatrix BusinessWorks™ Application Development
57
Adding a Single Coercion
To add a single coercion to an element, follow these steps.
Procedure
1. From the Data Source tab, select the element type of an element, right-click on the element and
select Add/Edit Coercion....
2. In the Coercion window, click the
icon to add a coercion for the selected element.
3. Accept the default option for the Component Type field.
4. Select a schema for the Namespace field by choosing an option from the drop-down menu, or click
the browse icon
to view a list of available schemas in the application module.
5. Click the Type field, to select an element type.
Ensure that the Type you select is an extension of the base type.
6. Optional. Select the Cardinality check box, and choose one of the following options from the dropdown menu:
●
Optional (?): Selecting this option sets the cardinality to zero to 1.
●
Exactly one: Selecting this option sets the cardinality to 1.
●
Repeating (*): Selecting this option sets the cardinality to 0 to infinity.
●
At least one (+): Selecting this option sets the cardinality to 1 to infinity.
7. Click OK to coerce the element type to be the datatype of the selected schema element.
Result
In the Data Source tab, the element of the selected datatype is replaced with the schema you specified.
The coerced element can be mapped to any element in the Activity Input panel.
In the image below, the coerced element displays with the
type you selected in parenthesis.
icon in front of the element name, and the
TIBCO ActiveMatrix BusinessWorks™ Application Development
58
Adding Multiple Coercions
To add a single coercion to an element, follow these steps.
Procedure
1. From the Data Source tab, select the element type of an element, right-click on the element and
select Add/Edit Coercion....
2. In the Coercion window, click the
icon to add a coercion.
3. Accept the default option for the Component Type field.
4. Select a schema for the Namespace field by choosing an option from the drop-down menu, or click
the browse icon
to view a list of available schemas in the application module.
5. Click the Type field, to select an element type.
Ensure that the Type you select is an extension of the base type.
6. Optional. Select the Cardinality check box, and choose one of the following options from the dropdown menu:
●
Optional (?): Selecting this option sets the cardinality to zero to 1.
●
Exactly one: Selecting this option sets the cardinality to 1.
●
Repeating (*): Selecting this option sets the cardinality to 0 to infinity.
●
At least one (+): Selecting this option sets the cardinality to 1 to infinity.
7. Click OK.
Result
In the Data Source tab, the coerced element displays two types. Either type can be mapped to an
element in the Activity Input panel.
Editing Coercions
To edit a coerced element, follow these steps.
Procedure
1. From the Data Source tab, select the element type of an element, right-click on the element and
select Add/Edit Coercion....
2. In the Coercion window, select the Type to coerce the element to use.
TIBCO ActiveMatrix BusinessWorks™ Application Development
59
3. Modify the ComponentType, Namespace,Type and Cardinality fields as needed.
4. Click OK.
Result
In the Data Source tab, the coerced element displays the new type you selected.
Removing Coercions
You can remove individual coercions from an element, or you can remove all coercions and return the
element to its original state.
Removing Individual Coercions
1. From the Data Source tab, select the element type of an element, right-click on the element and
select Add/Edit Coercion....
2. In the Coercion window, select the Type to remove, and click the
icon.
In the Data Source tab, the element no longer displays the type you removed.
Removing All Coercions
icon
To remove all coercions from an element, select the Add/Edit Coercion... option, and click the
in the Coercion window. Optionally, you can right-click on the coerced element, and select Remove
Coercion to remove all coercions. Once all coercions are removed from the selected element, and the
element returns to its original state.
Configuring Database for the Engine
Checkpoint activity and other persistence features require the engine persistence mode
(bw.engine.persistenceMode) to be configured for a datastore or group mode. When the engine
persistence mode property is configured for datastore or group mode, the engine requires a database
configuration.
Procedure
1. Scripts for creating the engine database for various database types are located at BW_HOME/config/
dbscripts/engine. Based on whether the engine persistence mode property is configured for
datastore mode or group mode, complete one of the following steps:
a) If the engine persistance mode property is set to datastore mode, run the bundled scripts
create.sql and create-scp.sql to create the engine database.
b) If the engine persistance mode property is set to group mode, run the bundled scripts
create.sql and create-dcp.sql to create the engine database.
2. To change the engine persistence mode, run the utility to set the persistence mode property
bw.engine.persistenceMode to datastore or group, and then configure the engine database
connection details.
bw.engine.persistenceMode=[datastore | group]
Before updating the AppSpace configuration, you must stop the AppSpace if it is running.
The database connection configuration can be specified at the AppSpace or the AppNode level. The
database connection details specified at the AppSpace level will apply to all AppNodes within the
AppSpace. The configuration specified at the AppNode level takes precedence over the
configuration specified at the AppSpace level.
TIBCO ActiveMatrix BusinessWorks™ Application Development
60
When the engine persistence mode property is set to group, the database connection configuration
must be specified only at the AppSpace level.
When the engine persistence mode property is set to datastore, the database connection
configuration cannot be shared by two or more AppNodes in the same AppSpace. As a result, the
database connection configuration can be specified at the AppSpace level only if the AppSpace
contains a single AppNode. For an AppSpace that contains two or more AppNodes, each AppNode
requires a unique database and the database connection configuration must be specified at the
AppNode level.
3. To set database configuration properties at the AppSpace level, follow these steps:
Ensure you are using a different database instance for each AppSpace. To do this with a
single database, create a tablespace or schema for each AppSpace.
a) Copy the existing AppSpace config.ini file (located in the root of the AppSpace folder), or the
AppSpace config.ini template file appspace_config.ini_template (located in BW_HOME/
config/) to a temporary location.
b) Edit the engine persistence mode property, bw.engine.persistenceMode, and set it to
datastore or group.
bw.engine.persistenceMode=[datastore | group]
c) Configure the following database connection properties in the BW Engine datastore
configuration section of the config.ini file:
#-----------------------------------------------------------------------------# Section: BW Engine Database Configuration.
#
# The properties in this section are applicable to the BW Engine database.
# All properties in this section are required when the BW Engine
# property "bw.engine.persistenceMode" set to "datastore" or "group".
#
-----------------------------------------------------------------------------# BW Engine Database Driver.
bw.engine.db.jdbcDriver=org.postgresql.Driver
# BW Engine Database URL.
bw.engine.db.url=jdbc:postgresql://<servername>:<portnumber>/<dbname>
# BW Engine Database User Name.
bw.engine.db.userName=user1
# BW Engine Database User Password.
bw.engine.db.password=
# BW Engine Database Connection Pool Size.
bw.engine.db.maxConnections=15
When setting the password property (bw.engine.db.password), the default format is plain text.
Execute the command bwadmin obfuscate, or the command bwobfuscator, from the command
line to encrypt the password; use the generated encrypted text as the password.
The bwadmin bwenginedb command will display BW engine datastore configuration
settings.
4. To set the database for datastore mode at the AppNode level, follow these steps:
a) Copy the existing AppNode config.ini file (located in the root of the AppNode folder) to a
temporary location.
b) Set engine persistence mode property bw.engine.persistenceMode to datastore and
configure engine database connection details.
bw.engine.persistenceMode=[datastore]
c) Configure the engine database connection properties in the BW Engine datastore configuration
section of the config.ini file. By default, the AppNode config.ini file does not contain these
properties. Copy these properties from the AppSpace config.ini template file ,
appspace_config.ini_template, located in BW_HOME/config to the AppNode config.ini file
and provide the database connection details.
TIBCO ActiveMatrix BusinessWorks™ Application Development
61
5. Use one of the following config admin commands to push the configuration to the AppSpace or
the AppNode:
●
AppSpace:
bwadmin[admin] > config -d myDomain -a myAppSpace -cf <temporaryLocation>/
config.ini
●
AppNode:
bwadmin[admin]> config –d myDomain –a myAppNode –cf <temporaryLocation>/
config.ini
6. Restart the AppSpace.
7.
Before you clean the engine database, ensure that you have backed up all important data.
To clean the engine database that is configured for datastore mode, run the drop.sql and dropscripts. If the engine database is configured for group mode, run the drop.sql and dropdcp.sql scripts.
scp.sql
Result
You used the bwadmin command line to set the database configuration property. You can also use the
Admin UI to set this property. See the following topics:
●
Editing an AppSpace Configuration
●
Editing an AppNode Configuration
Configuring the Engine for Group Persistence Mode
The managed fault tolerance feature requires the engine persistence mode to be configured for the
mode. The group mode also supports the Checkpoint activity and other persistence features.
When configured for the group persistence mode, the engine requires both a database and a group
provider, such as TIBCO Enterprise Message Service™ (EMS) or TIBCO FTL®, to be configured.
group
Refer to the following topics for instructions about setting TIBCO EMS or TIBCO FTL as the group
provider technology for the engine:
●
Configuring EMS as the Group Provider for Engine
●
Configuring FTL as the Group Provider for Engine
Configuring EMS as the Group Provider for Engine
Follow these steps to configure the engine for group persistence mode, and to set TIBCO EMS as the
group provider technology.
Procedure
1. Create the engine database by executing the bundled scripts create.sql,create-scp.sql and
create-dcp.sql. Scripts for creating the engine database for various database types are located in
BW/Home/config/dbscripts/engine. The engine directory contains folders for the supported
database types, and scripts for each database can be found in the respective folders.
2. Set engine persistence mode property (bw.engine.persistenceMode) to group and configure the
engine group configuration.
a) Copy the existing AppSpace config.ini template file appspace_config.ini_template
(located in BW_HOME/config ) to the root of the AppSpace folder, or a temporary location, and
rename the file as config.ini.
b) Edit the ActiveMatrix BusinessWorks engine persistence mode property,
bw.engine.persistenceMode, and set it to group.
TIBCO ActiveMatrix BusinessWorks™ Application Development
62
Follow these steps to configure the engine for group persistence mode, and to set TIBCO
Enterprise Message Service™ (EMS) as the group provider technology.
bw.engine.persistenceMode=group
c) Specify the group name and group provider technology in the config.ini file. The group name
is optional and it defaults to domain and AppSpace names separated by an underscore (_). Only
TIBCO Enterprise Message Service (EMS) is supported by the group provider technology.
Ensure you are using a different database instance for each AppSpace.
#
-----------------------------------------------------------------------------# Section: BW Engine Group Configuration.
#
# The properties in this section are applicable to the BW Engine group.
# Some of the properties in this section are required when the BW Engine
# property "bw.engine.persistenceMode" is set to "group".
#
-----------------------------------------------------------------------------# BW Engine Group Name. This is an optional property and it specifies name of
# the BW engine group. If this property is not specified, then the group name
# defaults to "Group_<DomainName>_<AppSpaceName>".
#bw.engine.groupName=mytestgroup
# BW Engine Group Connection Provider Technology. This is a required
property
# when the persistenceMode is set to "group"
(bw.engine.persistenceMode=group)
# and it specifies the BW Engine group communication technology. The only
# supported values are "ems" and "ftl". The group connection provider
technology property
# requires additional configuration. See section "Configuring the Engine for
Group Persistence Mode"
# for additional configuration.
bw.engine.groupProvider.technology=ems
d) Specify the group provider configuration:
#
-----------------------------------------------------------------------------# Section: BW Engine Group Connection Provider EMS Configuration.
#
# Some of the properties in this section are required when the BW Engine Group
# Connection Provider Technology property
"bw.engine.groupProvider.technology"
# value is set to "ems".
#
-----------------------------------------------------------------------------# BW Engine Group Connection Provider EMS URL. This property is required if
# the group provider technology is "ems".
bw.engine.groupProvider.qin.EMSServerUrl=tcp://localhost:7222
# BW Engine Group Connection Provider EMS User Name.
required
# if the group provider technology is "ems".
bw.engine.groupProvider.qin.EMSUserName=admin
This property is
# BW Engine Group Connection Provider EMS User Password.
# required if the group provider technology is "ems".
bw.engine.groupProvider.qin.EMSPassword=
This property is
# BW Engine Group Connection Provider EMS Member Prefix.
# optional and the default value is "EMSGMS".
#bw.engine.groupProvider.qin.EMSPrefix=EMSGMS
This property is
# BW Engine Group Connection Provider EMS Recovery Timeout in ms.
# property is optional and the default value is "5000" ms.
#bw.engine.groupProvider.qin.EMSRecoveryTimeout=5000
This
# BW Engine Group Connection Provider EMS Recovery Attempt Delay in ms.
# property is optional and the default value is "500" ms.
#bw.engine.groupProvider.qin.EMSRecoveryAttemptDelay=500
This
TIBCO ActiveMatrix BusinessWorks™ Application Development
63
# BW Engine Group Connection Provider EMS Recovery AttemptCount.
# property is optional.
#bw.engine.groupProvider.qin.EMSRecoveryAttemptCount=
This
# BW Engine Group Connection Provider EMS Connect Attempt Count.
# is optional.
#bw.engine.groupProvider.qin.EMSConnectAttemptCount=
This property
# BW Engine Group Connection Provider EMS Connect Attempt Delay in ms.
# property is optional.
#bw.engine.groupProvider.qin.EMSConnectAttemptDelay=
This
When setting the password property (bw.engine.groupProvider.qin.EMSPassword), the
default format is plain text. Execute the command bwadmin obfuscate, or the command
bwobfuscator, from the command line to encrypt the password; use the generated encrypted
text as the password.
3. Optional. The following properties are available for EMS SSL configuration.
EMS SSL Configuration
#client identity consisting of the certificate,
#private key and optionally extra issuer certificates can be included into a
single data block using PKCS12.
#KeyStore or Entrust Store encodings
#bw.engine.groupProvider.ems.ssl.trust.identity=
#The set of Trusted Certificates represents all trusted issuers of the server
certificate.
#It must be specified by the client application unless the host certificate
verification is completely disabled.
#bw.engine.groupProvider.ems.ssl.trust.certlocation=
#EMS SSL connection trust password. This
#property is required if the JMS server protocol is ssl. The password may
#be clear text or supplied as an obfuscated string.
#bw.engine.groupProvider.ems.ssl.trust.password=
#trusted certificate commonname must match the ems server hostname if set to
false
#bw.engine.groupProvider.ems.ssl.disable.verifyHostName=
#client and server certificates must match if set to false
#bw.engine.groupProvider.ems.ssl.trust.disable.verifyHost=
4. Optional. If you have saved the config.ini file to a temporary location, ensure you copy it to the
AppSpace root folder located in BW_HOME/domains/defaultdomain/appspaces/
defaultappspace.
5. Use the config admin command to push the configuration to the AppSpace: bwadmin[admin]
config -d myDomain -a myAppSpace -cf <temporaryLocation>/config.ini.
>
Configuring TIBCO FTL® as the Group Provider for Engine
Follow these steps to configure the engine for group persistence mode, and to set TIBCO FTL as the
group provider technology.
Use of TIBCO FTL® with TIBCO ActiveMatrix BusinessWorks™ for configuring bwagent and for
configuring group provider for engine does not require TIBCO FTL® licenses.
Prerequisites
These steps are only applicable if you are not using TIBCO FTL as the bwagent transport.
1. Install TIBCO FTL 5.0 on the same machine that TIBCO ActiveMatrix BusinessWorks 6.x has been
installed on.
TIBCO ActiveMatrix BusinessWorks™ Application Development
64
If you are installing TIBCO FTL 5.0 after installing TIBCO ActiveMatrix BusinessWorks
6.x, ensure you set the tibco.env.FTL_HOME variable in the bwcommon.tra file, which is
stored in the bin folder at BW_HOME\bin for Windows, or ${BW_HOME}/bin for Unix.
2. Start the FTL Realm server by executing the ./tibrealmserver
command.
-ht <hostIP>:<port>
FTL
./tibrealmserver -ht <hostIP>:<port>
3. Execute the following FTL command to populate data in the bwadmin_ftlrealmserver.json template
file, located in the config folder at BW_HOME/config:
./tibrealmadmin -rs <realmserverurl> -ur <PATH of bwadmin_ftl_realmserver.json>
4. Start FTL Group server by executing the following command:
./init_groups.py <realmserverhost>:< realmserverport> AUTO
Procedure
1. Create the engine database by executing the bundled scripts create.sql,create-scp.sql and
create-dcp.sql. Scripts for creating the engine database for various database types are located at
BW_HOME/config/dbscripts/engine. The engine directory contains folders for the supported
database types, and scripts for each database can be found in the respective folders.
2. Set engine persistence mode property (bw.engine.persistenceMode) to group and configure the
engine group configuration.
a) Copy the existing AppSpace config.ini template file appspace_config.ini_template
(located in BW_HOME/config ) to the root of the AppSpace folder, or a temporary location, and
rename the file as config.ini.
b) Edit the ActiveMatrix BusinessWorks engine persistence mode property,
bw.engine.persistenceMode, and set it to group.
bw.engine.persistenceMode=group
c) Specify the group name and group provider technology as ftl in the config.ini file. The
group name is optional and it defaults to domain and AppSpace names separated by an
underscore (_).
Ensure you are using a different database instance for each AppSpace.
#
-----------------------------------------------------------------------------# Section: BW Engine Group Configuration.
#
# The properties in this section are applicable to the BW Engine group.
# Some of the properties in this section are required when the BW Engine
# property "bw.engine.persistenceMode" is set to "group".
#
-----------------------------------------------------------------------------# BW Engine Group Name. This is an optional property and it specifies name of
# the BW engine group. If this property is not specified, then the group name
# defaults to "Group_<DomainName>_<AppSpaceName>".
#bw.engine.groupName=mytestgroup
# BW Engine Group Connection Provider Technology. This is a required
property
# when the persistenceMode is set to "group"
(bw.engine.persistenceMode=group)
# and it specifies the BW Engine group communication technology. The only
# supported values are "ems" and "ftl". The group connection provider
technology property
# requires additional configuration. See section "Configuring the Engine for
Group Persistence Mode"
# for additional configuration.
bw.engine.groupProvider.technology=ftl
d) Specify the group provider configuration:
#
------------------------------------------------------------------------------
TIBCO ActiveMatrix BusinessWorks™ Application Development
65
# Section: BW Engine Group Connection Provider FTL Configuration.
#
# Some of the properties in this section are required when the BW Engine Group
# Connection Provider Technology property
"bw.engine.groupProvider.technology"
# value is set to "ftl"
#
-----------------------------------------------------------------------------# BW Engine Group Connection Provider FTL Realm Server. This property is
required if
# the group provider technology is "ftl".
bw.engine.groupProvider.ftl.realmserver=http://localhost:8080
# BW Engine Group Connection Provider FTL Realm client user name
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.username=
# BW Engine Group Connection Provider FTL Realm client password
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.password=
# BW Engine Group Connection Provider FTL application identifier
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.appinstance.id=bwadmin-endpoint
# BW Engine Group Connection Provider FTL secondary realm server
# This property is optional.
#bw.engine.groupProvider.ftl.secondaryserver=
# BW Engine Group Connection Provider FTL group name
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.groupname=
# BW Engine Group Connection Provider FTL application name
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.appname=bwadmin
# BW Engine Group Connection Provider FTL publish endpoint
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.publish.endpoint=bwadmin-endpoint
# BW Engine Group Connection Provider FTL application name
# This property is required if the group provider technology is "ftl".
bw.engine.groupProvider.ftl.subscribe.endpoint=bwadmin-endpoint
When setting the password property (bw.engine.groupProvider.ftl.password), the default
format is plain text. Execute the command bwadmin obfuscate, or the command
bwobfuscator, from the command line to encrypt the password; use the generated encrypted
text as the password.
3. Optional. If you have saved the config.ini file to a temporary location, ensure you copy it to the
AppSpace root folder located in BW_HOME/domains/defaultdomain/appspaces/
defaultappspace.
4. Use the config admin command to push the configuration to the AppSpace: bwadmin[admin]
config -d myDomain -a myAppSpace -cf <temporaryLocation>/config.ini.
>
TIBCO ActiveMatrix BusinessWorks™ Application Development
66
Overview of Policies
Policies are categorized under the following policy types:
HTTP Security
●
Basic Authentication
The Basic Authentication policy secures the HTTP layer of REST, SOAP, and pure HTTP services by
validating user name and password credentials stored in HTTP headers. User name and password
credentials can be authenticated against an XML File Authentication provider or an LDAP
Authentication provider.
●
Basic Credential Mapping
The Basic Credential Mapping policy enables authentication for specified users by automatically
attaching appropriate credentials to request messages before they reach services. You can choose to
enforce Fixed or Conditional credential mapping.
SOAP Security
●
WSS Provider
Configure the WSS Provider policy to enforce authentication, confidentiality, integrity, and time
stamping of service-side messages.
●
WSS Consumer
Configure the WSS Consumer policy to enforce confidentiality, integrity, time stamping, and
credential mapping of response messages.
TIBCO ActiveMatrix BusinessWorks™ Application Development
67
Managing Policy Resources
Manage policies and policy resources from the TIBCO Business Studio.
Creating a Folder for Policies
Policies are always stored in the Policies folder. The folder might not exist in projects you have
imported from previous versions of ActiveMatrix BusinessWorks™ 6.x. If you create a new policy to
add to an activity or binding, the Policies folder is automatically created. You can also create a special
folder to contain policies.
To create a special folder for policies, follow these steps:
Procedure
1. In the Project Explorer pane, right-click on the application module and select New > Folder to
launch the BusinessWorks Application Folder wizard.
The Folder wizard opens.
2. Specify the following values in the New Folder window:
●
Enter or select the parent folder: Type the name of the parent folder, or select an existing
folder to be the parent folder.
●
Folder name: Type Policies.
3. Click Finish to create the Policies folder.
The new folder displays in the Project Explorer pane.
4. Right-click on the Policies folder, and select Special Folders > Use as Policies Folder.
Result
The folder can now store policies.
Creating an Authentication Resource
Policies use authentication resources to verify credentials and provide appropriate credentials for users.
Follow these steps to create a policy authentication resource.
Procedure
1. In the Project Explorer, right-click on the Resources Folder, and select a new shared resource. For
example, select New > XML Authentication .
2. Edit the following fields:
●
Resource Folder: Name of the folder where the resource will be located.
●
Package: Name of the package in the module where the new resource is added. Accept the
default package, or browse to select a different package name.
●
Resource Name: Name of the resource. Accept the default name, or type a new name.
3. Click Finish.
Result
The authentication resource displays under the Resources folder in the Project Explorer.
TIBCO ActiveMatrix BusinessWorks™ Application Development
68
Associating a Policy
Enforce security on your ActiveMatrix BusinessWorks™ application, by associating a policy with an
existing activity or binding.
Associating a Policy with an Activity
1. In the Process Editor, select the activity to associate the policy with. Activities that support policies
display the Policy tab under the Properties tab.
2. From the Properties tab, select the Policy tab.
3. Click the Add Policy to Activity
icon.
4. From the Select Policy window, perform one of the following actions:
●
Click Create a New Policy to set up a new policy with resources. Policies you can add to the
activity are listed under Select the type of policy. For more information about setting up
policies and resources from the policy wizard, refer to the appropriate sections under HTTP
Security and SOAP Security. Click Finish to create the new policy.
●
Select an existing policy under Matching Items and click OK.
The policy is associated with the activity.
Associating a Policy with a Binding
1. In the Process Editor, select the binding to associate the policy with.
2. From the Properties tab, select the Bindings tab.
3. Click the name of the binding under the Binding section.
4. Click the Bindings tab, and select the Policy field from the tree.
5. Click the Add Policy
icon.
6. From the Select Policy window, perform one of the following actions:
●
Click Create a New Policy to set up a new policy with resources. Policies you can add to the
activity are listed under Select the type of policy. For more information about setting up
policies and resources from the policy wizard, refer to the appropriate sections under HTTP
Security and SOAP Security. Click Finish to create the new policy.
●
Select an existing policy under Matching Items and click OK.
The policy is associated with the binding.
Removing a Policy
Follow these steps to remove a policy from an activity or a binding.
Removing a Policy From an Activity
1. Select the activity associated with the policy.
2. From the Properties tab, select the Policy tab.
3. Select the policy to remove, and click the Delete the selected policy
icon.
TIBCO ActiveMatrix BusinessWorks™ Application Development
69
The policy is no longer associated with the activity.
Removing a Policy From a Binding
1. Select the binding associated with the policy.
2. From the Properties tab, select the Binding tab.
3. Under the Policies field, select the policy to remove, and click the Delete the selected policy
icon.
The policy is no longer associated with the binding.
TIBCO ActiveMatrix BusinessWorks™ Application Development
70
HTTP Security
Apply security to the HTTP layer of REST, SOAP, and pure HTTP services.
Enforcing Basic Authentication
Implement the Basic Authentication policy to ensure user credentials in request messages are
authenticated.
First, set up a new Basic Authentication policy by creating and configuring the policy and its resources.
Next, associate the policy with an activity or binding in your application.
Setting Up a Policy with Resources
Follow these steps to set a new Basic Authentication policy with resources:
1. In the Project Explorer, right-click the Policies folder and select New > Policy.
The Policy Wizard opens.
TIBCO ActiveMatrix BusinessWorks™ Application Development
71
2. Specify the following values in the Create New Policy Window:
●
Policy Folder: Name of the folder where policies will be located. defualt
●
Package: Name of the package in the module where the new policy is added. Accept the default
package, or browse to select a different package name.
●
Policy Name: Name of the new policy. By default, the policy name is configured to match the
security policy you choose. For example, if you select the Basic Authentication policy, the
default name of the policy is Basic Authentication.
3. Under Select the type of Policy, click Basic Authentication.
4. From the Policy Defaults drop-down menu, select one of the following options:
The Policy Defaults menu offers a list of commonly used policy configurations to choose
from. After you select a Policy Default, a policy with preconfigured settings and related
resources is created. If resources already exist in the module, the newly created policy
automatically refers them. However, if no resources exist, new resources with default
settings are created and referred to by the policy. Refer to the Default description at the
bottom of the Policy Wizard to view policy configurations and new resources that might
be created.
●
Username/Password in workspace XML file: Select this option to verify user credentials
through an XML Authentication resource stored in your workspace. A new Basic
TIBCO ActiveMatrix BusinessWorks™ Application Development
72
Authentication policy configured for XML authentication and the following resources are
produced in your workspace:
—
—
A sample XML File containing user name and password credentials with the default file
name XMLUsers.xml
A new XML Authentication resource with the default file name
BasicAuthentication_AuthenticationProvider.authxml
●
Username/Password in filesystem XML file: Select this option to verify user credentials
through an XML Authentication resource stored in your local file system. A new Basic
Authentication policy configured for XML authentication is produced in your workspace:
—
A sample filesystem XML File the default file name
BasicAuthentication_AuthenticationProvider.authxml
●
Username/Password in LDAP: Select this option to verify user credentials through an LDAP
Authentication resource. A new Basic Authentication policy configured for LDAP
authentication and the following resource is produced in your workspace:
—
A new LDAP Authentication resource with the default file name
BasicAuthentication_AuthenticationProvider.ldapResource.
●
Empty Policy (No Default) : Select this option to create a new Basic Authentication policy with
no preselected options and no resources.
5. Optional. Select Always create new shared resources to ensure new resources are generated for the
policy and referred to by the policy.
6. Optional. Select Create module properties for common fields to override default properties in
newly created resources with module properties. Resources with module properties for common
fields are generated after you select this option.
7. Select Finish to create the policy.
Configuring Resources and the Policy
For resource configurations, refer to the following topics under the "Shared Resources" topic in the
Bindings and Palettes Reference guide.
●
XML Authentication
●
LDAP Authentication
For policy configuration details, refer to the topic "Basic Authentication", under "Policy Resources" in
the Bindings and Palettes Reference guide.
Associating the Policy with an Activity or a Binding
You can associate the Basic Authentication policy with the following activities and bindings:
●
HTTP Receiver Activity
●
Wait for HTTP Request Activity
Credentials authenticated on this activity are not used for propagation during credential
mapping.
●
SOAP Service Binding
●
REST Service Binding
Refer to Associating Policies for instructions on how to enforce a policy on an activity or a binding in
your application.
TIBCO ActiveMatrix BusinessWorks™ Application Development
73
Enforcing Basic Credential Mapping
Map credentials for different types of users by enforcing the Basic Credential Mapping Policy.
First, create and configure new policy. Next, associate the policy, with an activity or a binding in your
application.
Setting Up a Policy with Resources
Follow these steps to set up a new Basic Credential Mapping policy with resources:
1. In the Project Explorer, right-click the Policies folder and select New > Policy.
The Policy Wizard opens.
TIBCO ActiveMatrix BusinessWorks™ Application Development
74
2. Specify the following values in the Create New Policy Window:
●
Policy Folder: Name of the folder where policies will be located.
●
Package: Name of the package in the module where the new policy is added. Accept the default
package, or browse to select a different package name.
●
Policy Name: Name of the new policy. By default, the policy name is configured to match the
security policy you choose.
3. Under Select the type of Policy, select Basic Credential Mapping.
4. From the Policy Defaults drop-down menu, select one of the following options:
The Policy Defaults menu offers a list of commonly used policy configurations to choose
from. After you select a Policy Default, a policy with preconfigured settings and related
resources is created. If resources already exist in the module, the newly created policy
automatically refers them. However, if no resources exist, new resources with default
settings are created and referred to by the policy. Refer to the Default description at the
bottom of the Policy Wizard to view policy configurations and new resources that might
be created.
●
Fixed Credentials: Select this option to ensure a fixed set of credentials are mapped for all
users. A new Basic Credential Mapping policy configured for Fixed Basic Credential Mapping
and the following resource is produced in your workspace:
TIBCO ActiveMatrix BusinessWorks™ Application Development
75
—
An Identity Provider resource with the default file name
BasicCredentialMapping_FixedIdentityProvider.userIdResource
●
Authenticated & Anonymous Users : Select this option to enforce Basic Credential Mapping for
authenticated users and anonymous users. A new Basic Credential Mapping policy configured
for conditional basic credential mapping and the following resources are produced in your
workspace:
—
An Identity Provider resource for authenticated users with the default file name
BasicCredentialMapping_AuthIdentityProvider.userIdResource
—
An Identity Provider resource for anonymous users with the default file name
BasicCredentialMapping_AnonIdentityProvider.userIdResource
●
Role Based Credentials: Select this option to enforce basic credential mapping for authenticated
users with roles. A new Basic Credential Mapping policy configured for conditional basic
credential mapping and the following resources are produced in your workspace:
—
An Identity Provider resource for authenticated users with the default file name
BasicCredentialMapping_AuthIdentityProvider.userIdResource
—
Two separate Identity Provider resources for authenticated users with roles. The default
file names of the resources are
BasicCredentialMapping_RoleIdentityProvider.userIdResource and
BasicCredentialMapping_RoleIdentityProvider1.userIdResource
●
Empty Policy (No Default) : Select this option to create a new Basic Authentication policy with
no preselected options and no resources.
5. Optional. Select Always create new shared resources to ensure new resources are generated for the
policy and referred to by the policy.
6. Optional. Select Create module properties for common fields to override default properties in
newly created resources with module properties. Resources with module properties for common
fields are generated after you select this option.
7. Select Finish to create the policy.
Configuring Resources and the Policy
For resource configurations, refer to the following topics under the "Shared Resources" topics in the
Bindings and Palettes guide:
●
Identity Provider
Refer to the topic "Basic Credential Mapping", under "Policy Resources" in the Bindings and Palettes
guide for policy configuration details.
Associating the Policy with an Activity or a Binding
You can associate the Basic Credential Mapping policy with the following activities and bindings:
●
SEND HTTP Request Activity
●
Invoke REST API Activity
To enforce credential mapping on a SOAP reference, apply the WSS Consumer policy and select either
SAML Token based Credential Mapping or Username Token based Credential Mapping.
Refer to Associating Policies for instructions on enforcing a policy on an activity or a binding in your
application.
TIBCO ActiveMatrix BusinessWorks™ Application Development
76
SOAP Security
Apply security to the SOAP layer of messages and services.
Enforcing WSS Consumer
Enforce the WSS Consumer policy to ensure that the confidentiality, integrity, and the time stamp of a
request remains secure.
First, create and configure the policy. Next, associate the policy with a binding in your application.
Setting Up a Policy with Resources
Follow these steps to set up a new WSS Consumer policy with resources:
1. In the Project Explorer, right-click the Policies folder and select New > Policy.
The Policy Wizard opens.
TIBCO ActiveMatrix BusinessWorks™ Application Development
77
2. Specify the following values in the Create New Policy Window:
●
Policy Folder: Name of the folder where policies will be located.
●
Package: Name of the package in the module where the new policy is added. Accept the default
package, or browse to select a different package name.
●
Policy Name: Name of the new policy. By default, the policy name is configured to match the
security policy you choose.
3. Under Select the type of Policy, select WSS Consumer.
4. From the Policy Defaults drop-down menu, select one of the following options:
The Policy Defaults menu offers a list of commonly used policy configurations to choose
from. After you select a Policy Default, a policy with preconfigured settings and related
resources is created. If resources already exist in the module, the newly created policy
automatically refers them. However, if no resources exist, new resources with default
settings are created and referred to by the policy. Refer to the Default description at the
bottom of the Policy Wizard to view policy configurations and new resources that might
be created.
●
SAML Token with Sign SAML Assertion: Select this option to enforce SAML token-based
credential mapping. A WSS Consumer policy configured for SAML token-based credential
mapping and the following resources are produced in your workspace:
TIBCO ActiveMatrix BusinessWorks™ Application Development
78
—
—
A keystore resource with the default file name server.jks
A Keystore Provider resource with the default file name
WssConsumer_IdentityStore.keystoreProviderResource
—
A Subject Provider resource with the default file name
WssConsumer_SAMLIdentityProvider.sipResource.
●
UserName Token with Fixed Credentials: Select this option to enforce fixed user name tokenbased credential mapping. A WSS Consumer policy configured for fixed credential mapping
with a user name token and the following resources are produced in your workspace:
—
A Subject Provider resource, with the default file name
WSSConsumer_FixedIdentityProvider.userIdResource
●
UserName Token with Authenticated and Anonymous Credentials: Select this option to
enforce conditional user name token-based credential mapping. A WSS Consumer policy
configured for conditional credential mapping with user name tokens and the following
resources are produced in your workspace:
—
An Identity Provider resource for authenticated users, with the default file name
WssConsumer_AuthIdentityProvider.userIdResource
—
An Identity Provider shared resource for anonymous users, with the default file name
WssConsumer_AnonIdentityProvider.userIdResource
●
UserName Token with Roles and Authenticated Credentials: Select this option to enforce
conditional user name token-based credential mapping. A WSS Consumer policy configured for
conditional credential mapping with user name tokens and the following resources are
produced in your workspace:
—
Two Identity Provider resources for authenticated users with roles, with the default file
names WssConsumer_RoleIdentityProvider.userIdResource and
WssConsumer_RoleIdentityProvider1.userIdResource
—
An Identity Provider resource for authenticated users with the default file name
WssConsumer_AuthIdentityProvider.userIdResource
●
Empty Policy (No Default) : Select this option to create a new WSS Provider policy with no
preselected options and no resources.
5. Optional. Select Always create new shared resources to ensure new resources are generated for the
policy and referred to by the policy.
6. Optional. Select Create module properties for common fields to override default properties in
newly created resources with module properties. Resources with module properties for common
fields are generated after you select this option.
7. Select Finish to create the policy.
Configuring Resources and the Policy
For resource configurations, refer to the following topics under the "Shared Resources" topic in the
TIBCO ActiveMatrix BusinessWorks Bindings and Palettes Reference guide:
●
Identity Provider
●
Keystore Provider
●
Subject Provider
Refer to the topic "WSS Consumer" , under "Policy Resources" in the TIBCO ActiveMatrix BusinessWorks
Bindings and Palettes Reference guide for policy configuration details.
TIBCO ActiveMatrix BusinessWorks™ Application Development
79
Associating the Policy with a Binding
You can associate the WSS Consumer policy with the following bindings:
●
SOAP/HTTP Reference Binding
●
SOAP/JMS Reference Binding
Refer to Associating Policies for instructions on how to enforce a policy on a binding in your
application.
Enforcing WSS Provider
Use the WSS Provider policy to enforce authentication, confidentiality, integrity, and the time stamping
of service-side messages.
First, create and configure the policy. Next, associate the policy with a binding in your application.
Setting Up a Policy with Resources
Follow these steps to set up a new WSS Provider policy with resources:
1. In the Project Explorer, right-click the Policies folder and select New > Policy.
The Policy Wizard opens.
TIBCO ActiveMatrix BusinessWorks™ Application Development
80
2. Specify the following values in the Create New Policy Window:
●
Policy Folder: Name of the folder where policies will be located.
●
Package: Name of the package in the module where the new policy is added. Accept the default
package, or browse to select a different package name.
●
Policy Name: Name of the new policy. By default, the policy name is configured to match the
security policy you choose.
3. Under Select the type of Policy, select WSS Provider.
4. From the Policy Defaults drop-down menu, select one of the following options:
The Policy Defaults menu offers a list of commonly used policy configurations to choose
from. After you select a Policy Default, a policy with preconfigured settings and related
resources is created. If resources already exist in the module, the newly created policy
automatically refers them. However, if no resources exist, new resources with default
settings are created and referred to by the policy. Refer to the Default description at the
bottom of the Policy Wizard to view policy configurations and new resources that might
be created.
●
SAML Token Authentication: Select this option to authenticate credentials through SAML
assertion. A WSS Provider policy configured for SAML token-based authentication and the
following resources are produced in your workspace:
TIBCO ActiveMatrix BusinessWorks™ Application Development
81
—
A sample keystore file with the default file name truststore.jks.
—
A Trust Provider resource with the default file name
WssProvider_TrustStore.trustResource
—
A KeyStore Provider resource with the default file name
WssProvider_KeystoreProvider.keystoreProviderResource
—
A WSS Authentication resource with the default file name
WssProvider_WSSAuthProvider.wssResource
●
UserName Token Authentication with LDAP: Select this option to authenticate credentials
through user name token authentication with LDAP. A WSS Provider policy configured for user
name token-based authentication with LDAP and the following resources are produced in your
workspace:
—
An LDAP Authentication resource with the default file name
WssProvider_AuthenticationProvider.ldapResource
—
A WSS Authentication resource with the default file name
WssProvider_WSSAuthProvider.wssResource
●
UserName Token Authentication with Workspace XML: Select this option to authenticate
credentials through user name token-based authentication with an XML file authentication
resource stored in your workspace. A WSS Provider policy configured for XML file
authentication and the following resources are produced in your workspace:
—
An XML Authentication resource with the default file name
WssProvider_AuthenticationProvider.authxml
—
A WSS Authentication resource with the default file name
WssProvider_WSSAuthProvider.wssResource
—
●
A preconfigured XML file with the default file name XmlUsers.xml is created if an XML file
does not already exist.
UserName Token Authentication with Filesystem XML: Select this option to authenticate
credentials through user name token-based authentication with an XML file authentication
resource stored in your local file system. A WSS Provider policy configured for XML file
authentication and the following resources are produced in your workspace:
—
An WSS Authentication resource with the default file name
WssProvider_WSSAuthProvider.wssResource
—
An XML Authentication resource with the default file name
WssProvider_AuthenticationProvider.authxml
●
Empty Policy (No Default) : Select this option to create a new WSS Provider policy with no
preselected options and no resources.
5. Optional. Select Always create new shared resources to ensure new resources are generated for the
policy and referred to by the policy.
6. Optional. Select Create module properties for common fields to override default properties in
newly created resources with module properties. Resources with module properties for common
fields are generated after you select this option.
7. Select Finish to create the policy.
Configuring Resources and the Policy
For resource configurations, refer to the following topics under the "Shared Resources" topic in the
TIBCO ActiveMatrix BusinessWorks Bindings and Palettes Reference guide:
TIBCO ActiveMatrix BusinessWorks™ Application Development
82
●
Identity Provider
●
Keystore Provider
●
Subject Provider
●
Trust Provider
●
WSS Authentication
Refer to the topic "WSS Provider" under "Policy Resources" in the TIBCO ActiveMatrix BusinessWorks
Bindings and Palettes Reference guide for policy configuration details.
Associate the Policy with a Binding
You can associate the WSS Provider policy with the following bindings:
●
SOAP/HTTP Service Binding
●
SOAP/JMS Service Binding
Refer to Associating Policies for instructions on how to enforce a policy on a binding in your
application.
TIBCO ActiveMatrix BusinessWorks™ Application Development
83
Deploying an Application
You can deploy an application in TIBCO Business Studio.
Prerequisites
The bwagent must be running. For information on runtime entities, see the Administration guide. If no
network exists, you can create one by entering values in the Add Network dialog box and creating
runtime entities in the Deploy Application dialog box.
Procedure
1. Connect to a deployment server.
a) In the Deployment Servers pane, right-click Deployment Servers and select Add Network.
b) In the Add Network dialog, specify the HTTP interface and port for the network. The default
HTTP interface is the name of the bwagent. The default port is 8079. The defaults might have
been changed by your administrator.
The selected network is displayed in the Deployment Servers pane:
TIBCO ActiveMatrix BusinessWorks™ Application Development
84
The Deployment Servers pane contains information related to a single bwagent. Unlike the
Admin UI, this pane does not have information about the other bwagents and hence
cannot be used to perform operations on other bwagents. For example, you cannot create
an AppNode in another bwagent within the existing domain.
2. Deploy and start your application. There are several ways to deploy:
●
Drag an application project into an AppSpace in the Deployment Servers pane and drop it.
●
Drag an archive file from the Project Explorer, from Mac Finder, or from Windows File
Explorer into an AppSpace in the Deployment Servers pane.
●
Drag an archive file from the Archives folder (in the Deployment Servers pane ) into an
AppSpace and drop it.
●
Right-click the application and choose Deploy
Application.
a) In the Deploy Application dialog box, choose:
●
Network: The network to deploy to.
●
Domain: The domain to upload to. If there are no domains in the network, a default value is
provided. Click New to create a new domain.
●
AppSpace: The AppSpace to deploy to. The default AppSpace name is based on the
application name. Click New to create a new AppSpace in the selected domain.
If an AppNode does not exist, an AppNode is created. The AppNode is computed from the
AppSpace name and an HTTP management port value is assigned.
The application is deployed.
TIBCO ActiveMatrix BusinessWorks™ Application Development
85
3. Right-click the application in the Deployment Servers window and choose to Start it. Select it in the
Deployment Servers pane to view the status in the Properties pane:
4. Right-click the application in the Deployment Servers window and choose Stop to stop it.
TIBCO ActiveMatrix BusinessWorks™ Application Development
86
XPath
XML Path Language (XPath) is used to navigate through elements and attributes in an XML document.
XPath uses path expressions to navigate through XML documents. XPath also has basic manipulation
functions for strings, numbers, and booleans.
ActiveMatrix BusinessWorks uses XPath as the language for defining conditions and transformations.
For a complete description of XPath, refer to the XPath specification (from http://www.w3.org/). This
section covers the basics of XPath and its use in the product.
XPath Basics
This product uses XPath (XML Path Language) to specify and process elements of data schema. These
data schema are either process variables or input schema for an activity. You can also use XPath to
perform basic manipulation and comparison of strings, numbers, and boolean.
To use XPath in the product, you need to be familiar with the basic XPath concepts. However, to learn
more about XPath when building complex expressions refer to the XPath specification from http://
www.w3.org/
Addressing Schema Elements
All data source and activity input are represented as an XML schema. The data is represented as a
schema tree regardless of where the data is derived from or its format. The data can either be simple
(strings, numbers, boolean, and so on), or it can be a complex element. Complex elements are structures
that contain other schema elements, either simple elements or other complex elements. Both simple and
complex elements can also repeat. That is, they can be lists that store more than one element of the type
specified.
XPath is used to specify which schema element you refer to. For example, the following schema might
be available for an activity’s input.
TIBCO ActiveMatrix BusinessWorks™ Application Development
87
Schema Elements in Data Source
The data source area of the example Input tab shows the output schema of the activities in the process.
There are two output schema, each a root node in the data source area: Read-Shipping-Costs-file
and Parse-Shipping-Costs-file. Each of these schema has its own associated structure, for example,
Read-Shipping-Costs-file has a set of simple values and Parse-Shipping-Costs-file has simple
data and other complex data.
To reference a particular data item in any of these schema, start with the root node and then use slashes
(/) to indicate a path to the desired data element. For example, if you want to specify the region
attribute in the destination complex element that is in the Parse-Shipping-Costs-file node, use the
following syntax:
$Parse-Shipping-Costs-file/destination[<< Filter >>]/region
The path starts with a dollar ($) sign to indicate it begins with a root node and continues with node
names using slashes, like a file or directory structure, until reaching the desired location name.
Namespaces
Some schema elements need to be prefixed with their namespace. The namespace is automatically
added to elements that require this element when creating mappings on the Input tab of an activity or
when dragging and dropping data in the XPath builder.
Search Predicates
An XPath expression can have a search predicate. The search predicate is used to locate a specific
element in a repeating schema element. For example, the $Parse-Shipping-Costs-file/destination/region
item is a repeating element. To select only the first item in the repeating element, specify the following:
$Parse-Shipping-Costs-file/destination[1]
TIBCO ActiveMatrix BusinessWorks™ Application Development
88
The [1] specifies the first element of a repeating item. Sub-items can also be examined and used in a
search predicate. For example, to select an element whose destinationID is equal to "3A54", specify the
following:
$Parse-Shipping-Costs-file/destination["3A54"]
See the online documentation available in the XPath Builder for a list of the available operators and
functions in PATH.
You can also use the Custom XPath Function Wizard to create your custom XPath function group. For
more information, refer to Creating Custom XPath Functions topic in the Bindings and Palettes Reference
guide.
XPath Expression
The XPath expression is used to creating transformations on the Input tab of any activity.
When the function is placed into the XPath Expression, placeholders are displayed for the function’s
parameters.
You can drag and drop schema elements from the Data Source tab into the function’s placeholders.
XPath Builder Formula Elements
The following table shows the different elements of XPath Builder.
Elements
Description
Data Source
Displays the data source schema tree. All elements in this tree are
available to drag and drop into the XPath Expression field.
TIBCO ActiveMatrix BusinessWorks™ Application Development
89
Elements
Description
Functions
Displays the available XPath functions. These are categorized into
groups and each function can be dragged from the function list
into the XPath Expression field.
When the function is placed into the XPath Expression,
placeholders are displayed for the function’s parameters. You can
drag and drop schema elements from the Data Source tab into the
function’s placeholders.
For more information about XPath functions, select XPath
functions in XPath builder. The description of the function is
displayed.
Filter
Use this field for a refined function search in the mapper.
Clicking the Functions tab displays the Filter field.
For example, type "time" in the Filter field to obtain consolidated
results relating to "time" function.
TIBCO ActiveMatrix BusinessWorks™ Application Development
90
Elements
Description
Constants
Displays the constants available for use in XPath expressions.
These are categorized into groups and each constant can be
dragged from the constants list into the XPath Expression field.
Constants are useful for inserting special characters, such as
quotes, symbols, and so on, into XPath formulas. Constants are
also defined for commonly used items, such as date/time formats.
Constants can also be used for inserting the following TIBCO BW
Predefined Module Properties.
●
Activity Name - returns the name of the activity on which the
module property is set.
●
Application Name - returns the application name.
●
Application Version - returns the version of the application
specified in the Version field under the Overview tab of the
application.
●
AppNode Name - returns the name of the AppNode on which
the application is deployed.
●
AppSpace Name - returns the name of the AppSpace on which
the application is deployed.
●
Deployment Unit Name - returns the ID of the application
specified in the ID field under the Overview tab of the
application.
●
Deployment Unit Type - returns the deployment unit type as
application.
●
Deployment Unit Version - returns the deployment unit
version specified in the Version field under the Overview tab
of the application.
●
Domain Name - returns the name of the domain in which the
application is deployed.
●
Module Name - returns the name of the application module.
●
Module Version - returns the version of the module specified
in the Version field under the Overview tab of the application
module.
●
Process Name - returns the name of the process in which the
module property is used.
●
Process Stack - returns the entire process path including the
nested subprocesses, and the parent process. For example
main.Process/SubProcess1->sm.SubProcess1/
SubProcess2->sm1.SubProcess2
●
Engine Name - returns the name of the engine. By default, the
name of the engine is Main. You can change the engine name by
setting the property bw.engine.name=Main in the appspace
config.ini file.
TIBCO ActiveMatrix BusinessWorks™ Application Development
91
Elements
Description
Documentation Panel
Describes each selected function.
On clicking a function in the Function tab, the documentation
panel gives a brief description of the selected function with one or
more examples.
XPath Expression
Displays the XPath formula you want to create.
You can drag and drop items from the Data Source tab or the
Functions tab to create the formula.
XPath Builder
Using XPath Builder, you can drag and drop schema elements and XPath functions to create XPath
expression.
Click the Transition in the process. In the General tab, select Success with condition option in the
Condition Type field. This displays the Expressions field. Click
window.
icon to open the XPath Builder
XPath Builder is also available from Sequence Key field and Custom Job Id field of all process starter
activities (such as Timer, File Poller, and so on).
The following image shows how you can use XPath Builder to drag and drop schema elements into
function placeholders.
XPath Builder
See the following image for the displayed result of evaluating the formula shown in the XPath
Expression field. The errors in the formula are displayed here.
TIBCO ActiveMatrix BusinessWorks™ Application Development
92
TIBCO BW Functions
XPath Builder can be used to fetch process related information for any activity. These functions are
listed under the TIBCO BW Functions group.
●
getModuleProperty: Returns the value of a module property. Also see TIBCO BW Predefined
Module Properties under the Constants section.
●
getSystemProperty: Returns the value of a Java system property.
●
restartedFromCheckpoint: Returns true if the process instance recovered from a checkpoint,
otherwise returns false.
●
generateEPR: Returns an 'Endpoint Reference' as a string. This value can be used as an input to the
Set EPR activity.
●
getHostName: Returns host name of the host machine.
The XPath function xsd:string() saves double values in scientific notation if the double value has 7 or
more digits before the decimal point. For example, if the value is 1000000.333, the xsd:string()
function renders the value as 1.000000333E6.
TIBCO ActiveMatrix BusinessWorks™ Application Development
93
Developing a SOAP Service
A SOAP service makes a Process service available as a SOAP web service. You can achieve this by
applying a SOAP service binding on the target process service.
Implementing a SOAP Service Provider
Procedure
1. Click on the process package, for example, "HelloWorld", and then click on the Create a new
Business Works Process
icon.
2. Select a process on which you want to add a service, and click the Create Service icon.
The New Service dialog opens.
3. In the New Interface section specify the Interface Name as HelloWorld and Operation Name as
sayHello. Click Finish.
TIBCO ActiveMatrix BusinessWorks™ Application Development
94
4. To implement the operation, drag and drop the sayhello operation, and select Implement
Operation.
Choose Implement Constructor Operation option, if there are multiple operations in a Port type.
The option Implement Operation implements a single operation and creates a single
Receive activity and a Reply. The option Implement Constructor Operation implements a
constructor. A constructor provides for multiple operations. Use this option if the
PortType has multiple operations which must be implemented by this process.
5. Click on the Reply activity (sayHelloOut) and under the Properties view, click the Input tab.
Configure Reply message.
TIBCO ActiveMatrix BusinessWorks™ Application Development
95
6. Right-click on green chevron and select Components > ComponentsProcess > Create SOAP
Binding. The Binding Configuration dialog displays.
7. To configure transport on the SOAPServiceBinding, select HTTP from the Transport Type dropdown list in Transport Configuration.
8. Click on Create Shared Resource button and click Finish on the Create HttpConnResource
Resource Template.
The default port used by this shared resource is 8080. The service binding is now created.
9. To generate the concrete WSDL of the SOAP service created in the above steps, click Generate
Concrete WSDL link.
10. Click Workspace. In the Folder Selection window and select the Service Descriptor folder of the
current module and click OK.
The Generate Concrete WSDL screen will now show the specified location and the name of the
WSDL.
TIBCO ActiveMatrix BusinessWorks™ Application Development
96
To create the Concrete WSDL in a desired location other than the workspace location,
specify it by using File System button and click Finish.
11. To avoid namespace resolution error, click Next and clear the Embed Abstract WSDL and Embed
Schema check boxes and click Finish.
Click on the Advanced tab to override the Namespace URI, Service Name, Host, Port,
and Protocol fields.
The concrete WSDL is generated at the specified location.
Consuming SOAP Services
The request message is generated by the SOAP reference binding for a service and response message is
received by the reference binding from the service.
Creating a Consumer for SOAP Service
Procedure
1. Click on the process package, for example, "HelloWorld", and then click Create a new Business
Works Process
icon.
2. Specify the process name as HelloWorldConsumer and click Finish.
3. Drag and drop the HelloWorldSOAP portType to the right of the process editor.
4. Add a Reference Binding to the SOAP service for the Reference Type field by selecting the required
reference from the drop down list.
5. Select and drop a Timer and a Log activity on the process and join it with the Invoke activity as
shown in the image. Also, configure the Log activity with a message.
TIBCO ActiveMatrix BusinessWorks™ Application Development
97
The SOAP reference binding is created.
6. Run the project.
TIBCO ActiveMatrix BusinessWorks™ Application Development
98
Developing a RESTful Service
Services are used to invoke a process and to call out of the process so that a process receives data from a
service and routes data to a service.
The key abstraction of information in REST is a resource. REST ignores the details of component
implementation and protocol details. ActiveMatrix BusinessWorks currently allows the following
HTTP methods to be performed on resources: GET, PUT, DELETE, and POST. Both XML and JSON are
supported as data serialization formats along with support for definition of custom status codes,
path(URL) parameters, key-value parameters, query parameters, and custom HTTP headers.
General Restrictions
●
No wildcards or attribute wildcards. For example, any element and any attribute is not supported.
●
Complex types may not contain both an attribute and a child element with the same local name.
●
Complex types may not be of the pattern "simple type plus attributes".
●
Complex types may not contain mixed content.
●
Attributes that are not part of the default(empty) namespace, cannot be used for Complex Elements.
●
The 'choice' and 'sequence' compositors may not have maxOccurs
'all' in the schema specification).
●
Substitution groups are not supported.
●
Element of simple type with an attribute is not supported.
●
The elementFormDefault can only be qualified for schemas used by REST binding and JSON
activities.
●
Schemas should not contain cyclic dependencies on other schemas
●
Schemas should not have a type that has two child members with the same local name, but different
namespaces.
> 1
(same as the restriction on
Restrictions on JSON
●
Arrays must have homogeneous content.
●
Arrays cannot directly contain arrays ( [ [ ... ], [ ... ] ] )
●
Null type properties throw the XSD schema conversion error in TIBCO Business Studio™. To create
a REST Service or REST Binding edit the input JSON file and change the data type from null to
string.
Not currently supported
●
Binary content in JSON as a special case
Implementing a REST Service Provider
A REST service provider exposes the resources in a process definition that can be invoked by clients
using one of the following operations- POST, GET, PUT, PATCH, and DELETE.
Prerequisites
If a schema definition does not exist, create (or import) a schema definition in the process to which you
want to add the REST service.
TIBCO ActiveMatrix BusinessWorks™ Application Development
99
Procedure
1. In the Project Explorer, select the process to which you want to add the REST service. There are
multiple ways to invoke the wizard to create a REST service.
●
From the main menu, select File > New > BusinessWorks Resources > BusinessWorks REST
Resource.
●
Right-click the menu, select New > BusinessWorks REST Resource.
●
Click on Create REST Service in the process editor area. (Note that REST services can only be
created in stateless BusinessWorks processes.)
For more information, see the REST Binding in the Binding and Palettes Reference guide.
2. In the Create a New REST Service wizard, configure the REST service implementation by specifying
the values for Resource Service Path, Type of Resource, Operations, and Implementation Data.
about the new REST service.
●
Summary
●
Resource Service Path:
●
Type of Resource:
●
Operations:
needed.
Specifies the URI that is used to access the REST service.
Select if the service works on a single resource or a collection.
By default, the GET operation is selected. Select or deselect the operations as
●
Resource Schema:
Select a resource schema for the REST service, if needed.
●
Implementation Data:
Choose between structured and opaque implementation data.
3. Optionally, click Next to configure the selected operations individually to specify the nickname for
the operation (default nickname is of the format <operation><resource_name>), summary, and the
request and response elements and their data types.
4. Click Finish.
The wizard adds the REST service and the selected operations, and also creates a process definition
with the multiple operations.
The REST service always implements the constructor operator.
5. Add activities to the process and configure them appropriately. For example, update the POST
process to add a Log activity to log the requests and connect the postOut activity to Log activity.
TIBCO ActiveMatrix BusinessWorks™ Application Development
100
6. Configure the input and output properties for the activities. For example, select postOut activity
and then select Properties > Input. Expand the data tree in the Data Source tab and map the post
element from the left to the post Response element on the right to echo the element. Similarly, for
Log activity, map the post element on the left to the ActivityInput message element on the right.
7. Save your changes.
Result
The REST service is built and can be tested using the built-in tester Swagger UI. For more information
on Swagger UI, see Testing the REST Service in the Getting Started guide.
Discovering API Models from TIBCO Business Studio
You can use the API Explorer view in the TIBCO Business Studio to view the APIs that reside on your
local machine or on a remote server.
Prerequisites
For the API Explorer to discover the APIs residing on a remote server, the remote server must be up
and running.
You can set up the locations to which you want the API Explorer to connect and look for the APIs. To
do so, follow the steps below.
Procedure
1. In TIBCO Business Studio, go to the API Explorer view.
2. In the button bar within the API Explorer tab, click the View Menu downward-facing triangle icon
( ) and select Settings.
The Settings dialog will open.
The registries for the ActiveMatrix BusinessWorks - API Modeler and the samples folder installed
on your local machine are configured and appear in the API registry configurations box by default.
In this dialog, you can specify how the discovered APIs will appear in the API Explorer:
●
API Presentation - specifies how the APIs will appear in the API Explorer
Flat - displays the APIs as a flat list with each API's version number displayed next to its name
in parenthesis. If there are multiple versions of the same API, each version will be shown as a
separate API, hence multiple APIs with the same name but different version numbers.
Hierarchical - displays every API as a hierarchy of API name lable with version number folder
under it and the actual API under the version folder. If there are multiple versions for an API,
each version will be listed in its own separate folder under the API name label.
Latest Version - displays only the latest version of the API, even though there might be multiple
versions available.
●
Group by API registry - groups the APIs according to the registry from which they were
discovered
●
API registry configurations - displays the list of API registries that are currently configured in
your TIBCO Business Studio installation. You can select the registries from where you want the
API Explorer view to display the APIs by checking their check box(es).
You can edit an existing registry by clicking the Edit button, delete the registry configuration by
clicking Remove, or changing the order in which the registries show up in the API Explorer by
using the Up and Down button. These button get activated when you click on an API registry name.
3. Click New to add a new registry.
TIBCO ActiveMatrix BusinessWorks™ Application Development
101
4. In the Create new API Registry client configuration dialog do the following:
a) Enter a name for the API registry that you will be mapping to in the Name text box.
b) Select the Local radio button to map a location where the APIs are stored on your local machine's
hard drive and navigate to the location using the Browse button. Alternatively, select the Remote
radio button if you want to map to a remote server that contains the APIs and enter the URL for
the server in the URL text box.
5. Click Finish.
You should now see the APIs displayed in the API Explorer in the format that you specified in the
Settings dialog. Expanding an API will show you its version, the resource path, and the operations
you can perform on that resource.
The API Explorer view has the following quick-access buttons that you can use to format the way
the APIs are listed:
●
Refresh
●
Expand All
●
Collapse All
Group by API Registry
●
API Presentation
●
●
API Registries. Selecting a registry from this drop-down list toggles between displaying
and hiding the registry in the API Explorer.
Use the search filter that appears at the bottom of the API Explorer view to search for API names
that match the string that you enter in the Filter text box. You can search by typing in the version
number, the full API name, or a full word within an API name. Wildcards is not supported. The
search is case insensitive.
Importing an API Model into your Workspace
The APIs that are discovered from local and remote servers are displayed in the API Explorer tab of the
TIBCO Business Studio. You can use these APIs in your project by importing them into the Service
Descriptors folder of the project. The .json file for the API gets copied into the application module.
To import the APIs from the API Explorer into your project follow these steps.
Procedure
1. Right-click on one or more API names in the API Explorer and select Import.
The Import API dialog opens.
TIBCO ActiveMatrix BusinessWorks™ Application Development
102
Every API you selected in the API Explorer is listed in this dialog. If an API has multiple versions,
all versions are listed. By default, all APIs listed here are selected. You can deselect APIs that you do
not want to import by clearing its check box.
2. Select the Import to project radio button to import the API into an existing project and browse to
the project using the Browse button. To create a new project and import the API into that project
select the Create a new project and import API to the new project radio button. This option walks
you through the new project wizard, and after you go through the wizard will create a new project
and import the API into its Service Descriptors folder.
3. Select the API or the appropriate version of the API should there be multiple versions of the API
available in the API list to import box.
4. Click Finish.
You should see the API(s) under the Service Descriptors folder of the project. You can create subfolders under the Service Descriptors folder and drag-and-drop APIs into them if you prefer to
organize the APIs into a meaningful folder structure.
As an alternative to the above procedure, you can also drag and drop the API from the API
Explorer into the project's Service Descriptors folder.
APIs that were created using a Swagger file must be implemented exactly as defined by
the Swagger file. TIBCO Business Studio allows you to only view the parameters and
operations that are defined in the Swagger file. You cannot create any new parameters or
operations for such applications.
Creating an XML Schema for a Swagger 2.0 File Imported in TIBCO
Business Studio
TIBCO Business Studio supports the creation of an XML schema for an imported Swagger 2.0 file.
You can create an XML schema for the Swagger 2.0 files in one of two ways described below.
TIBCO ActiveMatrix BusinessWorks™ Application Development
103
Prerequisites
The Swagger 2.0 file must exist in the Service Descriptors folder of the project. Be sure to import the
Swagger file into the Service Descriptors folder before you follow these steps:
Procedure
1. Drag and drop the Swagger file on the right side of the canvas to create a REST service binding. This
action generates an XML schema for the Swagger file under the Schemas folder. The XML schema
file has the same name as the Swagger file.
Or
2. Right-click the Swagger file in the Service Descriptors folder and select Refactor -> Generate XSD
Schema.
●
To see which XML schema is related to the Swagger file, right-click the Swagger file
and select Refactor > Open XSD Schema.
●
If you have multiple Swagger files all of which contain a definition for the same object,
the definition for the object in all the Swagger files must be identical.
●
If you have multiple Swagger files with one file (a master file) containing a super set of
definitions contained in the other files, generate an XSD file from the master Swagger
file that contains the super set, and create links to the other files in the master Swagger
file. If you create a link to the super set file in one of the subset files and then create an
XSD from the subset file, then the XSD will contain only those elements that are
common to both files. It will not contain elements for definitions that exist only in the
super set file.
Synchronizing the Imported REST API Models in the TIBCO Business
Studio
If a REST service developer has made changes to the service API after creating the service, the changes
needs to be propagated to all the places where the service is used. You can check for updates to a
Swagger file that has been imported into the TIBCO Business Studio. The icon to the left of the Swagger
file in the Project Explorer in the TIBCO Business Studio displays an indication that the file has been
modified in its original location and the local copy of the file is not in synchronization with it source.
You can check for differences between the original Swagger file and its copy that was created when
importing it into the TIBCO Business Studio. You can also compare the differences between the two and
update your local copy if need be. To do so, follow these steps:
Procedure
1. Right-click the Swagger file under Service Descriptors in the Project Explorer.
2. Select Remote Interface.
The Check for Differences menu option checks for differences between the imported copy and its
original.
The Compare Differences menu option first checks for differences between the imported copy of
the Swagger file and its original. If there is a difference, the file will appear in the Synchronize tab
and if you double click it there it displays the two files side by side with the differences highlighted.
The Update Local Copy menu item updates the copy of the file in your workspace to match its
original. It also regenerates the schema.
No changes are performed for processes that have already been created.
TIBCO ActiveMatrix BusinessWorks™ Application Development
104
Developing Java Applications
The enhanced Java development tooling in TIBCO Business Studio can be used to develop and debug
the Java code. Using the software, you can develop applications graphically (without coding), use
existing Java classes, or write custom Java code.
Adding Java-Specific Behavior to Projects
Eclipse projects use the project nature definition to tag a project as a specific kind of project. By
configuring a project to use the Java nature, you can leverage on the enhanced Java development
tooling available in TIBCO Business Studio to develop Java application. A project with Java nature
contains a default source folder for Java classes, src, in addition to other folders.
You can choose a different source folder by configuring the specified folder as the source folder and
including the folder in the build path.
You can specify the project nature for an application module in one of the following ways:
●
When creating a new application module, select the Use Java configuration check box.
●
For an existing application module, right-click the project name in the Project Explorer view and
select Configure > Convert to Java project.
Accessing Java Classes or Libraries from an ActiveMatrix BusinessWorks™ Application
An ActiveMatrix BusinessWorks™ application can invoke Java classes or reference libraries containing
the Java code, using activities from the Java palette. Depending on the use case, the Java classes or
libraries can reside in one of the following locations:
●
Within the same application module as the ActiveMatrix BusinessWorks™ process: when the Java
code need not be accessible from other applications, include the Java class within the same
application module. See Using a Simple Java Invoke Activity for details.
●
In a shared module or Eclipse plug-in project : when the Java code must be shared by multiple
applications, use a shared module with Java nature or an Eclipse plug-in project to contain the Java
code.
●
External to the ActiveMatrix BusinessWorks™ application: when you do not have access to the Java
source files and only the Java classes are available, you can invoke the Java methods stored in JAR
files.
Using a Simple Java Invoke Activity
The Java Invoke activity can invoke a Java method from a class that resides in the same application
module, a shared module or an eclipse Plug-in project.
Prerequisites
The project must be configured with Java nature.
See Adding Java Nature to a Project in the Bindings and Palette Reference.
Procedure
1. In the Project Explorer view, expand the application module project and right-click the Java source
folder, src (default), and select New > Class.
2. In the New Java Class wizard, specify the package name and name of the Java class, and click
Finish to create the Java class in the specified package. For example, type
com.tibco.myjavapackage for the package name and HelloWorld for the class name.
TIBCO ActiveMatrix BusinessWorks™ Application Development
105
3. Add one or more methods to the class. For example, add a static method, sayHello, which echoes a
message "Hello World!" when invoked.
public static String sayHello(String input){
}
You can invoke static or non-static methods using Java Invoke activity. See the Bindings
and Palettes Reference guide for details about the Java Invoke activity.
4. Add the implementation for the methods. For example, add the following implementation code to
the sayHello method as shown:
public static String sayHello(String input){
return "Hello " + input;
}
After implementing Java methods, you can proceed to design the process in the Process Editor.
5. Open the process in the Process Editor where you want to invoke the Java method and add a Java
Invoke activity from Java Palette. Add transitions to the activity as required.
6. Configure the Java Invoke activity from the Properties view of the activity as described.
●
Click Browse in front of the Class Name field. In the Class Selection dialog, type the first few
letters of the class name to search for the class you want to access. From the list of matching
items, select the class you want to access. For example, select HelloWorld. Click OK.
●
From the drop-down list, select the method you want to invoke. For example, select sayHello.
●
If the method requires input parameters, provide the values for the input parameters from the
Input tab of Java Invoke activity. For example, in the sayHello method, add the string "World!"
to the input parameter.
7. Complete configuring your process and map the inputs for the activities as required. Then save the
process. You can run or debug the application module in TIBCO Business Studio™ and verify the
output of the Java Invoke activity.
Accessing Module Properties from Java Global Instance
You can access module properties from Java Global Instance so that at the time of deployment, these
properties can be configured.
To access the ActiveMatrix BusinessWorks 6.x Module Properties in a user-defined Java code referenced
in Java Global Instance, follow these steps:
Procedure
1. In the ActiveMatrix BusinessWorks 6.x module, specify a dependency on the package
"com.tibco.bw.palette.shared.java" using Import-Package.
a) Double-click Dependencies located under ActiveMatrix BusinessWorks 6.x Module > Module
Descriptors. This opens BW Manifest Editor.
b) In the Imported Packages section, click the Add tab to add the dependency on the
com.tibco.bw.palette.shared.java package.
2. Add the @ModuleProperties annotation to the method that accepts only one parameter of type
java.lang.HashMap.
Through this HashMap you can access the name or value pair of ActiveMatrix BusinessWorks 6.x
module properties.
Accessing Module Properties from Java Invoke Activity
You can access the ActiveMatrix BusinessWorks 6 module properties and Java system properties from
the user-defined code invoked from the Java Invoke activity and Java Event Source.
TIBCO ActiveMatrix BusinessWorks™ Application Development
106
Procedure
1. Under the ActiveMatrix BusinessWorks 6 module, click Module Descriptors > Descriptors.
This opens BW Manifest Editor.
2. In the Imported Packages section, click Add.
The Package Selection dialog opens.
3. Select the com.tibco.bw.palette.shared.java and com.tibco.bw.runtime package and click OK.
4. Add the @BWActivityContext annotation to the method which accepts only one parameter of type
com.tibco.bw.runtime.ActivityContext.
The module property can be accessed from ActivityContext class using the methods
"registerModuleProperty" and "getModuleProperty". Refer to API Reference for more details on how
to use these methods.
Accessing Module Properties in User-Defined Java Code Referenced in
JavaProcessStarter
Retrieve EventSourceContext from the getEventSourceContext() method of abstract Java class
"JavaProcessStarter". The module property can be accessed from EventSourceContext class using the
methods "registerModuleProperty" and "getModuleProperty". Refer to API Reference for more details on
how to use these methods.
TIBCO ActiveMatrix BusinessWorks™ Application Development
107
Creating an Application
An application is a collection of one or more modules and can be executed in the runtime.
Modules are packages containing one or more processes, shared resources, and metadata such as name,
version, dependencies, and so on. Package names must be unique within an application. If there are
two packages with the same name in an application, then you must either rename one of the packages
or remove one of the packages from the application.
An application created using TIBCO ActiveMatrix BusinessWorks Express can run in TIBCO
ActiveMatrix BusinessWorks Enterprise. However, an application created using ActiveMatrix
BusinessWorks Enterprise cannot run in ActiveMatrix BusinessWorks Express.
The New BusinessWorks Application wizard helps create an application. There are multiple ways to
launch the wizard:
●
From the main menu, select File > New > BusinessWorks Resources and then select
BusinessWorks Application.
●
From the Module Descriptors > Overview getting started area, click
Application.
●
Right-click in the Project Explorer view and select New >
Create a BusinessWorks
BusinessWorks Application.
Specify the values for the following fields in the wizard:
1. Project name: Name of the application.
2. Use default location: Specifies the location on disk to store the application's data files. By default,
this value is set to the workspace. To change, clear the check box and browse to select the location to
be used.
3. Version: Version of the application.
4. Create Application Module: Selected by default to create an application module with the specified
name. Clear the check box if you do not want to create an application module.
5. Click Finish.
Result
An application with the specified name is created and opened in the workbench. If the option to create
an application module was selected, the application module with the specified name is also created.
TIBCO ActiveMatrix BusinessWorks™ Application Development
108
Generating Deployment Artifacts
A deployment artifact is an archive file that contains all the information required to deploy the
application to runtime. It is the only artifact that is handed from the design phase to the runtime as it
contains all the bundles and metadata that is required to deploy and run the application.
Applications are developed using the features available in TIBCO Business Studio and can range from
simple to very complex. An ActiveMatrix BusinessWorks application consists of an application module,
which consists of one or more processes that define the business logic, and zero or more shared
modules. See Application Modules and Shared Modules in the Concepts guide for details. ActiveMatrix
BusinessWorks applications can also contain OSGi bundles that do not contain ActiveMatrix
BusinessWorks artifacts.
An application archive contains one or more OSGi bundles, one each for all the modules referenced
directly or indirectly by the application. It also contains application metadata which is used during
deployment.
If any further changes to the design or configurations are made, the deployment artifact (archive file)
must be regenerated.
When creating an archive file for an application, the application packager also generates the
ActiveMatrix BusinessWorks processes in SVG format, which can be rendered in the Admin UI.
There are multiple ways to create a deployment artifact:
●
From the Project Explorer view in TIBCO Business Studio, open <Project>app > Overview and click
Export Application for Deployment link as shown below.
In the EAR Export window, specify the location for the archive file and provide a custom name to
the archive file, if needed, by clearing the Use Default EAR file name check box. Click Finish to
create the deployment artifact (archive file).
●
By selecting the project application in the Project Explorer and dropping it in the File Explorer an
archive file for the application is created. If needed, change the default location in the File Explorer
by using the
Open Directory to Browse option in the File Explorer and select a custom folder.
For example c:/tmp.
TIBCO ActiveMatrix BusinessWorks™ Application Development
109
Artifacts intended to be exported from a shared module must be contained in their respective special
folders. For example, schemas must be contained in the Schemas folder, WSDL files in the Service
Descriptors folder, and processes must be contained in a package under the Processes folder.
When you deploy an application, each application in an AppSpace is identified by its unique name and
a major.minor version number. The version number is important as it provides traceability and helps
troubleshoot in case of an error at run time. If any further modifications are made to the application, the
archive file must be regenerated with an updated version number and then deployed to the AppSpace.
When you deploy and start an application, if the archive file contains the SVG format of business
processes, you can view the process diagrams for the processes from the Admin UI. See the
Administration guide for details.
TIBCO ActiveMatrix BusinessWorks™ Application Development
110
Refactoring a Shared Resource or Policy Package
Follow these steps to refactor a resource or policy.
Renaming a Resource or a Policy Package
Follow these steps to change the name of a resource, or a policy, package and to update its
corresponding references in the project.
Procedure
1. To rename a resource package, right-click on the package under the Resources folder and select
Refactor > Rename Resource Package. To rename a policy package, expand the Policies folder,
right-click on the policy package, and select Refactor > Rename Policy Package.
2. Enter a new name for the resource, or policy, package and select OK.
3. Optional. In the Rename Package Name dialog, confirm the changes that will happen, and the
resource references that will be updated, by ensuring the correct resources are selected.
4. Select OK.
Changing the Location of a Resource or a Policy
Follow these steps to change the location of a resource, or a policy, and to update its corresponding
references in the project.
Procedure
1. To update the location of a resource, right-click on the package under the Resources folder and
select Refactor > Rename Resource Package. To update the location a policy, expand the Policies
folder, right-click on the package containing the policy you want to rename, and select Refactor >
Rename Policy Package.
2. Enter a new location for the resource, or policy, and select OK. For example, to change the location
of a Basic Authentication policy residing in refactoringproject.TestPackage, modify the package
name to refactoringproject.NewPackage.TestPackage.
3. Optional. In the Rename Package Name dialog, confirm the changes that will happen, and the
resource references that will be updated, by ensuring the correct resources are selected.
4. Select OK .
A new folder structure under the Resources, or Policies, folder is created, and the resource is moved
to the newly created location.
TIBCO ActiveMatrix BusinessWorks™ Application Development
111
Adding and Removing Multiple Component Processes
Add or remove multiple component processes from an application using the Components editor in
TIBCO Business Studio.
Adding Multiple Component Processes
Follow these instructions to add more than one component process to an application.
Procedure
1. Open the Components editor in TIBCO Business Studio. To do this, go to the Project Explorer,
expand the application, and find the Module Descriptors folder. Expand the Module Descriptors
folder and double-click the Components folder.
2. Click the Create Process Component
icon.
3. From the Select a BusinessWorks Process wizard, select a component process, hold down the Shift
button, and use the up or down directional buttons on your keyboard to select additional processes.
4. Click OK.
Result
The processes you specified are displayed in the Component Process editor.
Deleting Multiple Component Processes
Follow these instructions to remove more than one component process to an application.
Component processes with REST services cannot be deleted from the Components editor. Instead,
delete them from the Project Explorer.
TIBCO ActiveMatrix BusinessWorks™ Application Development
112
Procedure
1. Open the Components editor in TIBCO Business Studio. To do this, go to the Project Explorer,
expand the application, and find the Module Descriptors folder. Expand the Module Descriptors
folder and double-click the Components folder.
2. Select a component process, hold down the Shift button, and use the up or down directional
buttons on your keyboard to select additional processes.
3. Click the
icon to remove the component processes you selected.
4. Click OK.
Result
The processes you specified are removed, and no longer display in the Component Process editor.
TIBCO ActiveMatrix BusinessWorks™ Application Development
113
Using the Debugger
The debugger enables different configurations of an application to be run in design phase.
You can select applications, and processes in an application, to launch in the debugger.
The Debug perspective consists of set of views which are related to the debugging task. Some views, for
example the Project Explorer view, are not available in the Debug perspective, while others, such as
Debug and Breakpoints, are available in the Debug perspective. There are multiple ways to open the
Debug perspective:
●
From the main menu, select Window > Open Perspective > Other and then select
●
From the Module Descriptors > Overview Testing area, click
Debug.
Launch BusinessWorks Debugger.
The Debug perspective consists of the following views, starting from the upper left corner clockwise:
●
Debug: Shows the list of debug launches and allows you to manage them using the icon bar as
follows:
—
Remove All Terminated Launches
—
Resume
—
Suspend
—
Terminate
—
Disconnect
—
—
Step Into, Step Over, Step Return, Drop to Frame
Use Step Filters
TIBCO ActiveMatrix BusinessWorks™ Application Development
114
—
●
Remove Completed Process
BusinessWorks Jobs: shows all running jobs and allows you some basic management such as, to
Clear All Jobs
.
●
Servers: shows the servers that are available. You can also define a new server using the New Server
Wizard, which allows you to define a new server as well as to download additional server adapters.
●
Variables: shows the variables associated with the process being debugged. The main management
tasks associated with the variables are:
●
—
Show Type Names
—
Show Logical Structure
Breakpoints: shows the breakpoints used for debugging. The main management tasks associated
with the breakpoints are:
—
—
Show Breakpoints Supported by Selected Target
Go to File for Breakpoint
—
Skip All Breakpoints
—
Link with Debug View
—
Add Java Exception Breakpoint
●
Job Data: shows available information about the running process instances.
●
Process Launcher: shows available sub-processes that can be launched. Inputs to the process
instance can be provided in the process launcher.
●
Properties: shows available information about the properties in the process being debugged.
●
Tasks: shows all debugging tasks listed by their resource, path, location, and type.
●
Console: gives the output of the debugging task.
Configuring the Debugger
You can use Debug configuration to create, manage, and run configurations in TIBCO Business Studio.
There are multiple ways to access Debug Configurations window:
●
From the menu Run > Debug Configurations.
●
From the Module Descriptors > Overview Testing area, click
Launch BusinessWorks Debugger.
Using the Create, manage, and run configurations dialog you can select the following:
●
Applications to debug.
●
Advanced configurations such as logging configuration and engine debug port.
●
Arguments: program arguments such as the target operating system, target architecture, target web
services, working directory, and so on, and VM arguments such as TIBCO_HOME, port number, or
any engine properties that need to be set when running the application.
●
Settings that define the Java Runtime Environment such as Java executable and runtime JRE,
configuration area, and so on.
TIBCO ActiveMatrix BusinessWorks™ Application Development
115
●
Tracing criteria for the available OSGi bundles. By default, tracing is disabled. When enabled, you
can choose among the available OSGi bundles, and then select the desired tracing criteria for each of
them.
●
Environment variables such as PATH, LD_LIBRARY_PATH, and so on.
●
Common settings where you can save the configuration either as a local or a shared file and display
them in the favorites menu (Debug and/or Run), define encoding for the files, and so on.
After selecting the options, click Apply to apply the changes or Debug to launch the debugger with
the selected debug configuration.
Testing an Application in TIBCO Business Studio
Using TIBCO Business Studio you can test your applications during design phase using the debugger.
The debugger provides the runtime environment to test your application in TIBCO Business Studio by
starting the ActiveMatrix BusinessWorks engine, domain (BWEclipseDomain), AppSpace
(BWEclipseAppSpace), and AppNode (BWEclipseAppNode) from within TIBCO Business Studio™.
When you run an application using the debugger, the Console view displays all messages when
executing the application.
Procedure
1. Open the application module in TIBCO Business Studio and select the component process in the
Project Explorer.
The selected process opens in the Process Editor.
2. From the menu, click Run > Debug Configurations.
3. In the Debug Configurations window, expand the tree under BusinessWorks Application and
select BWApplication.
4. Click the Applications tab. If multiple applications are selected, click Deselect All. Then select the
check box next to the application name you want to run.
If needed, specify additional information such as engine properties in the debug configuration. See
Configuring the Debugger for details.
5. Click Debug to run the application in Debug mode.
The engine and the runtime entities such as domain (BWEclipseDomain), AppSpace
(BWEclipseAppSpace), and AppNode (BWEclipseAppNode) are started and the selected
application deploys. The Console view displays a log of the execution.
6. After completing the execution, click the Terminate
icon to stop the process.
Remote Debugging
You can debug an application running on a remote AppNode through TIBCO Business Studio.
Procedure
1. Enable the AppNode for debugging. (The AppNode must be running.)
a) Open the network in the Deploy pane and choose the AppNode. The AppNode properties are
displayed in the Properties pane.
TIBCO ActiveMatrix BusinessWorks™ Application Development
116
b) Click the Enable Debug
icon in the Properties pane to enable remote debugging.
c) Enter the interface and port for remote debugging on the selected AppNode in the Enable
Remote Debugging dialog box.
●
Debugger Interface: The interface for the debugger. This value is auto-generated.
●
Debugger Port: The port to use for remote debugging. This is the same as the port number
you entered for the remote debug configuration. This port cannot be in use. If the port is in
use, the following message is displayed at the top of the dialog box: Internal server
error
The remote debugger can also be launched with the Debug icon in the Properties view.
The connection parameters on the Enable Remote Debugging dialog box will
automatically be entered based on the AppNode configuration.
2. In TIBCO Business Studio, create a Remote Debug launch configuration.
a) Choose Run > Debug Configurations.
b) In the Debug Configuration dialog box, choose Remote BusinessWorks Application >
New_configuration. Enter the following information:
●
Name: The name of the configuration.
●
Host: The name of the host. This is the agent name. To find the agent name, right-click the
network name in the Deployment Servers window and choose Edit. The agent name is
displayed in the Agent HTTP Interface field of the Add Network dialog box.
●
Port: The remote debug port. The port cannot be in use.
TIBCO ActiveMatrix BusinessWorks™ Application Development
117
3. Deploy the application you want to debug to a network. See Deploying an Application for
information.
4. Launch the application using the Remote Debug launch configuration.
The application is launched in the debugger. Confirmation is displayed in the Debug window.
TIBCO ActiveMatrix BusinessWorks™ Application Development
118
Unit Testing
Unit testing in TIBCO ActiveMatrix BusinessWorks™ consists of verifying whether individual activities
in a process are behaving is expected. While you can run unit tests on processes any time during the
development cycle, testing processes before you push the application to the production environment
might help you to identify issues earlier and faster.
Setting Up a Test File
Set up a test file to create unit tests for processes.
Prerequisites
Before you create a new test file, your application module must contain a Tests folder. You only need to
create this folder once, and it will hold all of the test files you create.
To create the Tests folder, follow these steps:
1. From the Project Explorer, right-click on the application module, and select New > Tests Folder.
2. Follow the commands in the New Test Folder wizard, and click Finish to create the Tests folder.
Create a Test File
Once the Tests folder exists in your application module, you can create a new test file. There are
multiple ways to create this file:
●
Select the process you want to test, click the Properties tab, and select the Tests tab. Click the
icon, and follow instructions in the wizard to create a new test file.
●
Right-click on the Tests folder, and select New > Other. In the wizard, expand BusinessWorks Unit
Test to select Tests File, and click Next. Complete instructions in the wizard, and click Finish to
create a new test file.
TIBCO ActiveMatrix BusinessWorks™ Application Development
119
●
In the Process Editor pane, right-click on the process title, and select Process > Add Process to Test
File. If a test file has not been created, the New Test File wizard displays. If a test file has been
created, the Add Process to Test File wizard displays. Follow the instructions in the wizards to add
the process to a test file.
Add Assertions to the Test File
To add an assertion to the test file, apply it to an activity in the process.
Procedure
1. Select the process.
2. Right-click the activity you want to add an assertion on, and select Assertion > Add Assertion. In
this example, an assertion is being added to the addBooks activity in books.bwp.
A green icon displays in the upper left corner of an activity with an assertion on to it.
3. From the Tests tab, go to the Data Source tab and expand output schema of the activity you are
adding an assertion to.
4. Expand the AssertType attribute, and drag and drop the string | boolean | element to an element
in the data source schema tree.
TIBCO ActiveMatrix BusinessWorks™ Application Development
120
5. Select a datatype for the output value, and click Finish.
6. Drag and drop a schema element from the data source schema tree into the assertion elements into
the XPath Expression field. The testinput element is the data that the process receives, and the
goldInput element is the value you expect the process to receive. In other words, the goldInput is
the statement, or the assertion, that you are making.
In this example, the expected value for theisbn element on the addBooks activity is "1234567.
Adding a Process to a Test File
Multiple processes can be added to a test file.
Prerequisites
A Tests folder and a test file must be present in the application module.
There are two ways to add a process to a test file:
●
When you create a new test file, there is a pane in the New Test File wizard that prompts you to
select the process, or processes, that you want to add to the test file.
TIBCO ActiveMatrix BusinessWorks™ Application Development
121
●
Select the process you want to add to the test file, right-click anywhere in the Process Editor pane,
and select Process > Add Process to Test File. Follow instructions in the wizard and click Finish
once you are done.
After a process has been added to a test file, you can confirm this by checking the Available Tests field.
To access this field, go to the Properties tab, select the Tests tab, and click the drop-down menu in the
Available Tests field. In this example, selecting the drop-down menu for the Available Test field shows
that the books.bwp process from the Bookstore sample has been added to the
tibco.bw.sample.binding.rest.Bookstore1 test file.
Check the Activities field directly below to view activities with assertions. This field provides an
overview of the assertions in the test file you selected.
Uploading and Deploying a Test File
Upload and deploy a test file with TIBCO Business Studio™ or with REST APIs.
TIBCO Business Studio™
Prerequisites
The application process must be added to the test file you are deploying.
Procedure
1. Open the process you have added to the test file. For example, expand the application, and double
click on the books.bwp process to open it in the process editor.
2. Start the debugger and launch the application.
a) Click Run > Debug Configurations.
TIBCO ActiveMatrix BusinessWorks™ Application Development
122
b) In the left-hand tree of the Debug Configuration wizard, expand BusinessWorks Application
and select BWApplication.
c) Click the Applications tab and then click Deselect All if you have multiple applications, and
select the application you want to debug. For example, select the check box next to
tibco.bw.sample.binding.rest.BookStore.application.
d) Click Debug.
3. From the Debugger view, select the Assertions tab.
4. Click the test file that displays under the launched process, and click the
icon to upload the test
file to deploy the file to run time. After the test file has been uploaded, the file status changes to
[Uploaded]. In this example, the tibco.bw.sample.binding.rest.BookStore1.bwt test file has been
successfully uploaded.
5. Invoke the process.
6. From the BusinessWorks Jobs tab, confirm whether the activity that you have added an assertion to
receives the expected output. If the activity did not receive the expected output, the Faulted status
displays.
From the Assertions tab, click the test file to view asserted activities, and click the asserted
activities to view assertion test results. For example, clicking the
tibco.bw.samplebinding.rest.BookStore1.bwt test file from the Assertions tab, shows that
an assertion has been added to the addBooks activity from the Books process in the
Bookstore sample application. Clicking on addBooks displays the results returned from
testing the asserted activity.
TIBCO ActiveMatrix BusinessWorks™ Application Development
123
REST APIs
Use REST APIs to manage and deploy test files.
Prerequisites
Ensure you have completed the following tasks:
●
The application process must have been added to the test file you are deploying. For instructions on
how to do this, refer to Adding a Process to a Test File.
●
The bwagent must be running.
●
Enable the AppNode for remote debugging. For instructions on how to do this in TIBCO Business
Studio™, refer to Remote Debugging. For instructions on how to do this from the Admin UI, refer to
"Debugging an AppNode" in the TIBCO ActiveMatrix BusinessWorks™ Administration guide.
●
You must have a REST client installed.
Procedure
1. Open a REST Client, for example Postman.
2. Enable unit testing by using the POST /bwdebug/v1/tests/tester operation. For example, in Postman,
enter the URL http://localhost:7777/bwdebug/v1/tests/tester, where localhost is the name of machine
where the application is running, and 7777 is the port you specified for remote debugging of your
application. If the request successfully passed, the value returned is true. If it did not, the returned
value is false.
3. Upload the test file to run time. To do this, complete the following steps:
a) Open the test file in TIBCO Business Studio™ and copy the contents. For example, from TIBCO
Business Studio™, open the tibco.bw.sample.binding.rest.Bookstore1 test file in a text editor, and
copy the contents of the file.
b) Paste the test file contents in the body of the request, and set the XML payload as the body of the
request.
c) Use the POST /bwdebug/v1/tests/testfile operation to upload the test file. For example, in
Postman, enter the URL http://localhost:7777/bwdebug/v1/tests/testfile to upload the
tibco.bw.sample.binding.rest.Bookstore1 test file. If the request successfully passed, the value
returned is true. If it did not, the returned value is false.
4. Invoke the process. For example, launch the Google Chrome browser and open http://localhost:
7777/tibco.bw.sample.binding.rest.BookStore.application. Click Books or Events to see, and test the
operations.
TIBCO ActiveMatrix BusinessWorks™ Application Development
124
5. Use the GET /bwdebug/v1/tests/reports operation to review the results of the test in JSON format.
For example, in Postman, enter the URL http://localhost:7777/bwdebug/v1/tests/reports to view the
results of testing the assertions in the tibco.bw.sample.binding.rest.Bookstore1 test file.
6. Use the DELETE /bwdebug/v1/tests/tester operation to disable the unit testing feature and clean the
test reports. For example, in Postman, enter the URL http://localhost:7777/bwdebug/v1/tests/tester
to stop testing the tibco.bw.sample.binding.rest.Bookstore1 test file and to disable unit testing. If the
request successfully passed, the value returned is true. If it did not, the returned value is false.
TIBCO ActiveMatrix BusinessWorks™ Application Development
125
Using the bwdesign Utility
The bwdesign utility provides a command line interface for creating, validating, importing or exporting
resources stored in a workspace.
To view arguments and options for a command, open a terminal, navigate to the BW_HOME\bin folder,
and type bwdesign help command at the command line.
Command Name and Syntax
Description
cd
Changes the current working directory to the
specified folder.
SYNTAX:
cd [path]
Clears the command line console.
clear
SYNTAX:
clear
Executes a batch script file containing a set of
commands to execute in sequence.
execute
SYNTAX:
execute [filename]
List the projects in current workspace or the files in
current working directory.
ls
SYNTAX:
ls [options]
Prints the location of the current working directory.
pwd
SYNTAX:
pwd
Exits the command line console.
quit
SYNTAX:
quit
Creates resource(s) in the workspace.
system:create
SYNTAX:
system:create [options]
[outputfolder]
system:export
SYNTAX:
system:export [options] [projects]
[outputfolder]
system:import
SYNTAX:
Exports BW artifacts from the specified projects in
the workspace to a folder. The artifacts can be ZIP
or EAR files.
Imports flat or ZIP projects into the current
workspace.
system:import [options] files
TIBCO ActiveMatrix BusinessWorks™ Application Development
126
Command Name and Syntax
Description
system:validate
Validates BW modules in the current workspace.
SYNTAX:
system:validate [options] [modules]
Procedure
1. To use the bwdesign utility, open a terminal and navigate to BW_HOME\bin.
2. Type: bwdesign
-data <TIBCO_BusinessStudio_workspace_absolutePath>.
bwdesign -data C:\myWorkspace.
For example,
TIBCO ActiveMatrix BusinessWorks™ Application Development
127
Best Practices
As the business requirements become more complex, so do the business processes that are designed to
implement them. TIBCO provides some best practices to help design processes that are readable,
reusable, and manageable.
Control Visibility with Scopes
A scope is similar to a block concept in programming languages and is useful to isolate or encapsulate
process variables, thus avoiding conflicts with variable names used elsewhere in the process. Use of
scopes helps reduce the number of module properties needed for the entire application, which must be
unique for all lexical scopes. When designing or viewing a process in TIBCO Business Studio, scope
constructs can be collapsed to enhance readability of the process and reduce clutter.
Promote Reuse with Sub-processes
A sub-process is similar to a sub-routine in programming languages and is useful to keep a block of
code small and maintainable. Sub-processes, if declared public, can be called from other processes, thus
enabling the logic to be reused.
Consolidate Literal Values
Keep the number of literal values in process logic and activity configurations to a minimum by
consolidating them in the Process Properties tab at the process level. This makes it easier to view and
maintain the literal values. In addition, the process properties can be promoted to module properties,
which can then be controlled at the application level.
Externalize with Module Properties
Configuration parameters can be externalized as module properties. At runtime, the values from the
module properties are injected into process and activity configuration parameters upon application
startup. This allows environmental specific application properties to be set at the time of deployment or
in some cases, post deployment. Database password is a good example of a module property.
Use Profiles for Staging
You can group module properties with the current set of property values into a named profile. An
application can have multiple profiles, each having its own set of property values. At run time, you can
deploy the same application and stage it multiple times using different profiles.
Defining Service Contracts
When designing complex business processes, ensure that the service contracts on the interfaces are
well-defined.
Avoid XML Collisions
Avoid defining schema (XSD) or WSDL components with the same qualified names in the same
module. Doing so may result in XML collisions at the module level.
If, for some reason, you need to define schema or WSDL components with the same qualifies names,
then define the schema or WSDL components in separate shared modules.
Close Unnecessary Projects in Workbench
Keep the number of open projects in your Eclipse workbench to a minimum by closing the unnecessary
projects. Having too many ActiveMatrix BusinessWorks projects open in the Eclipse workbench may
adversely affect the UI performance.
TIBCO ActiveMatrix BusinessWorks™ Application Development
128
Use Project Clean
Sometimes TIBCO Business Studio reports incorrect validation errors that are not related to design or
development issues. It is recommended that you clean your project as it forces Eclipse to discard all
build problems and states, and rebuild the projects from scratch. This option can be accessed from the
menu Project > Clean.
Manage TIBCO Business Studio Workspaces
If you are working with multiple major, minor, or service pack levels of the product, use different
workspaces for different versions.
Increase Log Levels
When debugging issues at design-time, increasing the log levels can provide additional information on
the issues. You can customize the log levels for configurations like Debug and Run by editing the
respective logback.xml configuration files.
The logging configurations are accessible from Run > Debug Configuration > Advanced > Logging
Configuration. Permissible log level values are INFO, TRACE, DEBUG, WARN, and ERROR. These levels can
be applied to activities, shared resources, bindings, engine, and so on.
TIBCO ActiveMatrix BusinessWorks™ Application Development
129
Troubleshooting
This section provides information on how to solve some commonly observed issues when working
with ActiveMatrix BusinessWorks.
Mapping and Transforming Data
Some mapping issues and possible resolutions are explained below. This list is not complete but
provides examples of messages that might be returned.
For a complete list of error codes, see the Error Codes guide.
●
Issue 1:"The
expression refers to a variable name,variableName,that is not defined
in the static context".
Resolution: If this error is thrown, delete the mapping and re-map. If the XSLT function CopyContents-Of is mapped on the right hand side of the mapper, delete the mapping and re-map.
●
Issue 2 : If the user experiences an issue that is similar to the following error.
"Caused by: org.genxdm.exceptions.GenXDMException: The prefix 'tns' is already
bound to http://NamespaceTest.com/Example Caused by:
org.genxdm.exceptions.GenXDMException: The prefix 'tns' is already bound to
http://NamespaceTest.com/Example and cannot also be bound to http://
xmlns.example.com/20150212141103"
Resolution: To resolve this error, select the element on the right side of the activity's mapper,
navigate to the Edit Statement panel and clear the copy-namespaces check box. Refer to the image
given below.
TIBCO ActiveMatrix BusinessWorks™ Application Development
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement