Tib Designer Palettes
Tib Designer Palettes
Tib Designer Palettes
Palette Reference
Software Release 5.8.0
November 2012
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, The Power of Now,TIBCO Adapter, TIBCO Administrator, TIBCO ActiveMatrix BusinessWorks, TIBCO
Designer, TIBCO Enterprise Message Service, TIBCO Rendezvous, TIBCO Repository, and TIBCO Runtime Agent are
either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.
EJB, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. 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.
This Product is covered by U.S. Patent No. 6,970,981.
Copyright 1999-2012 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
| iii
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Changes from the Previous Release of this Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
TIBCO Designer Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Connecting with TIBCO Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
How to Join TIBCOmmunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
How to Access All TIBCO Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
How to Contact TIBCO Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
iv
| Contents
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Started with Schema and DTD Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Started with Instance Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Common Columns In Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Toolbar Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Content Model Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
17
21
24
26
27
28
33
Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Schema Properties Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Schema Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Elements/Types Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Elements/Types List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Content Model Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Attributes Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Properties Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advanced Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simple Types Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Schema Props Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Validations Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Component Doc Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Source Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
37
38
40
40
40
41
49
50
53
58
63
66
68
68
68
69
Contents v
Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Configuration Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
XML Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Setting a Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Content Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Content Panel: Tag Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Content Panel: Edit Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Errors Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Source Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
XML Instance Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Building Your Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Customizing and Populating Your Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
vi
| Contents
Adding Roles to Sinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Sessions Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RV Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RVA Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RVCM Session. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RVCMQ Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RVTX Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JMS Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
174
175
175
176
177
179
180
187
187
188
188
189
189
189
189
190
190
Endpoint Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Endpoints Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Publisher Endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Subscriber Endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Client / Request-Response Invocation Service Endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Server / Request-Response Service Endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding Schema to Endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
191
191
191
195
196
198
199
199
202
202
202
203
203
205
206
208
208
208
209
209
Contents vii
viii
| Contents
Managing Repository Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exporting and Importing Repository Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding TIBCO Repository Directories and Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advanced Repository Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Viewing Attributes of Repository Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying Attributes Inside Repository Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
245
245
247
247
249
249
253
253
253
254
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
| ix
Figures
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Element/Types panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 13
Element/Type list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 14
Figure 15
Figure 16
Attributes panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 17
Overview panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Attributes panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Figure 27
Figure 28
| Figures
Figure 29
Figure 30
Figure 31
Figure 32
Figure 33
Figure 34
Figure 35
Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Figure 36
Figure 37
Figure 38
Figure 39
Figure 40
Figure 41
Figure 42
Figure 43
Figure 44
Figure 45
Figure 46
Figure 47
Figure 48
Figure 49
Figure 50
Figure 51
Figure 52
Figure 53
Figure 54
Figure 55
Figure 56
Figure 57
Figure 58
| xi
Tables
Table 1
Table 2
Table 3
Table 4
Toolbar buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 5
Table 6
Table 7
Occurrence indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 8
Sequence indicators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 9
Table 10
Occurrence indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Table 11
Sequence indicators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Table 12
Table 13
Table 14
Table 15
Table 16
xii
| Tables
| xiii
Preface
TIBCO Designer is an easy to use graphical user interface for creating and deploying
integration projects. TIBCO Designer allows you to drag and drop components into a
project and then specify configuration information for each component.
Topics
xiv
Preface xv
Related Documentation
This section lists documentation resources you may find useful.
TIBCO Designer Users Guide Read this manual for instructions on using this
product.
TIBCO Designer Palette Reference includs the base palettes that are always available
from TIBCO Designer.
TIBCO Designer Release Notes Read the release notes for a list of new and changed
features. This document also contains lists of known issues and closed issues for this
release.
Palettes are used to group configuration objects. Documentation is included with the
palette. You can access the palette documentation in various ways:
TIBCO Runtime Agent: TIBCO Runtime Agent is a bundle of TIBCO software and
third-party software that is needed to run many TIBCO applications such as TIBCO
BusinessWorks and TIBCO Adapters.
TIBCO Hawk: This is a tool for monitoring and managing distributed applications
and operating systems.
xvi
| Related Documentation
TIBCO Enterprise Message Service: This software lets application programs send
and receive messages using the Java Message Service (JMS) protocol. It also
integrates with TIBCO Rendezvous and TIBCO SmartSockets messaging products.
Preface xvii
Typographical Conventions
The following typographical conventions are used in this manual.
Table 1 General Typographical Conventions
Convention
Use
ENV_NAME
TIBCO products are installed into an installation environment. A product installed into
an installation environment does not access components in other installation
environments. Incompatible products and multiple instances of the same product must be
installed into different installation environments.
TIBCO_HOME
name of Windows services created by the installer and is a component of the path to
the product shortcut in the Windows Start > All Programs menu.
code font
Path The folder into which the product is installed. This folder is referenced in
documentation as TIBCO_HOME.
Code font identifies commands, code examples, filenames, pathnames, and output
displayed in a command window. For example:
Use MyCommand to start the foo process.
In large code samples, to indicate the parts of the sample that are of particular
interest.
In command syntax, to indicate the default parameter for a command. For example,
if no parameter is specified, MyCommand is enabled:
MyCommand [enable | disable]
italic font
To introduce new terms For example: A portal page may contain several portlets.
Portlets are mini-applications that run in a portal.
To indicate a variable in a command or code syntax that you must replace. For
example: MyCommand PathName
Use
Key
combinations
Key name separated by a plus sign indicate keys pressed simultaneously. For example:
Ctrl+C.
Key names separated by a comma and space indicate keys pressed one after the other.
For example: Esc, Ctrl+Q.
The note icon indicates information that is of special interest or importance, for example,
an additional action required only in certain circumstances.
The tip icon indicates an idea that could be useful, for example, a way to apply the
information provided in the current section to achieve a specific result.
The warning icon indicates the potential for a damaging situation, for example, data loss
or corruption if certain steps are taken or not taken.
Use
[]
A logical OR that separates multiple items of which only one may be chosen.
For example, you can select only one of the following parameters:
MyCommand para1 | param2 | param3
Preface xix
Use
{}
A logical group of items in a command. Other syntax notations may appear within each
logical group.
For example, the following command requires two parameters, which can be either the
pair param1 and param2, or the pair param3 and param4.
MyCommand {param1 param2} | {param3 param4}
In the next example, the command requires two parameters. The first parameter can be
either param1 or param2 and the second can be either param3 or param4:
MyCommand {param1 | param2} {param3 | param4}
In the next example, the command can accept either two or three parameters. The first
parameter must be param1. You can optionally include param2 as the second parameter. And
the last parameter is either param3 or param4.
MyCommand param1 [param2] {param3 | param4}
xx
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.
|1
Chapter 1
General Palette
Topics
AliasLibrary, page 3
Folder, page 5
Identity, page 7
LibraryBuilder, page 9
| Chapter 1
General Palette
Introduction
When you install TIBCO Designer as part of a TIBCO Runtime Agent installation, a small
number of default palettes are included. This document is a reference to each of these
default palettes. Some step-by-step instructions are included where appropriate.
When you install other products that use TIBCO Designer, such as TIBCO ActiveMatrix
BusinessWorks or a custom adapter, those products add palettes and corresponding palette
documentation to TIBCO Designer.
AliasLibrary 3
AliasLibrary
The AliasLibrary resource allows you to specify aliases to file system resources (such as a
.jar file) that need to be included in your project. To use a file system resource, a project
needs to know where to find it. Since projects are exported or deployed to different
machines and different environments, TIBCO Designer uses aliases to specify file
locations.
When including a file, an alias is created that specifies the files location. An alias is part
of your preferences and is common to all of your projects. Aliases are created and
managed under the File Alias tab in the Preferences dialog.
Resources that reference an AliasLibrary package all the referenced files when their
enterprise archive file is built. Because AliasLibraries reference files via a reference, you
must ensure that the machine where the enterprise archive file is generated can access all
externally referenced files.
See Creating an AliasLibrary on page 95 in TIBCO Designer Users Guide for more
information.
| Chapter 1
General Palette
Enterprise Archive
When you are ready to deploy your project, you must generate an enterprise archive file.
An enterprise archive file contains information about the adapter instances and process
engines you wish to deploy, and additional files that may be required to support your
configuration.
See Chapter 6, Creating an Archive for Deployment in TIBCO Designer Users Guide for
details.
Folder 5
Folder
Folders are used to organize resources. TIBCO Designer palettes, such as the Adapter
Resource or Adapter Schema palette, use folders to organize resources. TIBCO Designer
users can also use folders to organize the resources in their projects.
TIBCO Designer supports two kinds of folders:
Folders created from a Folder resource in the General palette, displayed with a
multi-folder icon, become folders in the file system.
Other folders, such as the Adapter Services folder inside an adapter configuration are
logical folders. These folders only exist in memory in the resource that holds them.
The actual data for these elements is stored in a file.
| Chapter 1
General Palette
Identity 7
Identity
The Identity resource encapsulates information that may be used to authorize a user,
connection, and so forth. The information you supply changes depending on the type of
Identity resource you want to use.
The identity certificate location, its type, and password can be specified as global
variables. Resources referencing an identity must use the same identity type because this
is selectable from a pop-up and does not allow global variables.
Description
Optional description.
Certificate URL
Key URL
Key Password
Identity File
Use this option of the certificate includes the private key information in the same file.
Name
Description
Optional description.
URL
File Type
Password
| Chapter 1
General Palette
Username/ Password
Use this option if you want to use a username and password for authentication and dont
want to use a certificate. Supply information in the following fields:
Name
Description
Optional description.
Username
Password
LibraryBuilder 9
LibraryBuilder
The LibraryBuilder resource is used to build a design-time library, which allows resources
you have defined in one project to be used in other projects. This allows you to create
shareable resources once and then allow other project developers to use them in their
projects.
For example, Rendezvous resources, JMS resources, schemas, and process definition
libraries can be part of a design-time library.
See Creating a Design-time Library on page 98 in TIBCO Designer Users Guide for
details.
10
| Chapter 1
General Palette
Task List
TIBCO Designer allows you to create one or more task lists and include them with your
project. Each task list can describe either a project or a project component and consists of
a number of tasks. As the tasks are updated by their owners, the task list itself is updated.
The advantage of task list resources is that they are always saved and opened as part of the
project.
To use a task list, follow these steps:
1. With the top-level folder selected, select the Project Tracker palette if in palette mode.
2. Drag a Task List resource from the palette panel into the design panel.
3. Supply information about the task list name and subject, a description, and the owner
of the list, then click Apply.
4. Select the task list. A new set of icons appears in the tool bar.
Icon
Description
Add task list. Adds a task list to the currently selected task list. Task lists
can contain both tasks and task lists.
Add task. Adds a task to the currently selected task list. You can later
convert the task to a task list if desired.
Delete task. Deletes the selected task
Move up. Moves the selected task or task list up in the hierarchy.
Move down. Moves the selected task or task list down in the hierarchy.
Convert to task list. Converts a selected task into a task list. This is useful
when you realize that a task you created actually consists of a number of
subtasks.
5. Drag tasks and task lists into the design panel as needed.
Task List 11
6. For each task or task list, you can specify the following information:
Task Subject
Description
Owner
Completed
7. Then click the Details tab to specify the following information:
You can only specify Detail information for tasks, not for task lists. When you have
completed all tasks in a task list, the task and task lists are checked in the task
hierarchy.
Planned Start Date
Planned Completion Date
Estimated Worktime (hours)
Actual Start Date
Actual Completion Date
Actual Worktime (hours)
Progress
If you do not choose the format month/day/year for the dates, a "bad value" error
results.
8. The task list is now saved with the project. Each time a developer wishes to make a
change to one of the tasks, she may do so and the task list will be updated
appropriately.
12
| Chapter 1
General Palette
Text Document
The Text Document resource can be used as a simple text file for notes that you can associated
with your project or place in folders inside the project.
For each Text Document, you can provide a name (which appears as the label) and the text.
| 13
Chapter 2
The XML Tools palette provides a set of tools enabling the creation, management, and
validation of XML schemas (XML Schema or DTD) and XML instance documents.
Topics
Schema, page 36
DTD, page 80
14
| Chapter 2
Introduction to XML
XML provides a flexible set of structures that can hold different types of information,
from highly structured database tables and lists to more free-form documents. The tightly
defined requirements for XML documents ensure that all applications adhere to the same
rules when they read (technically, parse) and write documents. The XML 1.0 specification
leaves little room for conflicting syntactical interpretations of the same XML document.
As a result, it allows the exchange of documents across a wide variety of platforms,
applications, and development environments.
DTD A Document Type Definition (DTD), the schema language specified by the
W3C XML 1.0 specification.
Schemas and DTDs can be used in several places within your integration project. For
example, WSDL files (files that describe web services) use schemas to define the input
and output messages of a web service. Several TIBCO ActiveMatrix BusinessWorks
activities have Input Editor or Output Editor tabs where you can use a reference to a
defined schema.
TIBCO provides partial support for XML Schema redefines in design-time editing of
XSD schemas and runtime processing of XML. There are some known issues with
complex, multi-level usage of this feature of the schema language that manifest in the
TIBCO ActiveMatrix BusinessWorks Mapper activity and in runtime validation of data.
Given the industry trend away from this XSDL feature, TIBCO has no plans to further
enhance support. It is recommended that schema authors use other features of the
language to create similar patterns of inheritance and restriction, such as type extension,
substitution groups, and so on.
Please contact TIBCO Support if you need help with schema design alternatives.
16
| Chapter 2
2. From the palette panel, drag a Schema, DTD, or Instance icon into the design panel to
add that resource to your project.
For additional information on basic interaction with TIBCO Designer and on
customizing your GUI, see TIBCO Designer Users Guide.
Figure 1 Adding an XML Resource to your project
Existing XML resources can be added to a folder in your project by way of the Project
menu (Project > Import Resources from File, Folder, URL...).
Features
When you select a Schema or DTD resource in the project panel, a set of new panels
becomes available. You can use these panels to create, validate, and manage the schema
resource. Features include:
Tools for including other schemas and/or schema components when building a new
schema
Because a DTD is not as feature-rich as an XML Schema, the editing environment for an
XML Schema and a DTD is similar, but not identical. With a few exceptions, the DTD
interface supplies a subset of the functionality provided by the Schema interface.
Content Model
Diagram
Properties Panel
Elements/Types
Panel
Configuration
Panel
When you begin work on a new XML Schema or DTD, most of your work is performed in
the Element/Types Panel, which is used to declare the elements, complex types, and
attributes that define document structure and describe data content.
18
| Chapter 2
5. Tab to the Content Model column and type in the content model of the book. A simple
content model for Book might look like the one shown below. See Elements/Types
Panel on page 39 and Example: Building a Content Model on page 45, for more
information on how to build a content model.
If the content model contains references to sub-elements that are not yet declared, a
prompt to create entries for these elements will appear.
6. Select Create new elements as Locally defined and click Create.
By default, new elements are declared to have xs:string content, which means they can
hold text, but not other elements.
XML Schema elements can be declared locally or globally. Local elements exist within
the context of their parent element only. Accordingly, you could have a local element
named title that appears within a book element and another local element named title that
appears within a mortgage element. Global elements are declared such that they can be
referenced within any content model. All global elements must have unique names.
7. Click Create to create the elements.
TIBCO Designer Palette Reference
20
| Chapter 2
8. Tab to the Attributes column for the element's row and type in attributes for the element.
For example, the element Chapter may include attributes that give us more information
about a chapter, such as its chapter number and chapter title.
If an attribute is as yet undefined, it is automatically created with data type xs:string.
These attributes can be seen and modified in the Attributes Panel. See Attributes Panel
on page 49 for more information.
The figure below illustrates the elements declared in this example.
The Elements/Type panel always appears beneath the content model diagram. The content
model diagram only appears if the Elements/Type panel is selected. The content model
diagram provides a graphical overview of your schema.
This serves as a brief introduction into the types of declarations used to build your schema.
An overview of the other panels used to build your Instance resources is provided in Table 3
on page 23.
For step-by-step XML Schema building exercises, see XML Schema Exercises on
page 68. To build a sample DTD, see DTD Exercise on page 108.
The new panels, in addition to new toolbar buttons and menu options, facilitate the
schema-driven creation, editing, and management of data-oriented XML documents,
messages, and configuration files. The next diagram illustrates the editing environment for
instance resources.
Figure 3 Instance editing environment
The interface is optimized for XML documents based on a schema, so associating your
document with a schema in your project is typically the first step. For example, to create
an instance of an invoice schema:
1. Drag an Instance resource into the design panel and double-click it to select it.
2. Click the Set Schema button on the toolbar.
Select the desired schema from your project and indicate the element to serve as the
root element for the document. Most of your work will be performed in the content
22
| Chapter 2
panel, which consists of a listing of the elements and attributes (tag area) on the left
and an area for inserting values for the elements and attributes (edit area) on the right.
Tag area
Edit area
3. To enter data for an element or attribute (if allowed by the schema), click the
corresponding field in the edit area and type in the value.
When a new schema is set, content hints appear as grayed-out text strings in the edit area.
The content hints indicate the expected content, as defined by the schema, for the
associated element or attribute in the tag area. For more information, see Content Hints on
page 125.
4. When a new schema is set, only required elements and attributes appear in the tag
area. To add more elements or attributes, double click an element to generate a drop
down box.
This box always contains an empty box with a series of icons below. These icons,
when selected, determine the type (element, attribute, and so on) and location (child,
sibling, parent) of the node to be entered. If the document is based on a schema, any
elements and attributes available based on the schema's content models also appear in
the insert drop down box, and can be added with a single mouse click.
insert new element
insert new attribute
insert as child
insert as sibling
insert as parent
insert new
processing instruction
insert schema-defined
element or attribute
The factory bar at the bottom of the content panel, provides another option for entering
new elements and attributes.
An overview of the other panels you can use to build your Instance resources is provided in
Table 3 on page 23.
A detailed, step-by-step XML instance building exercise is included at the end of the
Instance chapter. See XML Instance Exercise on page 130.
Panels
When working with a resource from the XML Tools palette, new panels are provided to
help you review and refine the resource. The panels are summarized in the Table 3.
Table 3 XML Tools panels
Panel
Resource
Description
Configuration
All
The configuration panel is used for setting the XML resource name. For
more information on the configuration panel, see:
24
| Chapter 2
Resource
Description
Source
All
The source panel allows you to edit the source code of your XML
resource directly. For more information on the source panel, see:
Validation or
Errors
Elements/Types
All
Schema and
DTD
The elements/types panel enables you to view, create, and edit element
and attribute declarations and complex type definitions. The
elements/types panel is typically the place you'll start defining your
schemas. For more information on the elements/types panel, see:
Note: This panel is referred to as the elements panel when working with
DTD resources.
Content
Instance
The content panel provides the primary editing area. The panel loads by
default when an Instance resource is selected in the project panel. The
content panel consists of a left-hand listing of the elements and
attributes (tag area) and a right-hand area for inserting values for the
elements and attributes (edit area). For more information on the content
panel, see Content Panel, page 115.
Attributes
Schema and
DTD
The attributes panel is used to view, create, and edit attribute type
declarations. For more information on the attributes panel, see:
Resource
Description
Overview
Schema and
DTD
The overview panel is used to control the creation of schemas that use
XSD Includes, XSD Imports and DTD System Entities (modules), as
well as explore the overall organization of your schema. For more
information on the overview panel, see:
Properties
Advanced
Simple Types
Schema and
DTD
Schema and
DTD
Schema
The advanced panel is used to define or edit parts of XML schemas that
move beyond the description of document structures, such as
namespaces, notations, entities, and processing instructions. For more
information on the advanced panel, see:
The simple types panel enables XML Schema authors to create their
own types (simple types), which can then be applied to element
declarations and attributes in the schema. For more information on the
data types panel, see:
Component Doc or
Notes
Schema and
DTD
The component doc or notes panel provides an area where you can add
schema or declaration level documentation.For more information on the
component doc or notes panel, see:
26
| Chapter 2
Row Selector/ Error Indicator This column contains grey or red dots located at the
start of each row on the left. Right-clicking on a dot brings up a menu offering cut,
copy, paste, and delete or clear options. (Multiple rows can be selected at a time using
the Shift and Ctrl keys). A red dot indicates there is an error in the declaration. If you
hover the mouse cursor over a red dot for a few seconds, a description of the
declaration's error is displayed.
Toolbar Buttons
When editing or viewing XML Tools resources, additional buttons appear on the toolbar.
The toolbar buttons are described in Table 4.
Table 4 Toolbar buttons
Toolbar Button
Resource
Function
All
Checks the resource for errors and reports the results in the
errors panel.
All
Resource
Function
Schema
Instance
Instance
Instance
Menu Options
When editing resources in the XML Tools palette, menus become available for performing
various operations. For Schema and DTD resources, the Schema menu becomes available.
For Instance resources, the XML Menu becomes available. The following sections
describe the options available for these menus.
Schema menu (Schema and DTD resources)
A Schema menu becomes available when editing a Schema resource. The Schema menu
contains two submenus, View and Tools (or Edit).
The View menu provides options to control the panels used for editing, organizing,
and viewing your schemas.
The Tools (or Edit) menu includes options for searching or editing your schema,
checking your schema for errors, and defining reusable schema components.
28
| Chapter 2
Option
Description
Schema Properties
Overview
Properties
Element/Types
Simple Types
Attributes
Advanced
Source
Errors or Validation
Zoom In
Zoom Out
Auto-Update Diagram
Diagram Attributes
Option
Description
Expand
Checks the DTD for errors and reports the results in the
errors panel. (This function can also be performed by
way of the Errors button on the toolbar.)
Define Reusable
Edit Reusable
Find
Find Again
Replace
Replace Again
The Tools menu includes options for inserting elements or attributes and for locating
and replacing text.
The View menu provides options to control the panels used for editing, organizing,
and viewing your XML instance.
The Presentation menu allows you to associate one or more customized views with the
active instance document. The presentations are associated at the schema level, so the
views you create for a single document adhering to a schema become available for all
instances of the schema.
TIBCO Designer Palette Reference
30
| Chapter 2
Option
Description
Insert
Find
Find Again
Replace
Replace Again
Navigator
Factory
Errors
Markup Icons
Content Hints
Default Attributes
Content
Option
Description
Source
Align Labels/Indent
Labels
New
Save As
(Presentation
Listing)
Set Default
Remove
32
| Chapter 2
Elements are displayed as objects (in boxes) within the content model diagram. The boxes
contain element names, data type indicators, and occurrence indicators. An elements
content model may be composed of text, other elements, text and elements, data, or none
of these (as defined in the element definition). The icons used in the content model
diagram are illustrated in Figure 5.
Figure 5 Content Model Diagram
Element icon
Element content
indicator
Type name
Attribute icon
If an elements content model includes other elements (as indicated by the element content
icon), the child elements may also be displayed in the content model panel. To view an
elements children, click once on the parent elements content indicator icon to expand its
tree. To collapse the tree and hide the child elements, click on the parent element object
again.
Sequence indicator symbols do not appear in the content model diagram, but they are
implied. Sequence content models are represented by right-angle brackets, with elements
listed in the order that they must appear. Figure 6 illustrates the presentation of an element
named sequence.
Elements that are separated by the 'or' symbol ('|') in the content model appear to the right
of the parent element, after two diagonal branch indicators, in the order they appear in the
content model. Figure 7 shows the representation of an element named choices with the
content model (choice1 | choice2 | choice3).
Figure 7 Diagram for a choice
Occurrence indicator symbols are used to identify how often an element may or must
appear and are shown in the content model diagram. If occurrence indicators apply to a
group of elements, the elements are illustrated in the content model diagram as branching
off an occurrence indicator symbol. Figure 8 shows a content model similar to that
presented in Figure 7, but with the group of choices made optional and repeatable. The
multichoice element has the content model (choice1 | choice2 | choice3)*.
Figure 8 Optional and repeatable set of choices
If an occurrence indicator applies only to a single element, it appears appended to the box
with the element name. Figure 9 shows a possibilities element whose content model contains
all the occurrence indicators: (seq1, choice1?, choice2+, choice3*).
34
| Chapter 2
Mixed declarations always offer a choice of elements that are both optional and
repeatable. These appear as the mixed element shown below in Figure 10. Note that the
mixed element may contain both text and elements.
Figure 10 Mixed content model
For Schema resources, if a content model is defined as all, a conforming document must
contain exactly one of each element specified in the content model (or zero if an element
is specified as optional), with the elements occurring in any order. (Elements within an all
content model cannot be repeatable.) Figure 11 illustrates the all content model (all1 & all2 &
all3), represented with an arc.
Figure 11 All content model
Diagram Attributes elements attributes are displayed in the diagram. (This option
is selected by default).
Show Used-by Pane displays the used-by panel to appear on the right hand side of
the content model diagram. This panel displays a list of other elements (if any) that
contain the currently selected element in their content model. All potential parent
elements that explicitly include this element in their content models are listed. (If no
parents appear, then the element may only be used as a document root element or in
content models of ANY.) Clicking on any element name in the list makes the element
the currently selected element, changing the display.
36
| Chapter 2
Schema
Resource
The Schema resource of the XML Tools palette enables the creation of an XML Schema
file, as defined by the W3C Recommendation (May 2001).
An XML Schema describes the vocabulary and structures that may appear within an XML
instance document conforming to that schema. Schemas use their own formal grammars to
express document structures and vocabulary. If a set of documents uses the same schema,
the documents may have markedly different contents, but can share common processing.
Applications check documents against the schema, and process them only if the document
passes inspection (more commonly called validation). By providing a common formal
vocabulary for describing the terms on which information will be exchanged, schemas act
as an easily enforced contract between senders and receivers (and creators and consumers)
of information.
When a Schema resource is selected in your project, a set of new panels, menu options,
and toolbar buttons is provided, helping you build and edit your schema from a variety of
different perspectives. Each panel provides access to a different set of tools. The multiple
panels may show information simultaneously, but all of them combine to present a
consistent view of your schema. This chapter describes each of the panels in detail.
For a hands-on demonstration of the schema editing environment, see XML Schema
Exercises on page 68.
Configuration Tab
The Configuration tab has the following fields.
Field
Description
Name
Target Namespace
Schema 37
Description
Schema Name
Target Prefix
Target Namespace
Import Reserved
XML Namespace
Description
elementFormDefault
attributeFormDefault
38
| Chapter 2
Field
Description
blockDefault
finalDefault
id
version
The settings in the Schema Attributes tab are universal, controlling all of the schemas
components. To specify similar properties for an individual component, use the Properties
tab of the properties panel. See Properties Tab, page 56.
Schema Documentation Tab
This tab displays an edit area where you can add schema level documentation for your
schema.
Schema Statistics Tab
The Schema Statistics tab is not editable. The tab displays the number of times a schema
component type is used. The tab has the following fields.
Field
Description
Element Type
Complex Types
Simple Types
Attributes
Schema 39
Field
Description
Attribute Groups
Model Groups
Notations
Includes
Imports
Toolbar
For a description of the buttons that appear on the toolbar when editing Schema resources,
see Toolbar Buttons on page 26.
Schema Menu
A Schema menu becomes available when editing a Schema resource. The Schema menu
contains two submenus, View and Edit.
The View menu provides options to control the panels used for editing, organizing, and
viewing your schemas. The Edit menu includes options for searching your schema.
The Schema menu options are described in detail in Table 5 on page 28.
Elements/Types Panel
The elements/types panel enables you to view, create, and edit element and attribute
declarations and complex type definitions. The elements/types panel is typically the place
you'll start defining your schemas.
The panel is divided into two parts: a graphical view of the content model (the content
model diagram) and an editable list of element declarations and complex type definitions
and their content models (the element/type list panel). The next diagram illustrates the
element/types panel.
40
| Chapter 2
Elements/Types List
The elements/types list, located at the bottom of the elements/types panel, is where much
of the creation and editing of element declarations and complex type definitions takes
place. The next diagram illustrates the element/type list.
Figure 13 Element/Type list
Each element and/or complex type is listed in a row of the table. Information that defines
each item appears in columns across the table and includes the following (from left to
right).
Column
Description
This column allows you to modify the row and detect errors in
the declaration. See Common Columns In Tables on page 25
for more information about this column.
Schema 41
Column
Description
Included Document
Indicator
Element/ Complex
Type
Derives From
42
| Chapter 2
Column
Description
Content
Any
Empty
Mixed
Elements
Schema 43
Column
Description
Content Model/Data
Type
Attributes
44
| Chapter 2
Meaning
None
{}
Meaning
In Content Model
column, click...
Choices
Sequence
&
All
()
()
Schema 45
This declaration requires the MEMO element to contain, in sequence, one or more To
elements, one or more From elements, zero or more CC elements, a single Subject element, a
single Body element, and zero or one Typist elements.
In other cases, a document needs to provide choices. A chapter might require an
introduction, but then permit any combination of sections or sidebars. Sequence
indicators, in combination with occurrence indicators, can make this possible. The content
model for a chapter element might therefore look like:
(Intro, (Section | Sidebar)*)
The Intro element could appear once (and only once) at the start of the chapter, and then
Section or Sidebar elements could follow in any order. (This model is read as an Intro
element followed by zero or more Section or Sidebar elements.)
Example: Building a Content Model
This section steps you through building a content model for an element or complex type
using the buttons provided in the Content Model column. Figure 14 shows a completed
content model.
Figure 14 Completed content model
When referencing elements from other namespaces, be sure to prepend the element name
with the prefix for the external namespace, followed by a colon (e.g. prefix:componentName).
The prefix is listed in the Namespaces tab of the advanced panel. For more information,
see Example: Referencing an element from another namespace on page 54.
46
| Chapter 2
You will build the content model for an element based on the structure of a book. The
content model would likely include several elements, including a Title, an Author, multiple
Chapters, maybe an Appendix (or several), perhaps a Glossary, and possibly an Index. Assuming
these elements are already declared (as shown in the next diagram), the steps to build the
content model for Book appear below:
1. In the row for Book, click in the blank cell under the Content Model column. This is
where the entry for the content model will be created. A series of buttons will appear.
2. Click the Insert button. A pull-down menu of all the element declarations within the
file appears.
3. Select the first element to be part of the content model (in this case, youll start with
Title). Repeat this step, selecting each element that is part of the content model. It is
best to select the sub-elements in sequence if possible, because as each sub-element is
selected, a comma is inserted between items by default to indicate that they are in
Schema 47
sequence. The sub-element will always be inserted where the cursor is placed in the
content model.
If the elements for the content model have not been previously declared, type them in
within the parentheses. When the content model is completed, you will be prompted to
auto-create (declare) the new elements.
4. Which items may be repeatable? Within a book, the chapters usually occur more than
once, so this sub-element needs to be indicated as a repeatable item. Highlight Chapter
in the Content Model, and click on the Repeatable button. This adds a '+' indicator
after Chapter, to indicate it is repeatable. Likewise, there may be more than one
appendix, so highlight Appendix and click Repeatable to add a '+' indicator after Appendix.
5. Which items are optional? Within a book, a glossary or index may not always occur,
so these sub-elements need to be made optional. Highlight Glossary, and click the
Optional button. Likewise, highlight Index, and click the Optional button. This will
place a '?' after each of these sub-elements, to indicate they are optional.
6.
Appendix is also an optional item (not all books have appendices). Highlight Appendix
and click the Optional button. Because Appendix is now both optional and repeatable,
it is indicated with an '*' after it. Press the <Enter> key or click anywhere else in the
element list to complete the content model definition.
the All button, which indicates that the elements can appear in any order, but may not
be repeatable.
The {} button, which is used to set specific occurrence ranges for repeatable elements.
48
| Chapter 2
Schema 49
Attributes Panel
When you select the Schema > View > Attributes menu, or when you click the
Attributes button on the toolbar, the attributes panel becomes the primary panel for
editing. The attributes panel is used to view, create, and edit attribute type declarations.
While you can also create an elements attribute in the element/type list, you must use the
Attributes panel to specify an attributes data type. Constraints, facets and enumeration of
attributes are set from the properties panel when the attribute is selected.
Figure 16 illustrates the attributes panel.
Figure 16 Attributes panel
Each attribute is listed in a row of the panel. Information associated with each attribute
appears in columns across the panel and includes the following (from left to right).
Column
Description
Row Selector/Error
Indicator
This column allows you to modify the row and detect errors in
the declaration. See Common Columns In Tables on page 25
for more information about this column.
Included Document
Indicator
Attribute Name
Element
50
| Chapter 2
Column
Description
Data Type
Schema 51
enumeration are best defined as strings, the xs:string data type is appropriate. For
example:
3. Because GraphicsType can be only be a JPG, TIF, or GIF, these values must be entered in the
attribute type declaration. Click on the Properties button on the toolbar and then click
on the Enumeration tab. In the text box at the top, enter JPG, and then click the Add
button. Follow the same procedure to add TIF and GIF.
52
| Chapter 2
4. A default value can be entered for an attribute. The value must have been defined
under the Enumerations tab. For example, to set the default value of GraphicsType to JPG,
click the Properties tab and enter JPG in the default field.
Overview Panel
When selected from the Schema > View menu or upon clicking the Overview button on
the toolbar, the overview panel loads to the left of the elements/types panel. The overview
panel allows you to control the creation of schemas that use imports and includes, as well
as explore the overall organization of your schema. The overview panel's tools let you
build schemas from declarations in multiple files, creating large composite schemas from
sets of smaller ones, enhancing reusability and simplifying management.
Figure 17 illustrates the overview panel, with a right button menu activated.
Figure 17 Overview panel
Schema 53
Overview Tree
The overview panel provides a tree-like overview of the schema structure. Each schema
component type is represented by an icon, described in the table below.
Icon
attribute
namespace
complex type
model group
attribute group
XML comment
schema document
included schema
A right menu button is provided for each component in the overview tree. From the menu,
you can cut, copy, paste or delete a declaration or module (removing it or changing its
location in the schema). There is also an option to Go to or Edit the component, which
will take you to an area to edit the selected item.
54
| Chapter 2
If the declaration is located in an external schema that has been added to the current
schema, a menu option to unlock the module is provided. Before any edits can be made to
included declarations (identified by a document icon with a red slash), the included
schema must be unlocked. When a module is unlocked, the red line disappears from the
document icon. When you're done editing the included declarations, you can right-click on
the module and lock it again .
Any changes made to unlocked declarations of an included schema will be reflected in the
included schema as well.
Import Button
The Import button of the overview panel allows you to import the namespace of another
schema in your project, making the components defined in the other schema that can be
referenced in your schema. To remove a namespace, right click on the namespace
(labelled with the namespaces prefix) and select Delete from the pop-up menu that
appears.
Example: Referencing an element from another namespace
When building a schema, it is often desirable to reuse components already defined in
another schema. If the other schema belongs to a different target namespace, its
namespace can be added to (technically, imported into) the schema you are building.
To import a namespace and then reference the components from that namespace, follow
these steps:
1. Click the Import button of the overview panel.
2. Browse to and select the schema containing the components you would like to
reference.
Schema 55
The imported namespace will appear as an icon in the overview panels tree and as an
entry in the Namespaces tab of the advanced panel.
3. The components (elements, attributes, complex types, and user-defined simple types)
from the imported namespace can now be referenced within the content models of
your schema. When referencing components from other namespaces, be sure to use
the prefix for the external namespace. In Figure 18, an address element defined in a
different namespace is being used within the content model for a ship-to element.
Figure 18 Referencing an element from another namespace
The prefix used to associate components with the namespace can be changed in the
tab of the Advanced panel.
Namespaces
An imported schema must belong to a different target namespace than the importing
schema. If the external schema shares the same namespace with the schema you are
building, consider reusing its components through the Include option described next.
Include Button
The Include option of the overview panel allows you to include the declarations from
another of your projects schemas into the schema you are currently building. To remove
an included schema, right click on the included schema icon and select Delete from the
pop-up menu that appears.
Example: Including declarations from another schema
When building a schema, it is often desirable to reuse components already declared in
another schema. If the other schema belongs to the same target namespace (or no
namespace) as the schema you are building, the declarations in the other schema can be
added to (technically, included in) the schema you are building.
This example illustrates the steps required to include another schemas declarations into
your schema.
1. Click the Include button of the overview panel.
2. Browse to and select the schema containing the declaration you would like to use. The
included module will appear in the Overview tree, identified by the included
document icon.
3. The included schemas declarations will now appear in the declaration panels for your
current schema and can be used just like any other declaration. The added declarations
56
| Chapter 2
are not editable by default, however. To edit these declarations, right click the
document icon and choose unlock. Be aware, however, that any changes made to the
declarations will be reflected in the original document as well.
An included schema must belong to the same target namespace as the including schema or
to no namespace (in which case it becomes part of the including schemas namespace). If
the external schemas namespace differs from the schema you are building, consider
reusing its components through the Include option described above.
Properties Panel
When selected from the Schema > View menu or upon clicking the Properties button on
the toolbar, the properties panel loads to the left of the elements/types panel. The
properties panel includes three tabs:
Select the Properties tab to specify advanced properties on the selected declaration.
For more information this tab, see Properties Tab.
Select the Facets tab to apply facets that constrain the value of a data type. For more
information on this tab, see Facets Tab on page 59.
Select the Enumeration tab to create a list of acceptable values for the specified data
type. For more information on this tab, see Enumeration Tab on page 61.
Properties Tab
The Properties tab is accessed by clicking the Properties button on the toolbar. The
Properties tab is used for setting and viewing component level properties. The properties
control how the component can be used within the Schema or within an XML instance
document.
Schema 57
The Properties tab becomes active when an element, complex type, attribute, or Simple
type declaration (row) is selected in its respective panel. The fields available within the
Properties tab, summarized Table 9 below, vary depending on the selected declaration type.
Table 9 Properties tab fields
Field
Description
id
abstract
block
Use the block property to control whether types can be replaced by their
derived types in instance documents. The block property takes one of
the following values:
substitution
restriction extension
extension substitution
58
| Chapter 2
Description
final
The final property allows you to prevent new types from being derived
from the selected simple or complex type. The final property takes one
of the following values:
restriction
extension
default
Use this field to specify a default value for the selected element or
attribute declaration. If the element or attribute appears in an XML
instance, it can have any value that corresponds to the data type. If the
element or attribute does not appear, the schema processor will assign
the element or attribute's value to be what you've specified in this
field.
fixed
Use this field to specify a fixed value for the selected element or
attribute declaration. If the element or attribute appears in an XML
instance document, it must match the value you've specified in this
field. If the element or attribute does not appear, the schema parser
will assign the element or attributes value to be what you've specified
in this field.
nillable
substitution
group
Schema 59
Description
form
The settings in the Properties tab apply to the selected component only. To apply similar
properties to all instances of a component type in the schema, use the Attributes tab of the
configuration panel. See Schema Properties Panel on page 36 for more information.
Facets Tab
The Facets tab is used to further constrain the acceptable values for your schemas
components by applying facets to your simple types (data types). Accordingly, the Facets
tab becomes applicable when a declaration uses a simple type, such as a text-only element
declarations, attribute declarations, and user-derived data type definitions.
When constraints are applicable, the Facets tab can be accessed by:
clicking the Properties button on the Toolbar and then clicking the Facets tab of the
properties panel.
clicking the Facets button in the Simple types column of the elements/types panel.
clicking the Facets button in the Base type column of the Simple types panel.
clicking the Facets button in the Data type column of the attributes panel.
The constraining facets available within the Facets tab, summarized in the table below,
vary depending on the type of data type being used.
Facet
Description
Make list
60
| Chapter 2
Facet
Description
length
minLength
maxLength
whiteSpace
totalDigits
fractionDigits
pattern
maxInclusive
maxExclusive
minInclusive
minExclusive
Schema 61
When working within the elements/types panel or attributes panel, the constraints applied
to a data type exist within the context of the element or attribute declaration only. That is,
the constrained data type is not reusable. To create a reusable data type with a given set of
constraints, use the data types panel.
Enumeration Tab
The Enumeration tab allows you to enumerate allowable values of a specified simple type
(data type). Accordingly, the Enumeration tab becomes applicable when a declaration uses
a simple type, such as a text-only element declarations, attribute declarations, and
user-derived data type definitions.
When an enumeration is applicable, the tab can be accessed by clicking the Properties
button on the Toolbar, and then clicking the Enumeration tab in the properties panel.
In the text box at the top of the Enumeration tab, enter a value and then click Add. Repeat
this procedure for each of the enumeration's values. The values will appear in the list box
beneath the text box used for input. You can use the Up and Down buttons to reorder the
values in the list. You can also select a value in the list and either Delete it or Replace it
with a value entered in the text box at the top. As you edit the enumeration in the
Enumeration tab, the current values are reflected in the appropriate column of the active
panel.
Advanced Panel
When you choose the Schema > View > Advanced menu, the advanced panel becomes
the primary panel for editing. The advanced panel allows you to define or edit parts of
XML schemas that move beyond the description of document structures. The advanced
panel consists of three tabs.
Namespaces Tab
Notations Tab
Namespaces Tab
The Namespaces tab provides an inventory of the external namespaces being used by your
schema. The XML Schema namespace (unless designated as the default namespace) and any
namespaces added by way of the Import button of the overview panel will appear in the
Namespaces tab.
The Namespaces tab permits only limited editing of the namespace declaration:
62
| Chapter 2
The Namespaces tab cannot be used to add a new namespace or change the URI or
location for an existing namespace. These operations must be performed within the
overview panel.
Each namespace is listed in a row of the panel. Information associated with each
namespace appears in columns across the panel and includes the following (from left to
right):
Column
Description
Row Selector/Error
Indicator
Included Document
Indicator
Prefix
Enter or edit the prefix for the namespace. The prefix is used
to link a component with its namespace and to distinguish the
component throughout the body of the schema from those
components defined in other namespaces. Typically the prefix
represents an abbreviation for the type of document contained
in the namespace.
Namespace
Location
The target namespace for your schema will not be displayed in the Namespaces tab. Target
namespace information is available in the Target Namespace tab of the Schema Properties
panel.
Schema 63
Notations Tab
Notations allow you to describe a new data type or file type. The description involves a
name for the type and a link to more information on the type or to programs that can
process the type. For example, the notations declared in Figure 19 provide information on
ISO8601 dates and times, and Java integers. Either could be used for a data type and will
appear as an option in the type menus that appear in the elements panel and attributes
panel.
Figure 19 Notations tab of the advanced pane
Each notation is listed in a row of the panel. Information associated with each notation
appears in columns across the panel and includes the following (from left to right).
Column
Description
Row Selector/Error
Indicator
Included Document
Indicator
Name
Location
Enter the URL that will serve as the system identifier for
the notation. System identifiers are not required for
notations, though at least one identifier (system or public)
must appear. System identifiers may point to standards
describing the content, or to programs that can actually
process it.
64
| Chapter 2
Column
Description
Public Name
Notation information is processed by the parser only minimally; the applications that
process your documents will need to provide an extra level of support to interpret
notations.
Each simple type is listed in a row of the panel. Information associated with each simple
type appears in columns across the panel and includes the following (from left to right).
Column
Description
Row Selector/Error
Indicator
Included Document
Indicator
Schema 65
Column
Description
Name
Base Type
The Base Type field indicates the existing simple type you
would like to constrain to create the new simple type. To
specify a base type, click the Type button in the Base Type
column and choose a type from the drop-down menu of
built-in types.
Note: For a description of XML Schemas built-in data
types, see
http://www.w3.org/TR/xmlschema-2/#built-in-datatypes
User-defined types, such as rating, can also be used as base
types. To further constrain rating, use the Insert
user-defined type button within the Base Type column.
Once a new simple type has been defined, it becomes a choice in the Insert menus of the
elements/types panel and attributes panel, when appropriate.
Example: Creating a User-Derived Simple Type
In this example a new simple type, called rating is derived. The new type can be any integer
from 1 to 10.
1. In the simple types panel, enter the name for the new type.
2. Tab to the Base Type field and use the Native Type button to select the type
xs:positiveInteger.
3. Click the Facets button, which loads the Facets tab of the properties panel.
4. In the properties panel, use the minInclusive and maxIncusive facets to restrict the
acceptable values of rating to positive integers from 1 to 10.
66
| Chapter 2
The rating type is now declared and will become a choice on the User Defined Type
menu available in the elements/types panel, the attributes panel, and the simple types
panel.
Validations Panel
When selected by way of the Schema > View > Validation menu, the validation panel
appears between the active editing panel and the configuration panel. The validation panel
displays errors or warnings found when a new schema is loaded, as well as errors or
warnings detected throughout the editing process.
The validations panel indicates the total number of errors or warnings and provides a list
of errors and details about the errors in this panel. Clicking on the error message will take
you to the source of the error.
A red selector button in a declaration panel is indicative of an error.
To update validation information in the schema after correcting an error, it's good practice
to reevaluate again by way of the Revaluate button on top of the panel.
Schema 67
The Schema Documentation tab of the Schema Props panel provides an area where you
can add schema level documentation to your schema. The Documentation tab of the
Component Doc panel allows you to add component level documentation and document
individual declarations and preview their source. When selected by way of the Schema >
View menu, the Component Doc panel appears between the active editing panel and the
configuration panel.
When the Component Doc panel reflects the selected declaration, the following tabs are
available:
Tab
Description
Documentation
Source Preview
XML Schema uses two elements for annotations: documentation and appinfo. The
Documentation tab displays and adds documention annotations only, which are intended to
facilitate human understanding of the schema. There is no facility for adding appinfo
annotations through the Component Doc panel.
Source Panel
When selected by way of the Schema > View > Source menu or upon clicking the Source
button on the toolbar, the source panel becomes the primary panel for editing. The source
panel allows you to edit the source code of your Schema directly. If you are comfortable
with Schema syntax, editing your declarations directly may occasionally be useful or even
convenient. Even if you don't want to edit your Schemas directly, the source panel
provides another way to examine your declarations.
To make the other panels reflect the changes you've made, click Reparse at the top of the
panel. Any errors found upon reparse will be listed in the Validation panel.
68
| Chapter 2
Description
price.list
manufacturer
name
date.issued
product
sku
product.name
price
description
promotion
start.date
end.date
Getting Started
To create the project and the manufacturer schema:
TIBCO Designer Palette Reference
1. In the project panel, create, then select a project folder named QuickTour.
2. Drag a Schema icon from the XML Tools palette into the design panel. This creates a
Schema resource.
3. Double click the Schema resource in the design panel.
A series of new panels will appear.
4. Resize the panels, so that the elements/types panel is prominently displayed.
The elements/types panel presents an inventory of all of the elements and complex
types allowed within a document conforming to this schema. The elements/types
panel consists of the content model diagram (upper half) and the element/type list
(lower half). The element/type list, where most of the work in this exercise will be
performed, has a tabular format, with the fields in each row identified by column
headings.
5. To define the manufacturer root element, follow these steps:
a. In the Element column, select root and replace it with manufacturer.
b. Tab across to the Attributes column and type in name. Here you can define
attributes for an element. When entering multiple attributes, commas should
separate them.
You can navigate around the tables in each panel by using ENTER, TAB, SHIFT-ENTER,
and SHIFT-TAB.
6. To create the next element, move your cursor to the row below manufacturer and type
date.issued.
70
| Chapter 2
c. Tab to the next field. (Notice that the column heading changes from Content
Model to Data Type.) To provide the date.issued element with an appropriate data
type, select date from the menu that appears upon clicking Insert.
8. To specify that the manufacturer element must always include the date.issued element
a. Move to the Content column on the manufacturer row
b. Select Elements from the Content Type menu. This restricts the content model
for manufacturer to elements only.
c. Tab to the Content Model column and click the insert button.
d. Select date.issued to restrict the contents of manufacturer to one and only one date.issued
element.
You are now ready to create a second element called product.
1. Move to the empty line below date.issued and type product. Press tab. Select Elements
from the Content Type menu and press tab.
2. Move to the Content Model column for product, position your cursor inside the () and
type sku, product.name, price, description, promotion.
The commas between elements indicate a Sequence (this followed by this followed by
this). Elements may also represent a Choice (this or this or this). Choice uses a | rather
than a , between element names. In the Content Model column, groups of elements can
be EITHER choices or sequences. (For more information on sequence indicators see
Building Content Models: Occurrence and Sequence Indicators on page 44).
When adding elements to a content model (within the Content Model column), if your
input exceeds the column width, type Ctrl+E or select Expand from the Schema>View
menu to open a larger window for editing the selected area.
3. Tab from this field. The Auto Create dialog box appears. Click the Globally defined
button, then click Create. (For the purposes of this exercise, all declarations will be
global.)
4. As it is currently defined, all elements are required. At times, you may want an
element to be optional. For the purposes of this exercise, make description an optional
element:
a. Go back to the product content model and highlight description.
b. Once highlighted, click the optional button on the tool bar that appears. Notice
the '?' that was appended to description.
For more information on occurrence indicators, see Building Content Models: Occurrence
and Sequence Indicators on page 44.
5. Make price a decimal data type by clicking on price where it appears in the Element
column. Tab over to the Content column and select Type from Content Type drop
down menu. Tab over to the Data Type column and choose decimal from the Insert
menu.
6. A promotion is a discounted price over some period of time. This will be represented
using a combination of elements and attributes. Make a content model for promotion by
specifying Elements in the Content column and then entering price into the Content
Model column.
7. Tab to the Attributes column for promotion and enter start.date, end.date. Press Tab.
To further refine the definitions of these attributes, you can right-click on each of their
names and choose Go to <name>or click Attributes on the toolbar. The attributes
panel will appear with options for data typing the attribute and for indicating its usage
(optional, required, default, fixed, or prohibited).
72
| Chapter 2
8. Within the attributes panel, indicate that the values of the start.date and end.date attributes
should be of type date.
You can use the navigation buttons on the toolbar or the Schema>View menu to open and
close between the editor's panels.
XML schemas typically have a single root element that contains all other elements. In this
schema, our root element will be called price.list.
1. Return to the elements/types panel and add an element named price.list. Press tab and
specify Elements content.
2. Enter manufacturer, product+ as the content model. (The plus sign designates the
productelement as required and repeatable.) Tab out of the field to update the schema.
Congratulations! You have completed creating the schema. In the configuration panel,
name the file pricelist. You may also want to change the automatically generated
target namespace to a URL meaningful to your organization.
Element
Content
Indicator
For each element and attribute in the diagram, a right button menu offering key editing
functions is provided. Right-click the background to zoom in or out of the diagram as a
whole.
74
| Chapter 2
Source view
To view the actual schema syntax for the schema you've created, open the source panel by
clicking on the source panel icon on the main toolbar. The notes panel, which allows you
to enter supplemental information about any element or attribute, also allows you to view
the source for individual declarations. Open the notes panel using the Schema menu
(Schema > View > Notes). Click on the Source Preview tab at the bottom of the notes
panel to view the source for the element declaration currently selected in the element list.
Conclusion
Congratulations! You have completed the exercise. This tutorial introduced the basic steps
required to create an XML Schema. Exercise 2: Defining and Deriving Complex and
Simple Types on page 74 will teach you how to create and use your own complex and
simple types.
To learn how to build a sample XML document based on the schema you have just built,
see XML Instance Exercise on page 130.
Description
Address
Complex type from which two other complex types are derived
name
street
city
USAdress
state
zip
UKAddress
postcode
Component
Description
exportCode
USState
Getting Started
1. In the project panel, create and select a project folder named QuickTour.
2. To create a new Schema resource, drag a Schema icon from the XML Tools palette
into the design panel.
3. Within the design panel, double click the schema icon. A series of new panels will
appear. Resize the panels, such that the elements/types panel is prominently displayed.
The elements/types panel presents an inventory of all of the elements and complex
types allowed within a document conforming to this schema. The elements/types
panel consists of the content model diagram (upper half) and the element/type list
(lower half). The element/type list, where most of the work in this exercise will be
performed, has a tabular format, with the fields in each row identified by column
headings.
4. To create a new complex type, click in the first field of the second row (under column
D). The field initially displays an E, an indication that the row is used for an
element declaration. To use the row for a complex type definition, click Decl Type and
choose T from the menu.
5. Tab to the adjacent empty field in the second column, and type in Address as the name
of the complex type. Tab to the Derives From column. Notice that the second
column's heading has changed from Element to Complex Type.
6. Later in this exercise you'll use the Derives From column to extend the Address
complex type. For now, however, we can bypass this field, and tab to the Content
field. The content will default to Elements, which is the desired content. (Other
content types could be selected by way of the menu presented by clicking the Content
Type button.)
76
| Chapter 2
7. Tab to the Content Model field. With the pointer positioned between the parentheses,
type in the following elements, separated by commas: name, street, city.
8. Tab from the Content Model field. The Auto Create dialog box appears. Indicate
that the new elements should be Globally defined and then click Create. (For the
purposes of this tutorial, all declarations will be global.)
Before you continue to build the address schema, save your progress to this point. In
the configuration panel, name your schema address. You should also specify a target
namespace to differentiate this schema from all others. The Target Namespace field
will be pre-populated with a randomly generated namespace. Change this namespace
to reflect a URL meaningful to your organization. Finally add a prefix, such as addr,
to be used to indicate that the components you are defining belong to your namespace.
Click Apply.
The Apply button makes the file available to other resources in the project. The schema is
saved when the entire project has been saved.
Continue building the address schema by defining a simple type named USState.
1. In the Toolbar, click the Data Types button.
2. In the first field in the Name column, type USState. Tab to the Base Type column. Click
Type and choose string from the drop-down menu.
3. Tab to the Options column. To define a list of possible values for USState, click the Edit
Enums button. The properties panel appears in the lower left of the application
window with the Enumeration tab active. In the text box at the top of this tab, enter the
value 'AK' (without quotes) and then click Add. Follow the same procedure for the
values 'AL' and 'AR'. (Of course, there are more postal abbreviations, but lets stop
here.)
4. The enumeration is automatically created in the Options column of the data types
panel.
5. Tab to the Content column and make sure element content is reflected. (Elements
should be pre-selected as the most appropriate model).
78
| Chapter 2
6. Tab to the Content Model column. Inside the parentheses, type state, zip. Tab out of the
Content Model column.
7. In the Auto-Create dialog box that appears, click the Globally defined radio button and
then click Create.
8. In the row for the element state, navigate to the Data Type column. Click Insert
user-defined type and select USState from the menu of options.
9. In the row for the element zip, click in the Data Type column. Click Insert to display a
menu of XML Schema data types. Choose More on this menu to display a submenu.
Choose positiveInteger as the data type for zip.
You are now ready to define some elements on your own.
1. Define a complex type named UKAddress as an extension of Address. Add the element
postcode to the content model and create postcode as a global declaration. Also give
UKAddress and attribute called exportCode.
2. For further practice, define a simple type (data type) called UKPostcode and assign it to
the postcode element. The new simple type can be an extension or restriction of an
existing simple type. For example, to be very precise, you could restrict a string by
specifying a regular expression (pattern) that the type must match.
The address types created in this schema could later be applied to elements. For example,
shipTo and billTo elements could be added to this schema and be declared as having the type
USAddress. These type definitions could also be used in other schemas. As a final exercise,
create a new schema resource and import the address schema namespace you created in
this tutorial. The easiest way to import a namespace is to use the Add Namespace option
of the overview panel, which enables you to browse and select another schema from your
project. Once the address schema created in this exercise has been imported, create a shipTo
of type USAddress. To references an element, attribute or type existing in another
namespace, use the prefix for the external namespace followed by a colon and the
component name. Figure 22 shows a new schema referencing the USAddress type created in
this schema.
Conclusion
This exercise serves as an introduction to XML Schema design. Review the
documentation to learn more about XML Schema functionality and to facilitate your
implementation of advanced features.
80
| Chapter 2
DTD
Resource
The DTD resource of the XML Tools palette enables the creation of a DTD (Document
Type Definition), as defined by the W3Cs XML 1.0 Recommendation.
A DTD shares the same role as an XML Schema, describing the vocabulary and structures
that may appear within an XML instance document. While DTDs are supported in XML
1.0-compliant parsers and applications, they offer very limited data typing and are
considered the 'first generation' of XML schemas.
When a DTD resource is selected in your project, a set of new panels, menu options, and
toolbar buttons are provided, helping you build and edit your DTD from a variety of
different perspectives. Each panel provides access to a different set of tools. The multiple
panels may show information simultaneously, but all of them combine to present a
consistent view of your schema. This chapter describes each of the panels in detail.
For a hands-on demonstration of the editing environment, see DTD Exercise on page 108.
Configuration Panel
When editing a DTD resource, the configuration panel provides two tabs for setting or
viewing high-level properties.
Configuration
The Configuration tab has the following fields.
Field
Description
Name
This is the name of the file when persisted. The *.dtd suffix will be
automatically added.
Statistics
The Statistics tab is not editable. The tab displays the number of times a schema
component type is used. The Statistics tab has the following fields.
Field
Description
Elements
Complex Types
DTD 81
Field
Description
Attributes
Attribute Groups
Model Groups
Data Types
Namespaces
Included Modules
Notations
Processing Instructions
Toolbar
For a description of the buttons that appear on the toolbar when editing DTD resources,
see Toolbar Buttons on page 26.
Schema Menu
A Schema menu becomes available when editing a DTD resource. The Schema menu
contains two submenus, View and Tools.
The View menu provides options to control the panels used for editing, organizing, and
viewing your schemas. The Tools menu includes options for searching or editing your
schema, checking your schema for errors, and defining reusable schema components.
The Schema menu options are described in Table 5 on page 28.
Elements Panel
The elements panel enables you to view, create, and edit element and attribute
declarations. The elements panel is typically the place you'll start defining your schemas.
The panel is divided into two parts: a graphical view of the content model (the content
model diagram) and an editable list of element declarations and their content models (the
element list).
82
| Chapter 2
Description
Row
Selector/Error
Indicator
This column allows you to modify the row and detect errors in the
declaration. See Common Columns In Tables on page 25 for more
information about this column.
Included
Document
Indicator
This column indicates whether the declaration comes from the file
being edited or from an external schema. See Common Columns In
Tables on page 25 for more information about this column.
Warning: Any changes made to unlocked declarations of an
external parameter entity will be reflected in the external schema as
well.
Element Name
DTD 83
Column
Description
Content
Type Data types that constrain text -- like integer or date -- are
not afforded by DTDs. Accordingly, selecting the Type option is
equivalent to selecting the Text option.
84
| Chapter 2
Column
Description
Content Model
Attributes
The element list can be sorted at any time by clicking on one of the column headers. For
example, to sort the list by the name of the element, click on the Element column header.
Or, to sort the list by content model, click on the Content Model column header, and so
forth. Shift-clicking on a column header sorts the column in descending order.
TIBCO Designer Palette Reference
DTD 85
Meaning
In Content Model
column, click...
None
Repeatable and
Optional.
In Content Model
column, click...
Meaning
Choices
Sequence
()
()
86
| Chapter 2
This declaration requires the MEMO element to contain, in sequence, one or more To
elements, one or more From elements, zero or more Cc elements, a single Subject element, a
single Body element, and zero or one Typist elements.
In other cases, a document needs to provide choices. A chapter might require an
introduction, but then permit any combination of sections or sidebars. Sequence
indicators, in combination with occurrence indicators, can make this possible. The content
model for a chapter element might therefore look like this:
(Intro, (Section | Sidebar)*)
The Intro element could appear once (and only once) at the start of the chapter, and then
or Sidebar elements could follow in any order. (This model is read as an Intro element
followed by zero or more Section or Sidebar elements.)
Section
You will build the content model for an element based on the structure of a book. The
content model would likely include several elements, including a Title, an Author, multiple
Chapters, maybe an Appendix (or several), perhaps a Glossary, and possibly an Index. Assuming
these elements are already declared, the steps to build the content model for Book appear
below:
1. In the row for Book, click in the blank cell under the Content Model column. This is
where the entry for the content model will be created. A series of buttons will appear.
You should see the text cursor blinking inside the parentheses.
DTD 87
2. Click the Insert button. A pull-down menu of all the element declarations within the
file appears.
3. Select the first element to be part of the content model (in this case, we'll start with
Title). Repeat this step, selecting each element that is part of the content model. It's best
to select the sub-elements in sequence if possible, because as each sub-element is
selected, a comma is inserted between items by default to indicate that they are in
sequence. The sub-element will always be inserted where the cursor is placed in the
content model.
If the elements for the content model have not been previously declared, type them in
within the parentheses. When the content model is completed, you will be prompted to
auto-create (declare) the new elements.
4. Which items may be repeatable? Within a book, the chapters usually occur more than
once, so this sub-element needs to be indicated as a repeatable item. Highlight Chapter
in the Content Model, and click on the Repeatable button. This adds a '+' indicator
after Chapter, to indicate it is repeatable. Likewise, there may be more than one
appendix, so highlight Appendix and click Repeatable to add a '+' indicator after Appendix.
5. Which items are optional? Within a book, a glossary or index may not always occur,
so these sub-elements need to be made optional. Highlight Glossary, and click the
Optional button. Likewise, highlight Index, and click the Optional button. This will
place a '?' after each of these sub-elements, to indicate they are optional.
88
| Chapter 2
6.
is also an optional item (not all books have appendices). Highlight Appendix
and click the Optional button. Because Appendix is now both optional and repeatable,
it is indicated with an '*' after it. Press the <Enter> key or click anywhere else in the
element list panel to complete the content model.
Appendix
This example did not require the use of the Choices button, which indicates choices
between several sub-elements (sub-elements are separated by an '|' indicator).
Building Content Models: Content Model Editor
If the space provided by the Content Model column is too small to see all of an element
content model, select Expand from the Schema > View menu or press the Ctrl-E keys to
bring up the Content Model Editor dialog box. The Content Model Editor provides more
room for editing, making it easier to work with larger content models, and gives easy
access to the elements and reusables (internal parameter entities). To add an element or
reusable to a content model, click on its name. Occurrence and Sequence indicator buttons
are also available in the editor. The Apply button adds the edited content model to the list,
but leaves the editor open. The Cancel button closes the editor without making any
changes to the content model in the list, while the Save button closes the editor and makes
the changes. The Content Model Editor is shown in Figure 24 on page 88.
Figure 24 Content model editor
DTD 89
Description
Model Group
Attribute Group
Constraints
Text
While you can edit reusables directly in the Parameter Entities Tab of the advanced panel,
it is generally safer to use the reusable editors, especially for attribute sets. Direct editing
is acceptable, but you'll need a firm understanding of XML 1.0 DTD syntax.
Once your reusables are created, they become available as choices by way of the Insert
button within the Content Model and Attributes column of the element list. Notice that
parameter entities, when referenced, are prepended with a %. Figure 25 illustrates the use
of a reuseable within a content model.
90
| Chapter 2
To edit or delete an existing group definition, select the Edit Reusables option of the
Schema menu (Schema > Tools > Edit Reusable).
Attributes Panel
When selected from the Schema > View menu or upon clicking the Attributes button on
the toolbar, the attributes panel becomes the primary panel for editing. The attributes panel
is used to view, create, and edit attribute type declarations. While you can also create an
elements attribute in the element list, the attributes panel is required to specify an
attributes data type, edit its constraints, indicate its use, and set a default value. The
attributes panel is shown in Figure 26.
Figure 26 Attributes panel
DTD 91
Each attribute is listed in a row of the panel. Information associated with each attribute
appears in columns across the panel and includes the following (from left to right).
Column
Description
Row
Selector/Error
Indicator
This column allows you to modify the row and detect errors in
the declaration. See Common Columns In Tables on page 25 for
more information about this column.
Included
Document
Indicator
Attribute Name
Element
Data Type
92
| Chapter 2
Column
Description
Constraints
Use
The Use column lets you indicate how attributes will be used in
XML instance documents. Clicking the Select Use button will
enable you to select from the following options:
Value
DTD 93
Meaning
ID
IDREF
IDREFS
ENTITY
ENTITIES
NMTOKEN
NMTOKENS
94
| Chapter 2
Meaning
enumerated
NOTATION
DTD data types are not oriented toward data in the sense used by programmers and
database developers, but can be useful for describing relationships within documents and
for constraining data to a list of acceptable values. If you require stricter, data-oriented
data types, consider using Schema resources.
Example: Creating or Editing an Attribute
Attributes are created by declaring an attribute type in the attributes panel or by entering
attribute names for an element in the element list of the elements panel.
New attributes entered in the element list of the elements panel are automatically created
in the attributes panel with a data type of string.
Creation of an attribute type within the attributes panel consists of several steps. For
example, assume you have an element Picture, with the attributes GraphicsType. GraphicsType is
an attribute that tells us if a picture is a JPG, TIF, or GIF file. Here are steps for declaring
GraphicsType:
1. Click on a blank line under the Attributes Name column. Enter the attribute name
GraphicsType. Names must begin with a letter and may contain numbers, underscores,
dashes, and full stops -- typically periods.
DTD 95
2. Select the cell under the next column heading, Element, in the row for GraphicsType.
Since we know this attribute will be used by the element Picture, type in Picture.
3. Select the cell under the next column heading, Data Type.
An attribute type declaration, by default, sets the data type for an attribute to string. In
this example, GraphicsType will be enumerated (that is, it will only ever have the value of
JPG, TIF, or GIF).
4. Click the Type button and select enumeration from the XML Types menu.
Since GraphicsType can be only be a JPG, TIF, or GIF, these values must be entered in the
attribute type declaration.
5. Click on the cell under the column heading Constraints, then click on the Edit Enums
button to display the properties panel, with the Enumeration tab active.
6. In the text box at the top, enter 'JPG' (without quotes), and then click the Add button.
7. Follow the same procedure to add 'TIF' and 'GIF'.
As you enter values in the Enumeration tab, they are inserted in the Constraints
column of the attributes panel. Notice that the JPG, TIF, and GIF entries are separated
by the OR indicator ('|').
A default value can be entered for an attribute.
8. To set the default value of GraphicsType to JPG, tab into the cell under the Use column for
the row GraphicsType. Click the Select Use button to display a menu of choices.
Choose 'default' from the drop-down menu.
9. Tab to the Value column and enter the default value, which should match one of the
enumerated values.
This completes the declaration for GraphicsType.
96
| Chapter 2
Overview Panel
When you choose Schema >View >Overview or click the Overview button on the
toolbar, the overview panel loads to the left of the elements panel. The overview panel
allows you to control the creation of schemas that use multiple modules, as well as explore
the overall organization of your schema. The overview panel's tools let you build schemas
from declarations in multiple files, create large composite schemas from sets of smaller
ones, enhance reusability and simplify management. Figure 27 illustrates the overview
panel with the right button menu activated.
Figure 27 Overview panel
Overview Tree
The overview panel provides a tree-like overview of the schema structure. Each schema
component type is represented by an icon, described in the table below.
Icon
attribute
DTD 97
Icon
XML comment
schema document
A right-button menu is provided for each component in the overview tree. From the menu,
you can cut, copy, paste or clear a declaration or module (removing it or changing its
location in the schema). There is also an option to Go to or Edit the component, which
will take you to an area to edit the selected item.
If the declaration is located in an external schema that has been added to the current
schema, a menu option to unlock the module is provided. Before any edits can be made to
included declarations (identified by a document icon with a red slash), the included
schema must be unlocked. When a module is unlocked, the red line disappears from the
document icon. When you are done editing the included declarations, you can right-click
on the module and lock it again. .
Any changes made to unlocked declarations of an included schema will be reflected in the
included schema as well.
Add Module...Button
The Add Module option of the overview panel allows you to include the declarations from
another of your projects schemas into the schema you are currently building (through an
external parameter entity reference). To remove an included schema, right click on the
included schema icon and select Clear from the pop-up menu that appears.
Example: Including declarations from another schema
When building a schema, it is often desirable to reuse components already declared in
another schema.This example illustrates the steps required to include another schemas
declarations in your schema.
TIBCO Designer Palette Reference
98
| Chapter 2
Modules can also be added using the Parameter Entities tab of the advanced panel.
3. The included schemas declarations now appears in the declaration panels for your
current schema and can be used just like any other declaration. The added declarations
are not editable by default, however. To edit these declarations, right click the
document icon and choose unlock. Be aware, however, that any changes made to the
declarations will be reflected in the original document as well.
Properties Panel
When selected from the Schema > View menu or upon clicking the Properties button on
the toolbar, the properties panel loads to the left of the elements panel. The properties
panel includes three tabs -- Properties, Constraints, and Enumeration. When working with
a DTD resource, only the Enumeration tab is applicable. When an attribute is of type
enumeration, use the Enumeration tab to create a list of possible values.
Enumeration tab
The Enumeration tab allows you to enumerate allowable values for an attribute.
Accordingly, the Enumeration tab becomes applicable when an attribute is declared to be
of type enumeration. The Enumeration tab is shown in Figure 28.
DTD 99
clicking the Properties button on the Toolbar, and then clicking the Enumeration tab in
the properties panel.
clicking the Edit Enums button in the Data Types column of the attributes panel
In the text box at the top of the Enumeration tab, enter a value and then click Add. Repeat
this procedure for each of the possible values. The values will appear in the list box
beneath the text box used for input. You can use the Up and Down buttons to reorder the
values in the list. You can also select a value in the list and either Delete it or Replace it
with a value entered in the text box at the top. As you edit the enumeration in the
Enumeration tab, the current values are reflected in the Constraints column of the
attributes panel.
Advanced Panel
When selected from the Schema > View menu, the advanced panel becomes the primary
panel for editing. The advanced panel allows you to define or edit parts of a DTD that
move beyond the description of document structures. The advanced panel consists of the
Parameter Entities tab, the General Entities tab, the Notations tab, and the Processing
Instructions tab.
100
| Chapter 2
Once you have created a parameter entity, you can reference it within other declarations.
To use parameter entity content, simply reference the entity using the following syntax:
%entityName;
DTD 101
External parameter entities have names and references to external resources. External
parameter entities must have system identifiers (either a full or relative path name to
another DTD in your project) and may optionally have public identifiers as well. An
'Include in DTD' check box is provided that makes it easy to include external modules in
your DTDs. If the external DTD contains multiple declarations, you'll want to make sure it
gets checked.
Modules that have been added through the overview panel will appear here, and modules
added here will appear in the overview panel. When you add a module, its content is
downloaded for use in the current schema. The parameter entity declarations for that
module will also appear in the parameter entity window, preceded by an icon if the module
hasn't been opened for editing in the overview panel. A listing of external parameter
entities is shown in Figure 31.
Figure 31 Listing of external parameter entities
In the System column, you can use the Insert File Name button to browse for and select a
file in your project containing the desired declarations.
General Entities
DTDs provide facilities for defining some forms of content as well as document structure.
Documents can include this predefined content by reference, allowing schema developers
to centralize management of content as well as structure. Typically this approach is used to
avoid search-and-replace on content that will be changing, or to include large chunks of
'boilerplate' content within a document.
In the General Entities tab of the advanced panel, the following types of entities can be
defined:
The top panel is used to define internal general entities, while the bottom panel is used to
define external general entities and unparsed entities.
102
| Chapter 2
Like the other panels, the rows begin with a selector button that can be used to select the
entire row for cut, copy, paste, and clear operations. If there is an error in the declarations
made in a row, the row selector button will turn red. The column between the selector and
the entity name will contain a document icon if the declaration has been included from
another file. If it came from another file, it cannot be edited, though it can be copied and
pasted into the current file.
The name for an entity is entered and displayed in the Name column. (Entity names must
begin with a letter and may contain numbers, underscores, dashes, and full stops -typically periods).
Internal General Entities
Defining an internal general entity requires only the entry of a name and a value. The
value must be plain text or well-formed XML - all start tags in the entity must have end
tags and vice versa. Figure 32 illustrates the creation of two internal general entities.
Figure 32 Defining internal general entities
Documents using this schema may now include the content defined in the general entity
area using entity references, which look like:
&entityName;
The parser strips out the entity references and replaces them with the value of the entity.
For example, using the entities described in the figure above,
Our new &productName; (&productNum;) is the finest of its breed.
will become:
Our new Capital 8850 (CXY-8850) is the finest of its breed.
DTD 103
External general entities are referenced from documents the same way that internal
general entities are referenced -- using the &entityName; syntax. In this case, &play; would
reference the XML document 'othello.xml' and include it in a document.
In the System column, you can use the Insert File Name button to browse for and select a
file in your project containing the desired content.
External Unparsed Entities
The last kind of entity that can be created in the general entities tab is the unparsed
external entities. Unparsed entities reference non-XML content, like graphics files or data.
Documents reference unparsed entities through the use of attributes of type ENTITY or
ENTITIES. To create an unparsed entity, provide the same information as would be
provided for an external general entity (name, system identifier, optional public identifier),
but also provide a notation in the Notation column to identify the file type that is being
referenced. This notation must be declared on the Notations tab. The 'myGraphic'
unparsed entity shown below in Figure 34 is an example of an unparsed entity.
Figure 34 Defining an external unparsed entity
104
| Chapter 2
Notations
Notations allow you to describe a new data type or file type. The description involves a
name for the type and a link to more information on the type or to programs that can
process the type. For example, the notations declared in Figure 35 provide information on
ISO8601 dates and times, and Java integers. Either could be used for a data type and will
appear as an option in the type menus that appear in the elements panel and attributes
panel.
Figure 35 Notations
Each notation is listed in a row of the panel. Information associated with each notation
appears in columns across the panel and includes the following (from left to right).
Column
Description
Row Selector/Error
Indicator
Included Document
Indicator
Name
Location
Enter the URL that will serve as the system identifier for
the notation. System identifiers are not required for
notations, though at least one identifier (system or public)
must appear. System identifiers may point to standards
describing the content or to programs that can actually
process it.
Note: Use the Insert File Name button to browse for and
select a file in your project containing the desired content.
DTD 105
Column
Description
Public Name
Notation information is processed by the parser only minimally; the applications that
process your documents will need to provide an extra level of support to interpret
notations.
Processing Instructions
Processing instructions are a relatively free-form way to include extra information about
your schema for an application to use.
Each processing instruction is listed in a row of the panel. Information associated with
each processing instruction appears in columns across the panel and includes the
following (from left to right).
Column
Description
Row Selector/Error
Indicator
Included Document
Indicator
Target
Instruction
Enter the instruction for the processor. The format for the
instruction is up to you, though it may not contain the
sequence ?>, which ends a processing instruction,
106
| Chapter 2
Errors Panel
When selected by way of the Schema > View menu or upon clicking the Errors button on
the toolbar, the errors panel appears between the active editing panel and the configuration
panel. The errors panel displays errors found when a new DTD is loaded, as well as errors
detected throughout the editing process.
The errors panel indicates the total number of errors and provides a list of errors and
details about the errors in this panel. Clicking on the error message will take you to the
source of the error.
To update error information in the DTD after correcting an error, it's good practice to
check for errors again by way of the Check for Errors button on the top of the panel.
A red selector button in a declaration panel is indicative of an error.
Notes Panel
The raw declarations in your schemas are very useful for parsers processing your
document, but are rarely sufficient for other humans who need to read and make sense of
your schema. Adding notes helps those who use and maintain your schema to understand
your schema designs, and can be a critical tool for keeping groups of developers working
on the same or related schemas in sync.
The notes panel provides an area where you can add schema level documentation to your
schema as well as document individual declarations and preview their source. When
selected by way of the Schema > View menu, the notes panel appears between the active
editing panel and the configuration panel.
Use the button in the upper right-hand corner of the notes panel to indicate whether you
are interested in working with declaration-level notes (the default view) or notes about the
schema as a whole. To view or edit notes for the schema as a whole, click Show
Document. (The name of the DTD will appear in the upper left-hand corner of the panel.)
To toggle back to the default, declaration-level view, click 'Show Selected Declaration'.
(The the name of the declaration will appear in the upper left-hand corner of the panel.)
DTD 107
When the notes panel reflects the selected declaration, three tabs are available:
Tab
Description
All Notes
Displays all the notes entered for the selected declaration. Notes
cannot be edited within this tab.
Usage Notes
Use this tab to associate a new note with the selected declaration.
In the source code, the note will appear within the selected
declaration, as an XML comment:
<!--usage note-->
Source Preview
When the notes panel reflects the document as a whole, two tabs are available:
Tab
Description
All Notes
Displays all the top-level notes. Notes cannot be edited within this
tab.
Usage Notes
Use this tab to associate a new note with the schema. In the source
code, the note will appear as an XML comment above the first
declaration.
Source Panel
When selected by way of the Schema > View menu or upon clicking the Source button on
the toolbar, the source panel becomes the primary panel for editing. The source panel
allows you to edit the source code of your DTD directly. If you're comfortable with DTD
syntax, editing your declarations directly may occasionally be useful or even convenient.
Even if you don't want to edit your DTD directly, the source panel provides another way to
examine your declarations.
To make the other panels reflect the changes you've made, click Reparse at the top of the
panel. Any errors found upon reparse will be listed in the errors panel.
108
| Chapter 2
DTD Exercise
To help you become familiar with the panels available when working with DTD resources,
we have included this step-by-step exercise. The exercise walks you through the creation
of a simple schema, introducing you to the fundamental features of the editing
environment. The exercise should take about 10-15 minutes to complete.
In this example, you will build a DTD for a price list. A document conforming to this
schema could be used by a reseller to define the format in which product information is
received from manufacturers. Here is a guide to the information we'll be using:
Component
Description
price.list
manufacturer
name
date.issued
product
sku
product.name
price
description
promotion
start.date
end.date
Getting Started
1. In the project panel, create a project folder named QuickTour.
2. To create a new DTD resource, drag the DTD icon from the XML Tools palette and
drop into the design panel.
3. Within the design panel, double click the DTD icon.
4. A new set of panels will appear. Resize the panels, such that the elements panel is
prominently displayed. The elements panel presents an inventory of all of the
TIBCO Designer Palette Reference
elements and complex types allowed within a document conforming to this schema.
The elements panel consists of the content model diagram (upper half) and the
element list (lower half). The element list, where most of the work in this exercise will
be performed, has a tabular format, with the fields in each row identified by column
headings.
11. Move to the empty line below date.issued and type product then press tab. Select
Elements from the Content Type menu and press tab.
110
| Chapter 2
12. Move to the content model column for product, position your cursor inside the () and
type sku, product.name, price, description, promotion
The commas between elements are indicative of a Sequence (this followed by this
followed by this). Elements may also represent a Choice (this or this or this). Choice uses
a | rather than a , between element names. In the Content Model column, groups of
elements can be EITHER choices or sequence. For more information, see Building
Content Models: Occurrence and Sequence Indicators on page 85.
When adding elements to a content model (within the Content Model column), if your
input exceeds the column width, type Ctrl+E or select Expand from the Schema>View
menu to open a larger window for editing the selected area.
13. Tab from this field and select Create (fig 1.4) when prompted. Notice that new
Elements are created for you and added to the list. By default, new elements are
automatically created with text only content
.
As it is currently defined, all elements are required. In some instances, you may want
an element to be optional. For the purposes of this exercise, description will be made an
optional element.
14. Go back to the product content model and highlight description. Once highlighted, click
the optional button on the tool bar that appears. Notice the '?' that was appended to
description.
Elements can be defined as either required OR optional. They may also be defined as
repeatable by clicking on the Repeatable button in the Content Model toolbar. For more
information, see Building Content Models: Occurrence and Sequence Indicators on
page 85.
15. A promotion is a discounted price over some period of time. This will be represented
using a combination of elements and attributes. Make a content model for promotion by
specifying Elements in the Content column and then entering price into the Content
Model column.
16. Tab to the Attributes column for promotion and enter start.date, end.date. Press Tab.
17. XML schemas typically have a single root element that contains all other elements. In
this instance, our root element will be called price.list. Below promotion, type in price.list,
press tab, and specify Elements content.
18. Enter manufacturer, product+ as the content model. (The plus sign designates the product
element as required and repeatable.) Tab out of the field to update the schema.
Congratulations! You have completed creating the schema. In the configuration panel,
name the file pricelist and click Apply to save your work.
The Apply button makes the file available to other resources in the project. The schema is
saved when the entire project has been saved.
Reviewing the Schema
Graphical view
By defining content models, a structure for the document is established. This structure can
be thought of as a tree where the root is the encompassing element and its branches are the
elements and attributes that may be contained within it (as defined by the content model).
In turn each branch may have branches defined by their content model. The diagram at the
top of the element panel provides a graphical view of these relationships. Explore the
content model by clicking on the elements to expand and collapse their content.
(Specifically, click on the Element Content Indicator icon, labeled in Figure 36 on
page 112.) Note that only elements that define a content model can be expanded. Within
the diagram, double clicking on the root element, in this case price.list, will produce a
graphical view of the entire schema, shown in Figure 36.
112
| Chapter 2
For each element and attribute in the diagram, a right button menu offering key editing
functions is provided. Right-click the background to zoom in or out of the diagram as a
whole.
Source view
To view the actual schema syntax for the schema you've created, open the source panel by
clicking Source on the main toolbar. The notes panel, which allows you to enter
supplemental information about any element or attribute, also allows you to view the
source for individual declarations. Open the notes panel using the Schema menu (Schema
> View > Notes). Click on the Source Preview tab at the bottom of the notes panel to
view the source for the element declaration currently selected in the element list.
Conclusion
Congratulations! You have completed the DTD Quick Tour. Notice that the elements and
attributes were not constrained by data typing beyond text, because types such as integer,
decimal and date are not available in a DTD. To see how these types could be implemented in
a price list schema, see XML Schema Exercises on page 68
Instance 113
Instance
Resource
The Instance resource of the XML Tool palette enables the creation of an XML instance
document. XML instance documents are XML documents -- typically representing
data-oriented business documents, messages, and configuration files -- that conform to the
rules of an XML Schema or DTD.
When an Instance resource is selected within your project, a series of new panels, toolbar
buttons, and menus options are provided to facilitate the schema-driven creation, editing,
and navigation of the resource. The editing environment for instance resources, shown in
Figure 37 is described in this chapter.
Figure 37 XML instance editing environment
For a hands-on demonstration of the instance editing environment, see the XML Instance
Exercise on page 130.
114
| Chapter 2
Configuration Panel
When editing an Instance resource, the Configuration tab has the following fields:.
Field
Description
Name
This is the name of the file when persisted. The *.xml suffix will be
automatically added.
Toolbar
For a description of the buttons that appear on the toolbar when editing Instance resources,
see Toolbar Buttons on page 26.
XML Menu
An XML menu becomes available when editing an Instance resource. The XML menu
contains three submenus: Tools, View, and Presentation.
The Tools menu includes options for inserting elements or attributes and for locating and
replacing text. The View menu provides options to control the panels used for editing,
organizing, and viewing your documents. The Presentation menu allows you to associate
one or more customized views with the active instance document. The presentations are
associated at the schema level, so the views you create for a single document adhering to a
schema become available for all instances of the schema.
The XML menu options are described in detail in Menu Options on page 27.
Setting a Schema
The XML instance editing environment is optimized for building XML documents based
on an XML Schema or DTD. When creating a new XML document, specifying the
schema within your project to base the document on is typically your first step. To set a
schema, use the Set Schema button on the toolbar.
A window will appear enabling you to choose a schema from your project. Upon selecting
your schema, you will be prompted to specify a root element for your document. A default
value will appear, representing a best guess as to the root of the schema you have
selected. If the default value is correct, simply select OK and the schema will be loaded. If
the default value is not correct, type in the name of the root you would like to use. If you
decide that you do not want to set the schema, click Cancel.
Instance 115
If you set a schema to a brand new document, the schema will be used to jumpstart your
document, automatically adding all required attributes and elements into the content
panel. Keep in mind, however, that your document will likely not be error free until you
have entered appropriate values in the edit area. Use the Errors button on the toolbar to
view a listing of validation errors in the errors panel.
You can set a schema to an existing Instance resources as well. Any errors detected will be
immediately listed in the errors panel.
Right-click the Set Schema button to choose from a list of recently applied schemas.
Content Panel
The content panel provides the primary editing area and loads by default when an Instance
resource is selected in the project panel. The content panel consists of a left-hand listing of
the elements and attributes (tag area) and a right-hand area for inserting values for the
elements and attributes (edit area). The content panel also has a navigator bar for
navigating throughout the document and a factory bar for adding new elements, attributes,
processing instructions, comments, and text. The content panel is shown in Figure 38.
Figure 38 Content panel
Tag
Area
Edit
Area
Content
Hints
Factory
Bar
116
| Chapter 2
Component
Element
Attribute
Comment
Processing Instruction
Text
Along with the edit area, the tag area is where most of your work will be done when
building XML documents. For more information on the key tasks performed within the
Tag area, see:
Inserting new elements, attributes, processing instructions, and comments on page 116
Instance 117
indentions which represent their relationship to the selected element. In this case, street and
city are siblings to the selected element, street, and hence, appear along the same vertical
line. The elements shipTo and item appear to the left of the selected item, indicating parent
and grand-parent relationships, respectively.
Figure 39 Insert box
insert new element
insert new attribute
insert as child
insert as sibling
insert as parent
insert new
processing instruction
insert schema-defined
element or attribute
In Figure 39, a name (suiteNumber) for a new sibling element for street has been entered into
the text box. With a single click on the appropriate icon, this new entry can be changed
from an element into an attribute, text, comment, or processing instruction. When you are
finished entering and defining your new tags, either hit tab or enter to complete the entry.
If you are using a schema to build your document, adding new elements and attributes
may cause your document to become invalid. You will be permitted to create documents
that break from the structure of your schema, but will be alerted whenever this occurs by
way of the errors panel.
Factory Bar
The factory bar at the bottom of the content panel, provides another option for entering
new items to the tag area. The factory bar is shown in Figure 40.
Figure 40 Factory bar
The factory bar provides an easy way to identify and insert any additional elements
(children or siblings) or attributes defined by the schema for the element selected in the
tag area. Click on any element of attribute name appearing on the factory bar to have it
automatically added to the document.
118
| Chapter 2
The factory bar also facilitates the insertion of new elements and attributes, as well as new
comments, processing instructions, and text. Click the blue icon representative of the item
you would like to add to launch the Insert box described above. Figure 41 illustrates the
insert box which appears after clicking on the comment icon on the factory bar.
Figure 41 Inserting a comment
You can also use your mouse to quickly change the positioning of elements and attributes
appearing in the tag area. This drag and drop editing can be used to change the structure
of your document or simply to change the view of your document. (For more information,
see Promoting elements and attributes on page 124). To move an element or attribute, left
Instance 119
click on the blue icon which appears to the left of the tag. Holding down the left mouse
button, drag the item to its new position and release the mouse button. If your document is
dependent on a schema, be sure to use the Errors button on the toolbar to determine if the
move is permitted by the schema.
Identifying Data-Entry Constraints
When creating an XML document based on a schema, the tag area facilitates data entry
into the edit area by providing a guide to the type of data that is required by the schema.
When you mouse over the element and attribute tags appearing in the tag area, a tool tip is
created which describes the type of data that should be entered in the edit area. For
example, in Figure 43, the tool tip indicates that the content for the quantity element should
be entered as an int (integer) to conform to the schema.
Figure 43 Content hint as tool tip
Clicking on an element in the navigator bar will also open a drop down window displaying
the selected element and each of its siblings. Figure 45 shows the siblings for the billTo
element.
120
| Chapter 2
By presenting elements in the context of their parents and siblings, the navigator bar
provides a clean view of an elements place in the document's structure, a feature which is
particularly useful when your documents are lengthy. The navigator bar also facilitates
navigation throughout your document. Double clicking on an element from the drop-down
automatically moves you to that element within the tag area.
Creating a Customized View of the Tag Area
The tag area can be customized in numerous ways to facilitate data entry and to make the
presentation of the document more intuitive and user-friendly. Customized views are
preserved and associated with the schema used to create this document. This means that,
as long as needed, every new XML document created using the same schema will be
presented the same way automatically.
Your customized view can be saved by way of the Presentation menu
(XML>Presentation). Multiple presentations may be associated with a given schema,
providing multiple display options for an instance document.
Customization is performed using the right button menus associated with each tag. The
initial menu that appears is used to customize tags on an individual item basis. That is, if
the document uses several address elements, the menu choice will only affect the address
element that is selected. The final option of this menu provides access to a type level
sub-menu. The options within this menu affect all instances of a given element within
your document. Both the item and type level menus are shown in Figure 46.
Instance 121
To learn more about the customization options on the right-button menu, see:
Type level changes made through the application of each of these options can be saved by
way of the XML menu (XML> Presentation > Save As...)
The alignment of the tags can also be changed by way of the XML menu
(XML>View>Align Labels).
122
| Chapter 2
Instance 123
An alias can only be applied at the type level (meaning all instances of the selected
element or attribute name will be displayed with the alias name), using the Alias option of
the type level submenu of the right button menu. A dialog box will appear where you can
set the alias. In Figure 48, the attribute dur is given the alias of duration.
Figure 48 Specifying an alias
Once a color has been selected, the tags default background color (light gray) will change
to the chosen color.
124
| Chapter 2
If you want to promote a large number of child elements, you can resize an element row to
allow for multiple lines of promotion per element. To resize an element row vertically,
click on the bottom of the row in the area just to the left of the split bar separating the Tag
and Edit Areas and then drag to the desired size. An element row can be re-sized to allow
for a maximum of 7 lines per row. In Figure 51, the row for the element monthly has been
resized to allow for three lines of promotion.
Figure 51 Resizing rows to allow for additional promotion
Instance 125
To cancel a promotion, right click the promoted item and choose Demote from the menu.
Promoting elements and attributes does not change their structural position within the
XML document, just their position within the content panel.
a single mouse click activates the data entry field for elements defined as text only.
mixed content models default to the show as markup view; all other content models
default to show as rows. See Show as Rows versus Show as Markup on
page 127 for more information.
data should be entered directly over the content tips, which appear as grayed-out text
strings and describe the expected content for the element or attribute.
when data entry in a particular field is complete, press Enter or Tab to move to the
next field.
when a new element is added, the data entry field is initially activated with a double
click, after which only a single click is required.
when data entry in a particular field is complete, press Enter or Tab to move to the
next field.
Content Hints
If your document is based on a schema, content hints facilitate valid data entry by
providing information about the schema's content model. The hints appear as grayed-out
text strings in the edit area next to each structural element. Figure 52 illustrates the
different types of content hints.
126
| Chapter 2
Content hints in parentheses represent the sequence and occurrence of any data elements
contained by the particular structural element. The content models are described using
occurrence and sequence indicators. Table 13 describes the Occurrence indicators.
Table 14 describes the Sequence indicators.
Table 13 Occurrence indicators
Occurrence
Indicator
Meaning
None
The element (or group of elements) may appear zero or one times.
The element is optional, but is only allowed to appear once if used.
The element (or group of elements) must appear one or more times.
The element is required to appear at least once, but multiple
consecutive occurrences may be present.
The element (or group of elements) may appear zero or more times.
The element can appear as many times consecutively as needed, or
even zero times.
{}
The element (or group of elements) must appear within the specified
range of times.
Meaning
Can be read as 'or'. Creates content model with particles enumerated
(only one may be chosen).
Instance 127
Meaning
&
()
Besides element content, content hints also provide data typing and default value
information. Also, if the schema enumerates values for an element or attribute, a drop
down list of the possible choices is provided (when you click on the data entry field.)
For a description of the data types that may appear as content hints, see
http://www.w3.org/TR/xmlschema-2/#built-in-datatypes
Content hints are displayed by default. They can be turned off by way of the XML menu
(XML > View > Content Hints).
Show as Rows versus Show as Markup
Element and attribute content can be displayed in either a row format or in markup format.
When a element's content is displayed in row format the element, along with each of its
child elements, appear in the tag area along with a corresponding data entry field in the
edit area. Figure 53 shows a date element in row format.
Figure 53 Row format (the default view)
When an element's content is displayed as markup, all of the element's content (that is
character data, child elements, child element character data, and so on) is displayed as
XML in the edit area. Figure 54 shows the date element in markup format.
128
| Chapter 2
A row holding content shown as markup can be collapsed or expanded by way of the blue
icon appearing at the end of the data entry field. In Figure 55, the field has been expanded
to show all of the markup content associated with the element Date.
Figure 55 Blue ellipsis icon for collapsing or expanding markup view
By default, data is presented in show as rows formatting. The two exceptions are mixed
content models and comments, which are displayed as markup by default.
Errors Panel
When you set an XML document to a schema, an initial validation check is performed to
ensure that your document is in agreement with the rules outlined by the schema. As you
make changes to your document, use the Check for Errors button on the top of the panel to
determine if the changes are valid. Detected errors are displayed in the errors panel,
located below the Content or Source panel.
The errors panel contains a listing of errors along with a brief description. Typical error
messages indicate:
data that does not match the data type specified by the schema
Instance 129
Click on the error within the errors panel to identify where the error exists within the
document. The problem area will be highlighted within the Tag and Edit areas.
If the document does not reference a schema, upon checking for errors the errors panel
will indicate one error:
Element root: Document has no governing schema
This message is not indicative of an error; rather, it indicates that the instance cannot be
checked for validity errors as it is not governed by a schema.
Source Panel
When selected by way of the XML > View menu or upon clicking the Source button on
the toolbar, the source panel becomes the primary panel for editing. The source panel
allows you to edit the source code directly. If you're comfortable with XML syntax,
editing directly within the XML source may be useful.
To make the other panels reflect the changes you've made, click on 'Reparse' at the top of
the panel. Any errors found upon reparse will be reported.
UTF-8 is set as the default encoding for XML resources. The encoding can be changed on
the XML Editing tab of the Preferences window (Edit>Preferences).
130
| Chapter 2
Getting Started
1. In the project panel, create a project folder named QuickTour.
2. To create a new Instance resource, drag the schema icon from the XML Tools palette
and drop into the design panel.
3. Within the design panel, double click the schema icon.
4. A series of new panels will appear, displaying a new XML document with just the root
element showing. If you wanted to create a new document without the use of a
schema, you could simply rename (right-click > rename) the root element to a tag
name of your choice and then build your document from there. In our example,
however, we are going to create this document based on the price list schema.
5. Click the Set Schema button from the toolbar at the top of the screen. A dialog will
appear enabling you to browse and open the pricelist schema you created in the XML
Schema exercise.
6. A dialog box will appear asking you to select an element to serve as the root element.
The element price.list will appear as the default selection. Click OK.
7. After setting the schema, you will notice the elements (indicated by a blue diamond
icon) declared as required in the schema now show up in the tag area. Additionally,
the structure of the document as defined by the schema is visible as content hints
viewable in the edit area. The tag and edit areas comprise the content panel, which is
shown in Figure 56.
TIBCO Designer Palette Reference
Edit area
Tag area
Content hints
Factory bar
Upon setting the schema, two error messages will be reported in the errors panel. These
errors will be resolved later in this exercise.
insert as sibling
insert as parent
insert new
processing instruction
insert schema-defined
element or attribute
132
| Chapter 2
1. To add the name attribute to the manufacturer element, click on manufacturer within the tag
area. Once manufacturer is selected, name becomes an option on the factory bar. Click
once on name to add it to the document.
2. Select promotion within the tag area, and use the factory bar to add the start.date and end.date
attributes.
S
3. Now you can promote the child elements as well as the attributes of manufacturer to
make the entry of data easier and the document view more manageable.
Promotion is especially helpful when working with data-centric documents containing
a lot of mark-up but little content. To do this, move your pointer over the small blue
icon next to the attribute name and drag the attribute to the right into the edit area and
move it up one row. There will be a small black indicator that will demonstrate where
the attribute is going to be repositioned. Release the attribute next to its associated
element manufacturer.
4. Now drag the element date.issued up to the right of the attribute name, on the same level
of manufacturer.
Promoting the elements does not change their structural position within the XML
document, just their position within the content panel.
5. Promote sku, product.name, and price up to their parent, product.
6. Finally, drag start.date, end.date, and price to the same level of their parent, promotion.
7. To illustrate the entry of data, click to the right of the name attribute and enter a value
that conforms to the data type, in this case a string.
8. Continue to enter the appropriate data into the remaining fields, using either the Tab
key or the mouse to move between fields. When entering the content, pay attention to
the data type information as specified by the schema and indicated by the content
hints. Dates should be entered in the format: YYYYMMDD.
134
| Chapter 2
Prices should be entered as decimal data. As you enter data corresponding to the
required data type, the errors reported in the errors panel will disappear.
9. To add another product to the price list, highlight product in the tag area and then select
product from the factory bar. Notice that the new product tag retains the formatting
already specified for its element.
Congratulations! You have completed the example for customizing and building an XML
document from a schema. One important feature is that once you create a document
based on a schema, each additional document you make that uses the same schema will
have the same view. To test this, save your document (using the Apply button of the
configuration panel) and then start a new document and set the same pricelist schema to
start it. Immediately upon setting the schema, the view of the new document will be the
same as this document. Use the Presentation menu (XML > Presentation) to return to the
default view or to save a new view of the document.
| 135
Chapter 3
This chapter gives detailed information about the Adapter Resources palette.
Topics
136
| Chapter 3
Overview
The Generic Adapter Configuration resource and the associated Adapter Resources palette are used
when developing an adapter using the TIBCO Adapter SDK API. The adapter is
configured using the Generic Adapter Configuration resource and the configuration is
saved to a project repository, which is used by the code you have written.
This manual discusses all resources in the Adapter Resources palette. This chapter
explains how to use the resources, later chapters provide a reference to individual
resources and the settings you specify in the configuration panel.
Adapters and Schema Resources
Schema used by an adapter are defined separately from the Generic Adapter Configuration.
However, resources in the Generic Adapter Configuration point to adapter schema resources. For
example, when you define a service such as a publication service, you need to define the
schema that describes the data that will be published. When you save the project, both the
adapter configuration and the corresponding schema are saved.
For information on configuring adapter schemas, see Chapter 4, Adapter Schema Palette.
You can access this guide via Help > Help For > Adapter Schemas.
1. Open TIBCO Designer. In the startup window, choose New empty project or open
the project to which you wish to add your adapter.
2. Save the project. See TIBCO Designer Users Guide, available via Help > Designer
Help for information on saving projects.
3. In the project panel of the main window, make sure the top-level (project) folder is
selected.
4. From the palette panel, drag a Generic Adapter Configuration into the design panel.
5. In the configuration panel, specify the configuration information for the adapter. See
Generic Adapter Configuration Reference on page 148.
Decide now whether you need to perform advanced logging.
If the adapter doesnt use custom roles, use the Logging tab to specify logging
information.
If the adapter uses custom roles, click the Use Advanced Logging check box, and use the
Log Sinks folder later to define your sinks. See Custom Log Sink Reference on
page 161.
6. Add operations and, optionally, standard log sinks. An overview is given in this
chapter:
Adding Services to Your Adapter on page 137
Adding Custom Log Sinks to Your Adapter on page 139
Publication service
Subscription service
138
| Chapter 3
Request-Response service
To use Enterprise Message Service as the transport, delete all extra copies of the open SSL
libraries (libeay32.dll and ssleay32.dll) from the TIBCO_HOME\adapter\sdk\5.8\bin folder to start the
adapter project from TIBCO Designer.
4. To provide some additional information about the transport, click the Transport tab.
What is displayed depends on the transport type you selected for the service. The
screen shot below shows the options available for the default transport, a TIBCO
Rendezvous Certified transport. See Services Reference on page 152 for detailed
information on the individual services and different Transport tab content.
5. If the schema that determines the data used by the service has already been defined,
click the Schema tab, then click the browse icon (binoculars) and select the schema
resource in the dialog that appears.
You must be sure to assign the appropriate schema to the service. The default, any, is
only there as a placeholder.
6. Click Apply.
TIBCO Designer creates the service instance. If you need to perform additional
customizations, you can open the Advanced folder and do it there. See Advanced
Adapter Configuration on page 139.
If information about the session and endpoint cannot be set directly in the service, you
can go to the Sessions folder and configure the session and endpoint there. See
Sessions Reference on page 165 and Custom Log Sink Reference on page 161.
If you wish to add custom log sinks, click Use Advanced Logging in the Logging tab
for the adapter, then add individual sinks as needed. See Custom Log Sink Reference
on page 161.
If you are using an RVTX session, you can add transaction pools to your adapter.
Regardless of the type of session, you can add advisories as needed. See Transaction
Control and Advisory Reference on page 175.
If your adapter takes an extraordinary amount of time to load, you may specify a
loadURL in the Metadata URL folder. See Metadata URLs Folder on page 181. In that
case, you also need to specify the URL for the location of schema, so the adapter can
load them as needed at runtime. You do that from the Adapters Startup tab.
140
| Chapter 3
3. Customize the existing File Sink and stdio Sink if you like. See File Sink, page 162 and
stdio Sink, page 163.
4. To add more file sinks or stdio sinks:
a. In the design panel, select the sink, choose Copy, then Paste.
b. Name the sink appropriately.
c. Customize the new sink using the fields in the configuration panel. See Log Sinks
Overview, page 161.
5. To add Network sink, which publishes information to TIBCO Rendezvous:
a. Select the Log Sinks folder in the project tree.
b. Drag a Generic Log Sink into the design panel.
c. From the pop-up, choose Network and click Apply.
d. Specify the information, as discussed in Network Sink, page 163.
6. To add a TIBCO Hawk sink, which publishes information to TIBCO Hawk:
a. Select the Log Sinks folder in the project tree.
b. Drag a Generic Log Sink into the design panel.
c. From the pop-up, choose Hawk.
d. Specify the information, as discussed in Hawk Sink, page 163.
Adding Properties
Deleting Items
Terminology
Keep in mind the following terminology used to describe repository content.
An attribute is a named association list. Inside the association lists are name:value
pairs which are properties of the attribute.
As a result, you add an association list to an object, then name it and have an attribute.
Adding Properties
To add an extended property to your adapter, follow these steps:
1. Select the top-level adapter configuration object.
2. Choose Resources > Edit Extended Properties.
3. Use the icons in the Edit Extended Properties dialog to add properties.
You can perform the following operations.
Click this icon to add an association list. Because a named association list is called an
attribute, you have, in effect, added an attribute to an object when you add an
association list. Note that you can also add an association list to an attribute. This adds
an extended property to the attribute.
Click this icon to add a reference to an existing object. When you add a reference, you
must then specify the global name to which the reference points. The global name
specifies the location of the object inside TIBCO Repository, for example
/tibco/public/endpoint/adapter/generic/Generic Adapter Configuration/RV TX Publisher
Click this icon to add a string property to an association list. Triple-click the
newly-added property to change the property name and its value.
For an example, see Adding Custom Hawk Microagents to Your Adapter on page 142.
Deleting Items
You can delete an object, association list, or attribute by selecting it, then clicking the
delete icon.
142
| Chapter 3
Usage Scenarios
The application to which the adapter connects understands XML natively. The adapter
code retrieves messages and makes use of the MData::toXML() methods. The corresponding
XSD is available in-memory and on disk if you have exported it. To achieve local
transformations to a canonical format, XSLT is the logical choice. These
transformations can be applied to all outbound endpoints. Inbound transformations most
likely dont make sense.
b. Specify the name of the attribute and the value you wish to use for this adapter
instance.
c. Click Is Reference if the attribute is also another object.
4. Click Apply.
You associate the callout with your adapter as follows:
1. Select the Generic Adapter Configuration resource and choose the Configuration tab.
TIBCO Designer Palette Reference
144
| Chapter 3
2. Click the Browse button next to the Message Filter field and select the Message Filter you
defined earlier.
You can now access the attributes set in your configuration from your adapter code. Here
is an example for accessing an attribute test with value teststring.
In C++:
pMProperties->getValue( pMApp->getAppName() +
"/deployment/transformationPlugin/attributes/test", myMStringProp);
In Java:
myStringProp =
mapp.getConfigProperties().getString(app.getAppParameters().getAppName() +
"/deployment/transformationPlugin/attributes/test");
The transformation plugins are applied only to services with subscriber, publisher, client,
and server endpoints.
You can use the transformation plugin to stop the message flow. You can either throw an
exception or return FALSE to stop message flow.
A programming example is included in the TIBCO Adapter SDK Programmers Guide.
All adapters you wish to test, must have their runtime installed in your machine. Because
the setup differs depending on the type of adapter you are testing, this section explains
how to use the tool in three sections:
When you set up an adapter tester, configuration for the tester is saved for each adapter in
the project. You may, however, have to change some of the settings if you wish to run the
tester on a different machine as the directories may not be valid.
Adapter executable
Choose the adapter from the pop-up. Make sure that the version
of the run-time matches the version of the configuration.
The adapter executable to run your 'packaged adapter' will be
shown from a list of choices (each matching a particular
installation). If the adapter supports multiple executables (one
for a publisher, the other for a subscriber) be sure to select the
correct one for the configuration you want to test.
A TRA template and other adapter arguments will be provided automatically by the tester
tool.
If the adapter specifies global variables, you can enter values in the window that is
displayed.
Setup for Testing Custom Adapters
Adapter Tester may work with GAC and other custom type adapters, however, TIBCO
only supports this feature on packaged adapters.
If your adapter is an adapter configured using Generic Adapter Configuration GAC or a
custom adapter that the TIBCO installer does not recognize, you need to provide the
following information:
Working Directory
146
| Chapter 3
Adapter
Executable
Arguments
TRA template
TRA template to use for the adapter. The tester tool will copy
values in the template and perform any necessary variable
expansions as well as add additional entries pointing to the
project file, etc.
If the adapter specifies global variables, you can enter values in the window that is
displayed.
If your GAC or custom adapters cannot be successfully run by providing the above values,
you can check the Custom Shell Command check box.
This allows you to enter the working directory and shell command to execute. The shell
command should include all arguments necessary to run the adapter. Note that in this
mode, the project is not exported. You have to perform the export yourself. You may also
need to create your own TRA file.
See the TIBCO Adapter SDK Programmers Guide more information on the available
arguments and options for custom adapters.
Using Adapter Tester
To use Adapter Tester, follow these steps:
1. Choose Tools> Show Adapter Tester
All adapter instances configured in the project are displayed.
2. Select the adapter instance to test and provide the appropriate information in the Run
Settings tab. See Setup for Testing TIBCO Adapters and Setup for Testing Custom
Adapters for information.
3. Click Start.
When the adapter is started, a green dot highlights the running adapter. The display
changes to the Console tab. You can now observe the adapter as it executes. The Start
button becomes a Stop button.
4. Click Stop when you wish to stop adapter.
The button changes its name to Start and the green dot disappears.
Note under Java 1.3.x on windows you may see a Command Prompt window. This is
normal. If you close the window, the adapter process will be terminated.
148
| Chapter 3
Configuration Tab
The Configuration tab allows you to specify the following information:
Instance Name
Version
SDK AppName
Description
Message Filter
Two buttons at the bottom of the Configuration tab allow you to change configuration
values.
Change Version
Logging Tab
The Logging tab allows you to specify your logging preferences and information. You have
two choices:
If you are using custom roles, choose Advanced Logging, then use the resources in
the Log Sinks folder to configure logging information. See Custom Log Sink
Reference on page 161.
If you are not using custom roles, use the check boxes in this tab. You can send the
information to multiple locations, and you can choose to log one or more message
types.
Use Advanced Logging
Log File
Startup Tab
The Startup tab allows you to specify startup information for your adapter.
Show Startup Banner
150
| Chapter 3
Monitoring Tab
The Monitoring tab allows you to provide TIBCO Hawk information for the standard TIBCO
Hawk microagent. See Adding Custom Hawk Microagents to Your Adapter on page 142
for information on configuring custom microagents.
Enable Standard MicroAgent
152
| Chapter 3
Services Reference
The Adapter Services folder contains four adapter services for drag-and-drop configuration.
This chapter is a reference to these services. For information on creating an adapter
services, see Adding Services to Your Adapter on page 137.
Publication Service
When you choose a publication service, the configuration panel allows you to specify
information in the following:
Configuration Tab
Schema Tab
Configuration Tab
Name
Description
Transport Type
Message Subject
Subject with which this publisher will send out messages. Do not
change the subject unless you understand TIBCO Rendezvous
requirements.
Quality of Service
Wire Format
Session Reference
Endpoint Reference
Destination
Reply Destination
Wire Format
Delivery Mode
Session Reference
154
| Chapter 3
Endpoint Reference
Schema Tab
Each service must be associated with schema that describe the data the service sends or
receives. Click the Browse icon to associate the schema that describe the data the service
actually sends or receives.
Subscription Service
When you choose a publication service, the configuration panel allows you to specify
information in three tabs (only one of the Transport Tabs will be available):
Configuration Tab
Schema Tab
Configuration Tab
Name
Description
Transport Type
Message Subject
Quality of Service
Wire Format
Session Reference
Endpoint
Reference
Destination
Wire Format
Delivery Mode
156
| Chapter 3
Session Reference
Endpoint Reference
Schema Tab
Each service must be associated with schema that describe the data the service sends or
receives. Click the Browse icon to associate the schema that describe the data the service
actually sends or receives.
Configuration Tab
Schema Tab
Configuration Tab
Name
Description
Transport Type
Message Subject
Quality of Service
Wire Format
Session Reference
Endpoint Reference
Destination
Wire Format
158
| Chapter 3
Delivery Mode
Session Reference
Endpoint Reference
Schema Tab
Each service must be associated with schema that describe the data the service sends or
receives. Click the Browse icon to associate the schema that describe the data the service
actually sends or receives.
Request-Response Service
An ActiveEnterprise request-response service takes on the role of the server in an
ActiveEnterprise operation. Provide the information for the following tabs to configure
the service:
Configuration Tab
Schema Tab
Configuration Tab
Name
Description
Transport Type
Message Subject
Quality of Service
Wire Format
Session Reference
Endpoint Reference
160
| Chapter 3
Destination
Wire Format
Delivery Mode
Session Reference
Endpoint Reference
Schema Tab
Each service must be associated with schema that describe the data the service sends or
receives. Click the Browse icon to associate the schema that describe the data the service
actually sends or receives.
File Sink
stdio Sink
Network Sink
Hawk Sink
You can also define a sink that uses a custom role. This is discussed in Adding Roles to
Sinks on page 164.
162
| Chapter 3
File Sink
For a file sink, you specify the following information:
Name
File Name
Global variable that includes the path and name of trace file.
Extension .log is suggested.
File Count
Append Mode
Description
The default file sink that is part of each adapter has those roles predefined that were
selected when you turned on Advanced Logging. If you create additional file sinks, you can
add roles. See Adding Roles to Sinks on page 164
Understanding File Count and File Limit
If you have specified a file sink in your configuration, your SDK-based adapter will go
through these steps:
1. Creates a file with no extension using the specified filename.
2. Writes to that file until it reaches the size specified in File Limit.
3. When File Limit has been reached (that is, as soon as the file is as big as or bigger than
the limit) the adapter renames the current file to file.1 and creates a new file with no
extension.
4. Note that the log file can be slightly larger than the limit because the new file is only
created after the limit has been reached.
5. The adapter repeats this process until it reaches the number of files specified in File
Count.
The adapter overwrites the file with the highest number, that is, the oldest file, when the
number of files reaches File Count and that last file reaches File Limit. To avoid that, set either
File Count or File Limit to a sufficiently large value.
stdio Sink
For a stdio Sink, you specify the following information.
Name
Output Stream
Description
Network Sink
To add a network sink:
1. Select the Log Sinks panel.
2. Drag a Generic Log Sink into the design panel.
3. In the configuration panel, choose Network from the pop-up menu.
4. Specify the network sinks attributes.
Name
Session
Click the Browse icon and select one of the sessions you defined.
Subject
Description
Hawk Sink
A Hawk sink sends messages to TIBCO Hawk. To add a Hawk sink:
1. Select the Log Sinks panel.
2. Drag a Generic Log Sink into the design panel.
3. In the configuration panel, choose Hawk from the pop-up menu.
164
| Chapter 3
MicroAgent Name
Description
Sessions Reference
When you add a service to an adapter, TIBCO Designer automatically creates the
corresponding session and endpoint, depending on the protocol and delivery mode being
used. Session and endpoint are placed in the Advanced folder of the Generic Adapter Configuration.
This section is a reference to the sessions included with TIBCO Designer.
Creating sessions explicitly is not recommended. TIBCO Designer creates a session and
an endpoint for you when you create a service. Under certain situations, expert users may
need to create sessions explicitly.
The following sessions are discussed:
RV Session
RVA Session
RVCM Session
RVCMQ Session
RVTX Session
JMS Session
166
| Chapter 3
RV Session
For TIBCO Rendezvous sessions, the configuration panel includes the following
information.
To edit the global variables used in this panel, click the Global Variables tab in the project
panel in the upper left quadrant. For more information, see TIBCO Designer Users Guide.
Name
Description
Service
Network
Daemon
SSL
RVA Session
For RVA sessions, the configuration panel includes the following information.
To edit the global variables in this panel, click the Global Variables tab in the project panel in
the upper left quadrant. For more information, see TIBCO Designer Users Guide.
Name
Description
Host
Port
Global variable that specifies the port number for this session.
This attribute is ignored if the host is not specified.
Enable HTTP
RVCM Session
For RVCM sessions, the configuration panel includes the following information.
To edit the global variables, click the Global Variables tab in the project panel in the upper left
quadrant. For more information, see TIBCO Designer Users Guide.
Name
Description
Service
Network
Daemon
SSL
CM Name
Relay Agent
168
| Chapter 3
LedgerFile
Synchronous Ledger
Writes
If True, then operations that update the ledger file do not return
until the changes are written to the storage medium.
If False, the operating system writes changes to the storage
medium asynchronously.
RVCMQ Session
For RVCMQ sessions, the configuration panel includes the following information.
To edit the global variables in this panel, click the Global Variables tab in the project panel in
the upper left quadrant. For more information, see TIBCO Designer Users Guide.
Name
Description
Service
Network
Daemon
SSL
CMQ Name
Scheduler Weight
When the heartbeat signal from the scheduler has been silent for
this interval (in milliseconds), the queue member with the
greatest scheduler weight takes its place as the new scheduler.
All member sessions in the queue must specify the same value
for this parameter. Acceptable values are unsigned 32-bit
integers (except zero). Defaults is 3000.
170
| Chapter 3
Listener Weight
Listener Tasks
RVTX Session
For TIBCO Rendezvous TX sessions, the configuration panel includes the following
information.
To edit the global variables in this panel, click the Global Variables tab in the project panel in
the upper left quadrant. For more information, see TIBCO Designer Users Guide.
Name
Description
Service
Network
Daemon
SSL
Transactional Name
Operation Timeout
JMS Session
For JMS sessions, the configuration panel includes the following information.
To edit the global variables in this panel, click the Global Variables tab in the project panel in
the upper left quadrant. For more information, see TIBCO Designer Users Guide.
Name
Description
JNDI Lookups
Use SSL
172
| Chapter 3
Basic Tab
For the Basic tab, either click Copy From to use the SSL information used by another
session, or fill in the following fields.
Trusted Certificates
Folder
Click the browse icon and select the folder in which the
trusted certificates to be used by this transport are stored.
See Chapter 5, Managing Trusted Certificates, on page 107
in TIBCO Designer Users Guide.
Identity
Advanced Tab
If you wish, you can also provide the following advanced information:
i
Trace
Debug Trace
This field specifies that the host name of the HTTP server
should be checked against the host name listed in the servers
digital certificate. This provides additional verification that the
host name you believe you are connecting to is in fact the
desired host.
If the specified host name is not an exact match to the host name
specified in the servers digital certificate, the connection is
refused.
Note: If you specify an equivalent hostname (for example, an IP
address), but the name is not an exact match of the hostname in
the hosts digital certificate, the connection is refused.
OpenSSL Name
E4JMS Client
SSL_RSA_WITH_NULL_MD5
NULL-MD5
SSL_RSA_WITH_NULL_SHA
NULL-SHA
SSL_RSA_EXPORT_WITH_RC4_40_MD5
EXP-RC4-MD5
C & Java
SSL_RSA_WITH_RC4_128_MD5
RC4-MD5
C & Java
SSL_RSA_WITH_RC4_128_SHA
RC4-SHA
C & Java
SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
EXP-RC2-CBC-MD5
C & Java
SSL_RSA_WITH_IDEA_CBC_SHA
IDEA-CBC-SHA
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
EXP-DES-CBC-SHA
C & Java
SSL_RSA_WITH_DES_CBC_SHA
DES-CBC-SHA
C & Java
SSL_RSA_WITH_3DES_EDE_CBC_SHA
DES-CBC3-SHA
C & Java
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
EXP-EDH-DSS-DES-CBC-SHA
C & Java
SSL_DHE_DSS_WITH_DES_CBC_SHA
EDH-DSS-CBC-SHA
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
EDH-DSS-DES-CBC3-SHA
C & Java
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
EXP-EDH-RSA-DES-CBC-SHA
C & Java
SSL_DHE_RSA_WITH_DES_CBC_SHA
EDH-RSA-DES-CBC-SHA
C & Java
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
EDH-RSA-DES-CBC3-SHA
C & Java
SSL_DH_anon_EXPORT_WITH_RC4_40_MD5
EXP-ADH-RC4-MD5
SSL_DH_anon_WITH_RC4_128_MD5
ADH-RC4-MD5
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
EXP-ADH-DES-CBC-SHA
SSL_DH_anon_WITH_DES_CBC_SHA
ADH-DES-CBC-SHA
174
| Chapter 3
OpenSSL Name
E4JMS Client
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
ADH-DES-CBC3-SHA
Transaction Controls
Adapters use transaction control pools in conjunction with RVTX. To specify a transaction
control pool, follow these steps:
1. Select the Transaction Controls folder.
2. From the palette panel, choose a Transaction Control Pool resource and drag it into the
design panel.
3. In the configuration panel, select the appropriate type from the pop-up, then click
Apply.
4. Specify configuration information as appropriate. For more detail, see the appropriate
control pool.
JDBC Control Pool
ODBC Control Pool
Null Control Pool
Simple Control Pool
XA Control Pool
MTS Control Pool
JDBC Control Pool
For a JDBC Control Pool, you can specify the following information (fields in bold are
required):
Name
User ID
176
| Chapter 3
Password
JDBC URL
Transaction ID Table
Maximum Controls
Description
Maximum Controls
Transaction ID Table
Description
Description
Maximum Controls
Description
XA Control Pool
For an XA control pool, you can specify the following information
Name
Description
Description
Advisories
You can create one or more advisories and associate it with a session in your application.
Follow these steps:
1. Select the Advisories folder in the project tree.
2. From the palette panel, drag an Advisory resource into the design panel.
3. In the configuration panel, specify a name and a subject.
4. To associate a session with the advisory, select the advisory in the project tree, then
drag a session into the design panel.
178
| Chapter 3
Folder Reference
This section is a reference to the folders used by TIBCO Designer. The section is mostly
meant for online help access. It discusses folders used by the Generic Adapter Configuration.
Advanced Folder
Sessions Folder
Timers Folder
Advisories Folder
Overview
By default, TIBCO Designer provides a number of folders as a part of every adapter
configuration. These folders provide easy, organized access to every configurable adapter
feature.
Figure 58 shows the layout of the default folders.
Advanced Folder
The Advanced folder is part of every adapter configuration. It contains resources that are
created by TIBCO Designer while the adapter developer configures the adapter. The
folder can include sessions, endpoints, advanced logging and so on. The configuration of
these resources can be changed for situations that require custom settings.
In most situations, adapter developers configure the resources in the Adapter Services folder.
They may then access the resources in this folder for certain custom configuration.
180
| Chapter 3
For basic logging, use the Logging tab for the adapter instance. See Logging Tab,
page 148 for information. If you are using this Generic Adapter Configuration to configure an
already existing adapter that was loaded into it, your adapter may include additional
logging information.
For advanced logging, click Use Advanced Logging, in the adapters Advanced Logging
tab, then specify log sinks in the Log Sinks folder. See , Custom Log Sink Reference.
Sessions Folder
The Sessions folder stores sessions and endpoints associated with an adapters services.
When you specify services for an adapter, TIBCO Designer creates the corresponding
sessions and endpoints. You can then edit the sessions and endpoints in this Sessions folder
if customization not available for the service is required. See , Sessions Reference and ,
Custom Log Sink Reference.
Timers Folder
The Timers folder stores timers for an adapter.
If you configure an adapter for which a palette is predefined, and timers are available for
this adapter, they are included in this folder.
If you configure a custom adapter, you create timers explicitly. See Timer on page 190.
Advisories Folder
The Advisories folder stores advisories for an adapter.
If you configure an adapter for which a palette is predefined, and advisories are available
for this adapter, they are usually one of the services you work with.
If you configure a custom adapter, you create timers explicitly. See Advisories on
page 177.
182
| Chapter 3
Endpoint Reference
Endpoints correspond closely to the publisher and subscriber, request-response invocation
server, or request-response server objects used by an Adapter SDK program. This section
provides reference information for all endpoints.
In most cases, you do not create endpoints explicitly. Instead, TIBCO Designer creates a
session and an endpoint for you when you create a service.
This section also discusses timers, which can potentially be used to trigger actions just like
endpoints. The following topics are covered:
Endpoints Overview
Publisher Endpoints
Subscriber Endpoints
Timer
Endpoints Overview
When you create a service by dragging a resource from the Adapter Services folder into
the design panel, TIBCO Designer creates the corresponding session and endpoint in the
Advanced folder of the Generic Adapter Configuration you are using. If you cannot fully
configure the endpoint from the Adapter Services folder, you can access it in the
Advanced folder and make changes there.
This chapter lists the available fields for each endpoint.
Publisher Endpoints
A publisher sends data to TIBCO Rendezvous or TIBCO Enterprise Message Service. A
publisher is associated with a schema class that specifies the data to be published. Also
associated with a publisher is a session. Sessions of several types are supported. The
session for a publisher determines the wire format it can use. For JMS sessions, you can
also change the delivery mode.
Creating sessions explicitly and adding publishers to the session is not recommended.
Instead, you should create the service you need, and let TIBCO Designer create the
session and endpoint. If there are changes you cannot make directly to the service, you can
then make them to the corresponding session or endpoint.
TIBCO Rendezvous Publishers
TIBCO Designer supports RV, RVA, RVCM, and RVTX sessions. For each type of
session, you can create a corresponding publisher.
For TIBCO Rendezvous publishers, following wire formats are supported at present:
Rendezvous Message is a TIBCO Rendezvous message which may have any contents,
not necessarily following the TIBCO ActiveEnterprise wire format.
Description
Endpoint Type
Choose from the pop-up, which displays the allowed types for
the current session.
Wire Format
184
| Chapter 3
Subject
Reply Subject
RVCM Publisher
For an RVCM publisher, you supply the following information:
Name
Description
Optional description.
Endpoint Type
Choose from the pop-up, which displays the allowed types for
the current session.
Wire Format
Subject
Reply Subject
Time after which the message is discarded from the ledger file.
Default is 0 seconds, meaning that the timeout is infinite.
Preregistered Listeners
RVTX Publisher
For a TIBCO Rendezvous TX publisher, you can supply the following information:
Name
Description
Optional description.
Endpoint Type
Choose from the pop-up, which displays the allowed types for
the current session.
Wire Format
Subject
Reply Subject
Message Timeout
Description
Optional description.
Endpoint Type
Delivery Mode
Destination
Reply Destination
Message Timeout
Description
Optional description.
Endpoint Type
186
| Chapter 3
Delivery Mode
Destination
Reply Destination
Message Timeout
Subscriber Endpoints
Subscribers specify the data consumers in the applications.
Creating sessions explicitly and adding subscribers to the session is not recommended.
Instead, you should create the service you need, and let TIBCO Designer create the
session and endpoint. If there are changes you cannot make directly to the service, you can
then make them to the corresponding session or endpoint.
When you create a subscriber, the choices you get depend on the session in which the
subscriber is created.
RV Subscriber, RVCM Subscriber, RVCMQ Subscriber, RVTX Subscriber
You supply the following information for each type of subscriber using TIBCO
Rendezvous as the transport:
Name
Description
Endpoint Type
Choose from the pop-up, which displays the allowed types for
the current session.
Wire Format
Subject
JMS Subscribers
You supply the following information for subscribers using JMS as a transport:
Name
Description
Endpoint Type
Delivery Mode
Destination
Auto-confirm
188
| Chapter 3
Description
Endpoint Type
Subject
Description
Delivery Mode
Non-Persistent or Persistent.
Endpoint Type
Destination
Description
Endpoint Type
Subject
Description
Endpoint Type
Delivery Mode
Destination
190
| Chapter 3
Timer
TIBCO Designer allows you to add a timer to your adapter configuration. The timer can
then be used by the adapter program.
To add a timer, follow these steps:
1. Open the Timers folder
2. Drag a Timer from the palette panel into the design panel.
3. Specify configuration information for the timer.
Name
Interval (milliseconds)
Repeating
Session Reference
| 191
Chapter 4
This chapter discusses the Adapter Schema palette. You can use this palette for
configuring custom schema for custom adapters that were implemented using the TIBCO
Adapter SDK.
Topics
192
| Chapter 4
194
| Chapter 4
If you load a legacy adapter, for which no palette exists, TIBCO Designer creates a
palette using the Generic Adapter Configuration resources. You can then change the
schema for the endpoints in that adapter using the Adapter Schema palette.
If you are creating a custom adapter from scratch, you use the resources in the Adapter
Resources palette to define the sessions, endpoints, and other elements. You then have
to create schema resources to represent the data the endpoints in your custom adapter
work with.
To use any of these resources, you should always first drag an AESchema resource into the
Design panel, then add your own resources to the folders that are created.
corbaCORBA
schema data
javajava
schema data
sqlSQL
schema data
To use any of these resources, you should first create a separate folder and add resources
to it as needed.
This example configures a PeopleSoft adapter subscriber which retrieves data from a
PeopleSoft application.
Follow these steps:
1. With the project displayed in the Design panel, drag a PeopleSoft Adapter
Configuration resource from the palette panel into the design panel.
2. Find the adapter instance in the project tree, and open its Adapter Services folder.
A number of services become available in the palette panel.
3. Drag a Subscribe Event into the design panel.
In the configuration panel, the configuration tab changes to allow you to specify
configuration information.
4. Click Fetch Component Interface Name.
TIBCO Designer displays a window in which you can select the component interface
to which you want to subscribe.
5. Choose Product, click OK, then click Apply in the configuration panel.
You can now save your project with the new adapter including the subscriber and the
schema for the subscriber.
How TIBCO Designer Works With the Schema Data
When you are setting up the PeopleSoft subscriber, TIBCO Designer performs a number
of operations:
Knowledge or understanding of these operations is not necessary or even useful for
adapter configuration. They are included for the sake of completeness.
Under the Schema tab, displays the schema in that interface. Click on the folders to
see the fields and field types (which will translate to attributes and attribute types).
Creates a folder in the Schema/classes/ae folder for the application and adds class
resources matching the schema with attributes matching the fields.
Under the Advanced tab, displays the message subject, endpoint reference, and
schema class reference.
The endpoint reference points to the session that was created.
The schema class reference points to the class created for this component interface.
196
| Chapter 4
The AESchema resource contains folders for the classes, sequences, etc. to be used by
the adapter. Click the + below the resource in the project tree to see the folder
hierarchy.
5. Select the Classes folder. From the palette panel, drag a Generic class into the design
panel and choose a class type. Then proceed to configure the class as discussed in
Defining a Class with Attributes on page 199 and Defining a Class with Operations on
page 202.
When you are configuring a service, you can then add the schema to the service by
clicking the Browse icon in the Schemas tab.
To add the schema object to an endpoint (for example, a publisher) explicitly, follow these
steps:
1. In the project panel, select the endpoint while the schema object is visible.
2. From the project panel, drag the schema object into the design panel with the endpoint
still selected.
TIBCO Designer creates a reference to the schema object and includes it below the
endpoint in the hierarchy.
198
| Chapter 4
AESchemas Folder
Classes
Operations
Scalars
Unions
Sequences
AESchemas Folder
When you launch TIBCO Designer, the project tree always includes an AESchemas folder
immediately under the top-level folder.
The AESchemas folder is the repository for all schema data used by all applications in your
project.
When you configure a standard adapter, TIBCO Designer creates schema resources
and places them in the appropriate location in the AESchemas folder.
When you configure a custom adapter, you create schemas inside the AESchemas folder.
You then add schema references to the services your adapter provides. Some examples
are given in this chapter.
You use this palette to define schema for your adapter. See Defining Custom Adapter
Schema on page 196 for an example.
Classes
Many TIBCO applications produce or consume data that are structured as objects. These
objects are described by schemas.
A Generic Class resource can be used for these purposes:
Define a class object to represent schema data for your adapter. See Defining a Class
with Attributes on page 199 and Defining a Class with Operations on page 202.
Add a class field to your class object. See Adding Class Attributes on page 200.
200
| Chapter 4
you could drag a Generic Scalar (found in the Scalar Types palette) and choose the
desired type from the pop-up. You have these choices:
Adding Class Attributes, page 200
Adding Union Fields, page 200
Adding Sequence Fields, page 201
Adding Scalar Fields, page 201
For classes that have superclasses, an attribute or operation must not overload or hide one
of the same name in a superclass.
3. Specify the following additional information about the attribute:
Keyfield. Select the check box if this attribute represents a key field, or leave it
unchecked if it does not.
Default Value. Provide a default value. This property is not available for all attribute
types.
Readable. Select the check box to make the attribute readable, deselect otherwise.
Writable. Select the check box to make the attribute writable, deselect otherwise.
4. Click Apply.
Adding Class Attributes
To add an attribute whose value must be a class:
1. Specify the class that should restrict the attribute value, if it does not yet exist.
2. Select the class to which you want to add the attribute, or drag a Generic Class into
the design panel and choose Schema as the type.
3. With the Schema class selected, drag the class that should restrict the value into the
design panel (or click the Browse button with the class field selected).
4. Click Apply.
See How TIBCO Applications Use Schema Data, page 193 for more information.
Adding Union Fields
To add an attribute whose value must be a union, you must first have defined one or more
Union resources. See Unions, page 208:
1. Specify the union that should restrict the attribute value, if it does not yet exist. Add
union members.
2. Select the class to which you want to add attributes, or drag a Generic Class into the
design panel and choose Schema as the type.
3. Drag the Union resource into the design panel.
You have now specified that union is the choices of attribute values. For example, you
could drag both a string and an integer.
4. Click Apply.
See Unions, page 208 for more information.
Adding Sequence Fields
To add an attribute of type sequence, you must have first defined a sequence.
1. Specify the sequence that should restrict the attribute value, if it does not yet exist.
2. Select the class to which you want to add attributes, or drag a Generic Class into the
design panel and choose Schema as the type.
3. Drag a Generic Sequence from the Sequence Types palette into the design panel.
4. Specify a Name, Element Type, and length for your sequence. The length is the
number of elements in the sequence.
5. Click Apply.
See Sequences, page 210 for more information.
Adding Scalar Fields
To add an attribute whose value must be a scalar, follow these steps:
1. Specify the scalar that should restrict the attribute value, if it does not yet exist.
2. Select the class to which you want to add attributes, or drag a Generic Class into the
design panel and choose Schema as the type.
3. Drag a Generic Scalar from the Scalar Types palette into the design panel.
4. Specify a name, then bring up the pop-up to specify the type of scalar.
The values you can choose from are the types available as part of the Adapter SDK
class library. See the TIBCO Adapter SDK Programmers Guide for information on
the mapping of these types to Java or C++ types.
5. Specify other information as appropriate, then click Apply.
202
| Chapter 4
3. Select the parameters folder and drag resources representing the parameter type into the
design panel. For example, assume you want to specify an input parameter of type
string:
a. Drag a Generic Scalar into the design panel.
b. Specify a name, the type (String), and optional direction (In).
InIn
parameter. Client can set the value and invoke the operation.
In/OutBoth
OutOnly
server can set the value and send the reply back to client.
c. Click Apply.
d. Specify additional parameters by repeating steps a-c as desired.
4. Select the Exceptions folder and drag a resource representing the exception type into the
design panel. For an error code, you could use a scalar with the appropriate type. You
could also specify a class, as follows:
a. Drag a Generic Class into the design panel.
b. Specify a name and click Browse to select a class.
c. Choose AESchemas/ae/MAdvisoryDocument to indicate this exception returns an
MAdvisoryDocument instance.
d. Click Apply.
e. Specify additional exceptions by repeating steps a-d as desired.
Operations
SDK operations are described in the metadata objects in the repository. The operation
description can be shared across TIBCO ActiveEnterprise products and introspected at run
time for dynamic invocation.
Implementing ActiveEnterprise operations consists of two tasks:
1. Using TIBCO Designer to describe the operations to be performed. This includes
parameters and exceptions for the operations.
2. Using TIBCO Adapter SDK classes to implement the behavior in the application
code.
Defining Operations
To define an operation, follow these steps:
1. In the TIBCO Designer project tree, select the AESchemas folder, then the ae folder.
TIBCO Designer Palette Reference
204
| Chapter 4
2. Drag a Folder resource into the ae folder displayed in the design panel and name it
appropriately for your adapter.
3. Drag an AESchema resource into the folder. Open the AESchema resource and select its
Classes folder.
4. In the palette panel, select the Generic Class icon and drag it into the design panel.
5. For the Class Type field, select Operation Schema, then click Apply.
6. Select the Operation Schema class in the project tree. From the palette panel, drag an
Operation into the design panel.
7. Specify the following information for the operation:
Name. Define the operation name.
Returns: Click Browse and select the return type for the operation. It could, for
example, be a resource in the AESchema/ae/Scalars folder or a predefined class.
Oneway. Click this check box if the operation can be invoked without waiting for a
return value or acknowledgment.
8. Select the Parameters folder of the operation. From the project tree, drag in the resources
representing the parameter types. See Defining Operation Parameters on page 204.
9. Select the Exceptions folder of the operation. From the project tree, drag in the resources
representing the exception types.
Defining Operation Parameters
When you define an operation, TIBCO Designer automatically adds two folders:
Operation Parameter Folder
Use this folder to drag in resources representing the parameter types, as discussed in the
following sections.
206
| Chapter 4
3. Select a scalar in the project tree and drag it into the design panel, or click Browse and
find the class you want to use.
4. Select the operation direction.
InIn parameter. The client can set the value and invoke the operation.
In/OutBoth client and server can set the value.
OutOnly the server can set the value and send the reply back to client.
5. Click Apply.
Your operation now expects a parameter which has the scalar you selected as its type.
Parameters of Type Union
If you want to add a parameter that has a union as a type, follow these steps:
1. Create the operation, as discussed in Defining Operations on page 203.
2. In the project tree panel, double-click the Parameters folder.
3. Select a union in the project tree and drag it into the design panel, or click Browse and
find the class you want to use.
4. Select the operation direction.
InIn parameter. The client can set the value and invoke the operation.
In/OutBoth client and server can set the value.
OutOnly the server can set the value and send the reply back to client.
5. Click Apply.
Your operation now expects a parameter which has the union you selected as its type.
Defining Exception Parameters
When you define an operation, TIBCO Designer creates an Exceptions folder for you. You
can specify the type of exceptions the operation should return as follows:
1. Create the operation, as discussed in Defining Operations on page 203.
2. In the project tree panel, double-click the Exceptions folder.
3. Drag the object representing the type of exception you wish to have delivered into the
design panel. For example, for an exception of type MAdvisoryDocument, select an
MAdvisoryDocument object.
4. Click Apply.
5. Add more exceptions to the operation as needed.
TIBCO Designer Palette Reference
Scalars
Within TIBCO Designer, the term Scalar refers to a primitive object that describes a data
type, such as int, long, char, byte, and date. You select the appropriate folder (for example, ae
or sql) and object to determine what kind of primitive data type describes the object and
which attributes must therefore be set.
The resources in the ae folder correspond to the types available for SDK adapters.
When an adapter repository is created, a number of scalar objects are included by default.
In addition, you can work with parameterized primitive data types (for example, ae/fixed,
where you can derive an infinite number of types from a base type by
changing various data type attributes. You can use these types, for example, to create a
bounded binary or bounded char type. If there is a base data type, then it will be
pre-loaded, but you are required to create any other instances as you need them, just as
you would for sequence types.
ae/binary, ae/char),
You can use one of the scalar resources that are already included with TIBCO Designer, or
define a custom scalar used by your application.
To define a custom scalar:
1. In the project tree, select one of the folders inside the Scalars folder in the project tree
or, to define a new scalar type, create a new folder first.
2. From the palette panel, drag a Generic Scalar into the design panel.
3. In the configuration panel, specify the information about the scalar, then click Apply.
To add a scalar attribute to a custom class:
1. In the project tree panel, select the Classes folder.
2. In the palette panel, select a Generic Class and drag it into the design panel.
3. In the configuration panel, select Schema as the class type.
4. To add a scalar attribute, select the new schema class, then drag a Generic Scalar from
the palette panel into the design panel.
5. Specify the information about the attribute you have added:
NameName of the attribute
TypeSelect the appropriate type from the pop-up.
Default ValueSpecify the default value for this field. This information is optional
and no type checking is performed.
KeyfieldSelect if this is a key field.
208
| Chapter 4
Unions
Unions may be placed alongside classes within a Classes folder. Like classes, unions are
containers of data items, but the contents of a union are alternatives. Only one alternative
is actually present in the union instance. Like classes, unions may have an associated
property list.
Unions have a name and have one or more union members. Each union member, in turn,
has a name and a type. Union and union member elements may have attributes.
Defining Union Objects
Define one or more Union objects as follows:
1. Select the Union folder.
2. From the palette panel, drag a Generic Union into the design panel.
3. Give the Union a name, then add members to the Union.
Adding Union Members to Union Objects
When you specify the union members for a union, TIBCO Designer creates references to
the object you add. This section discusses the process for the different resource types:
TIBCO Designer creates a reference to MBusinessDocument and makes it the first union
member.
3. Drag a second class, for example, an MAdvisoryDocument into the design panel.
TIBCO Designer creates a second class reference.
If you now add the union as an attribute to a schema class and assign that schema to an
endpoint, the endpoint will only accept data of type MBusinessDocument or
MAdvisoryDocument.
You can add more than 2 class references as union members. You can also mix class
references and other references.
Adding Sequence Reference Union Members
When you add a sequence union member to a union, TIBCO Designer creates a sequence
reference. To define union members that are sequences, follow these steps:
1. Select a union in the project tree.
2. From the project tree, drag an existing sequence into the design panel. See Sequences
on page 210.
TIBCO Designer creates a reference to the sequence.
3. From the project tree, drag an second sequence into the design panel.
TIBCO Designer creates a reference to the second sequence.
4. If you now add the union as an attribute to a schema class and assign that schema to an
endpoint, the endpoint will only accept data that either match one or the other
sequence.
You can add more than 2 sequence references as union members. You can also mix
sequence references and other references.
Adding Scalar Reference Union Members
When you add a scalar as a union member to a union, TIBCO Designer creates a scalar
reference. To define union members that are scalars, follow these steps:
1. Select a union in the project tree.
2. From the project tree, drag a scalar into the design panel. See Scalars on page 207.
TIBCO Designer creates a reference to the scalar.
3. From the project tree, drag a second scalar into the design panel.
TIBCO Designer creates a reference to the second scalar.
210
| Chapter 4
4. If you now add the union as an attribute to a schema class, and assign that schema to
an endpoint, the endpoint will only accept data that match either one or the other
scalar.
You can add more than 2 scalar references as union members. You can also mix scalar
references and other references.
Adding Union Reference Union Members
When you add a union as a union member to an existing union, TIBCO Designer creates a
union reference.
To define a union members that are, in turn, unions, follow these steps:
1. Select a Union in the project tree.
2. From the project tree, drag a union into the design panel. See Unions on page 208.
TIBCO Designer creates a reference to the union.
3. From the project tree, drag a second union into the design panel.
TIBCO Designer creates a reference to the second union.
4. If you now add the union as an attribute to a schema class, and assign that schema to
an endpoint, the endpoint will only accept data that match either one or the other
union, that is, any of the elements in either union.
You can add more than 2 union references as union members. You can also mix union
references and other references.
Sequences
Sequence objects describe ordered sets of the same type, for example, an ordered set of
integers. The sequence is described by its optional maximum length and the type of
element in the sequence. Because the sequence is parameterized both by length and
element type, there are an infinite number of sequence types.
Create a sequence as follows:
1. Select the Sequence folder.
2. From the palette panel, drag a Generic Sequence into the design panel.
3. In the configuration panel, select the name, type of the elements, and length of the
sequence.
The maximum length is the number of elements in the sequence.
Associations
An association has two endpoints and each association has attributes such as multiplicity
and navigability.
Association Types
To better support mapping to relational databases, the XML standard defines an
association type, which is one of the following:
A Note on Multiplicity
Both ends of an association can have a multiplicity. For example, a 1 to 1 relation has
multiplicity = 1 on both ends. One to n (i.e. unlimited) has 1 at one end and -1 (unlimited)
on the other. In these cases, there is only one multiplicity number and minMultiplicity and
maxMultiplicity will be equal.
In rather rare cases, you would specify a different minimum and maximum. One example
given in the "UML Distilled" book is that a car can have 2 to 4 doors. So in this case the
"car" end of the association would have multiplicity 1 and the "door" end would have
minMultiplicity = 2 and maxMultiplicity = 4.
See any reference on UML for more details.
212
| Chapter 4
Class Reference
Scalar Reference
Union Reference
Sequence Reference
Generic Class
Generic Scalar
Generic Union
Generic Sequence
Class Field
Scalar Field
Union Field
Sequence Field
Class Reference
TIBCO Designer creates a schema class reference in these situations:
When you add a class to a union as a union member. See Adding Class Reference
Union Members on page 208.
When you add a class as an exception to the Exceptions folder of an operation. See
Defining Exception Parameters on page 206.
When you add a class to an endpoint to restrict the data it should work with. See
Defining Custom Adapter Schema on page 196.
Scalar Reference
TIBCO Designer creates a scalar reference in these situations:
When you add a scalar to a union as a union member. See Adding Scalar Reference
Union Members on page 209.
When you add a scalar as an exception to the Exceptions folder of an operation. See
Defining Exception Parameters on page 206.
When you add a scalar to an endpoint to restrict the data it should work with. See
Defining Custom Adapter Schema on page 196.
Union Reference
TIBCO Designer creates a union reference in these situations:
When you add a union to a union as a union member. See Adding Union Reference
Union Members on page 210.
When you add a union as an exception to the Exceptions folder of an operation. See
Defining Exception Parameters on page 206.
When you add a union to an endpoint to restrict the data it should work with. See
Defining Custom Adapter Schema on page 196.
Sequence Reference
TIBCO Designer creates a sequence reference in these situations:
When you add a sequence to a union as a union member. See Adding Sequence
Reference Union Members on page 209.
When you add a sequence to an endpoint to restrict the data it should work with. See
Defining Custom Adapter Schema on page 196.
Generic Class
A generic class is a resource template in the palette panel that you can drag into the design
panel. The actual resource TIBCO Designer creates from the generic class depends on the
current selection.
If the current selection is any of the folders or subfolder inside the AESchemas folder,
TIBCO Designer creates a generic class. You can then select the class type (Schema or
Operation class) and TIBCO Designer creates a resource of that type. See How
TIBCO Applications Use Schema Data on page 193.
If the current selection is a Schema class, the Generic class becomes a Class field, that
is, a field inside the class that has that class as the type. See Adding Class Attributes
on page 200.
214
| Chapter 4
If the current selection is a Union or the Exceptions folder inside an operation, TIBCO
Designer creates a class reference. See Class Reference on page 212.
Generic Scalar
A generic scalar is a resource template in the palette panel that you can drag into the
design panel. The actual resource TIBCO Designer creates from the generic scalar
depends on the current selection.
If the current selection is any of the folders or subfolder inside the AESchemas folder,
TIBCO Designer creates a Scalar Type resource. See Scalars on page 207.
If the current selection is a Schema class, the Generic sequence becomes a Union
field, that is, a field of type Union inside the class. See Adding Union Fields on
page 200.
If the current selection is a Union or the Exceptions folder inside an operation, TIBCO
Designer creates a union reference. See Union Reference on page 213.
Generic Union
A generic union is a resource template in the palette panel that you can drag into the
design panel. The actual resource TIBCO Designer creates from the generic union
depends on the current selection.
If the current selection is any of the folders or subfolder inside the AESchemas folder,
TIBCO Designer creates a Union Type resource. See Unions on page 208.
If the current selection is a Schema class, the Generic sequence becomes a Union
field, that is, a field of type Union inside the class. See Adding Union Fields on
page 200.
If the current selection is a Union or the Exceptions folder inside an operation, TIBCO
Designer creates a union reference. See Union Reference on page 213.
Generic Sequence
A generic sequence is a resource template in the palette panel that you can drag into the
design panel. The actual resource TIBCO Designer creates from the generic sequence
depends on the current selection.
If the current selection is any of the folders or subfolder inside the AESchemas folder,
TIBCO Designer creates a Sequence Type resource. See Sequences on page 210.
If the current selection is a Schema class, the Generic sequence becomes a Sequence
field, that is, a field of type Sequence inside the class. See Adding Sequence Fields on
page 201.
If the current selection is a Union or the Exceptions folder inside an operation, TIBCO
Designer creates a sequence reference. See Sequence Reference on page 213.
Class Field
TIBCO Designer creates a class field when you drag a Class into the design panel while a
schema resource is selected. See Adding Class Attributes on page 200.
Scalar Field
TIBCO Designer creates a scalar field when you drag a Scalar into the design panel while
a schema resource is selected. See Adding Scalar Fields on page 201.
Union Field
TIBCO Designer creates a union field when you drag a Union into the design panel while
a schema resource is selected. See Adding Union Fields on page 200.
Sequence Field
TIBCO Designer creates a sequence field when you drag a Sequence into the design panel
while a schema resource is selected. See Adding Sequence Fields on page 201.
216
| Chapter 4
Folder Resource
AESchemas Folder
Classes Folder
Scalars Folder
Unions Folder
Sequences Folder
Associations Folder
Folder Resource
Folder resources are used to organize projects. For example, you can add one folder each
for each adapter instance you are designing. TIBCO Designer uses folders inside the
AESchemas folder to organize Schema resources.
AESchemas Folder
The AESchemas folder is a container for all schema data used by all applications in your
project.
When you configure a standard adapter, TIBCO Designer creates schema resources
and places them in the appropriate location in the AESchemas folder.
When you configure a custom adapter, you create schemas inside the AESchemas
folder. You then add schema references to the endpoints in your application. Some
examples are given in this chapter.
Classes Folder
The Classes folder is a container for all classes used by all applications in your project.
Create a folder for you application inside this folder for a clean organization. See the
TIBCO Adapter SDK Programmers Guide for more information.
Scalars Folder
The Scalars folder is a container for all scalars used by all applications in your project. It
contains folders for scalars commonly used by applications.
The Scalars folder under AESchemas/ae contains TIBCO ActiveEnterprise scalars. For
information on mapping between those scalars and C++ and Java types, see the
TIBCO Adapter SDK Programmers Guide.
The Scalers folder under AESchemas is meant to hold a folder for the scalars used as
schema by your application.
Unions Folder
The Unions folder is a container for all unions used by all applications in your project.
Create a subfolder to hold unions used by your project. For more information, see Unions
on page 208
Sequences Folder
The Sequences folder is a container for all sequences used by all applications in your project.
Create a subfolder to hold sequences used by your project. See the TIBCO Adapter SDK
Programmers Guide for more information.
For more information on using sequences inside TIBCO Designer, see Sequences on
page 210
Associations Folder
The Associations folder is a container for all associations used by all applications in your
project. For more information, see Associations on page 211.
218
| Chapter 4
| 219
Repository Palette
Chapter 5
The Repository palette allows you to manipulate legacy project repositories and their data
directly. You can also use this palette to interact with Administration Servers. In most
cases, you interact with project repositories using the TIBCO Designer GUI elements.
Using this palette is only useful in rare cases for legacy applications.
The Repository palette is therefore not displayed by default. To display the palette, choose
Palettes > General > Repository from the TIBCO Designer menu bar. The palette is
displayed if the check mark is visible.
i
You cannot use the Repository palette and associated Repository Finder to manage multi-file
projects.
Topics
220
| Chapter 5
Repository Palette
Introduction
TIBCO Designer offers two paradigms for manipulating data: projects and repositories. In
most cases, you use the project paradigm. In some cases, you want to look at or work with
the underlying paradigm, the repository. You can locate, manage, and monitor repositories
using the repository palette.
By default, the repository palette is hidden.
This chapter first compares the two paradigms. It then explains how to display the
repository palette, and how to use TIBCO Designer to locate repository instances. It also
gives a reference to all icons in the Repository palette.
You can use Repository Finder only to manage 4.x repositories. It does not work for 5.x
multi-file projects (VC format repositories).
This chapter gives an introduction to projects and repositories and how they interact.
Repository Palette
A repository is a data store, that is, a collection of information stored in one place.
Repositories can be simple, for example, contain data used by an application, or more
complex, for example, contain the definitions for several adapters.
Introduction 221
You can view and manipulate any repository using Repository Finder. This includes
repositories saved as projects from TIBCO Designer and legacy repositories created by
other tools. You can also view and manipulate currently loaded projects as repositories.
Warning: In almost all cases, it is appropriate to work with your data using the projects
folders, resources, and configuration information. One reason for this is that TIBCO
Designer makes sure the public and private repository areas are in sync when you edit a
project. Inconsistencies may result if you change a repository using Repository Finder.
The Repository Finder hierarchy is meant for certain administrative tasks on legacy
projects and not usually used for application design.
Locate both local and remote repositories based on the discovery criteria you specify.
See Using Repository Finder to Locate Repositories, page 221.
When you add a Repository Finder to your project, the Finder is later saved as part of your
project. However, the search information is not saved.
222
| Chapter 5
Repository Palette
1. Make sure the Repository palette is available (not hidden). See Showing the
Repository Palette on page 221.
2. Drag a Repository Finder from the palette panel to the design panel.
A Repository Finder is added to your project and displayed in the design panel and the
project tree. The configuration panel lets you specify discovery criteria.
Introduction 223
Local File
Repositories
TIBCO Designer looks for repositories in the specified directory and displays them in
the project tree panel under a Local Repositories entry. Heres an example of part of a
repository hierarchy for a TIBCO BusinessConnect for RosettaNet application.
By default, Repository Finder only displays repository directories and objects. If you want
to view attribute information, select Advanced Browsing in the Advanced tab before you
click Rediscover. See Introduction on page 220.
e. If you want to look for both local and remote repositories, go on to the next step.
224
| Chapter 5
Repository Palette
Servers and
Instances
4. Click Server Repositories if you want to find repository servers and their instances.
a. Click the Search Remotely check box.
b. If the server is using RVD, specify any non-default TIBCO Rendezvous daemon,
network, and service, specify it here. Otherwise, TIBCO Designer searches using
the defaults, which are:
RV Daemon: tcp:7500
RV Network: unspecified
RV Service: unspecified
c. If you are using RVA, click the RVA button and specify the host and port.
Introduction 225
5. Browse the local and remote repositories that match your search criteria. In the
hierarchy, you see repository instances, directories, and objects.
Repository instance
Repository directory
Repository object
6. If you need additional information on the contents of the object, or want to change its
attribute, choose the Advanced tab, then turn on advanced browsing and editing. See
Viewing Attributes of Repository Objects, page 238 and Modifying Attributes Inside
Repository Objects, page 239.
In most situations, adding resources to projects and manipulating their attributes is
preferable to manipulating repository objects through the Repository Finder hierarchy.
One reason for this is that TIBCO Designer makes sure the public and private repository
areas are in sync if you edit a project, but cannot do so if you change a repository.
226
| Chapter 5
Repository Palette
Local instance
At the first level of the hierarchy, you can see the following items:
Repository Server
A repository server manages repository instances. The instances can be local or remote,
and can be files or stored in a database. The server uses TIBCO Rendezvous software to
communicate with remote clients.
A repository server can support multiple remote repository instances. A repository server
is identified by a name which must be unique among all repository servers on a network.
The repository server communicates with repository instances via TIBCO Rendezvous.
Server-based Instance
A server-based instance can be on any computer on the network and can be in a file or a
database.
Local Instance
A local instance is always a .dat file and accessed directly, not via TIBCO Rendezvous.
You cannot view multi-file projects using Repository Finder.
See Repository Directory, page 228 and Repository Object, page 228 for more
information.
Repository directory
Repository object
Repository Palette
When you select Repository Finder or one of the resources below it in the project tree
hierarchy, the Repository palette is displayed in the palette panel. Depending on the
selected resource, you can either add a repository instance or a repository directory and
object to the design panel.
Repository Instance
Repository Directory
Repository Object
Repository Instance
A repository instance is a named collection of data, usually metadata and configuration
data that is persistently stored. A local repository instance is stored on the local file system
and directly accessed by the client. A remote repository instance is managed by a
repository server and accessed by a client using TIBCO Rendezvous.
See Introduction on page 220 for information on the operations you can perform.
228
| Chapter 5
Repository Palette
Repository Directory
A repository directory is a container for one or more directories as well as one or more
objects. Directories are used for organizing objects so that they can then be referred to
unambiguously.
Repository Object
A repository object is a container for the data. Data are organized as an ordered list of
name:value pairs called an association list. In effect, an object is a named association list.
The term object is used although there is no notion of inheritance or information hiding,
nor does the object have any methods.
Remote repositories can be files or in a database. They must always be associated with
a repository server.
230
| Chapter 5
Repository Palette
3. Specify the instance name, display name, and file type as prompted.
TIBCO Designer creates a repository instance and displays it under Local File
Repositories.
4. If you like, you can specify additional information. See Specifying Additional
Repository Information on page 231
You can also add a repository instance by
Selecting Local File Repositories.
Dragging an Instance icon from the palette panel to the design panel.
Specifying the instance information when prompted.
Creating a Repository Instance Managed by a Server
A repository instance managed by a server can be on any machine on the network, and can
either be a file or inside a database.
To create a remote repository instance, follow these steps:
1. Make sure the repository server for the instance is running.
2. In the Repository Finder configuration panel, click Search Remotely, specify the
search parameters for the server, and click Rediscover.
The server is displayed, even if this server currently has no instances.
3. From the right-button menu of the server, choose Create Repository Instance.
4. Provide the name, display name, and request subject prefix as prompted.
TIBCO Repository creates the repository instance in the remoteRepos directory associated
with that server.
If you like, you can specify additional information. See Specifying Additional Repository
Information on page 231.
You can also add a repository instance by
Selecting the appropriate repository server.
Dragging an Instance icon from the palette panel to the design panel.
Specifying the instance information when prompted.
Display Name
Encoding
Specify the encoding you intend to use for this projects encoding property. This property is
used by client applications that access the project for any TIBCO Rendezvous
communications. For example, if a TIBCO Adapter accesses the file, it will then use the
value specified in this Encoding property for TIBCO Rendezvous communication with
other applications.
Note that this is not the encoding of the repository's persistent storage.
Legal values are ISO8859-1 (for Latin-1 and ASCII 7-bit character sets) and UTF-8 (for
other non-Latin-1 and Asian character sets).
Responsible
Person
Person to contact.
Description
Support Info
232
| Chapter 5
Repository Palette
IsDefault
The following information is included in the General tab but cannot be changed.
Version
Shows the version for this repository (cannot be changed). Default for TIBCO Designer
4.0.0 repositories is 4.0.0.
Instance Type
Either LocalFile for a local file repository or remoteRV for any repository managed by a
server.
File Type
Dir Name
Request
Subject Prefix
You are prompted for information about the new repository. For local file repositories:
Instance Name
Display Name
Display name.
File Type
Dir Name
234
| Chapter 5
Repository Palette
For diagnostics and troubleshooting. Viewing the XML file may help you pinpoint a
problem.
For merging local repository instances into one remote repository instance.
You can use the RepoImport and RepoExport command line tools instead of TIBCO Designer.
These tools allow you to use schema validation as part of your export process if desired.
Exporting an Instance
To export a repository instance, follow these steps:
1. Select the repository instance.
2. From the right-button menu, choose Export Repository Instance.
236
| Chapter 5
Repository Palette
3. Choose the location for the XML file, then click OK.
TIBCO Designer saves your repository to the specified location using TIBCO Repository
XML format (generic format).
You can also use the Export icon to export a repository.
Importing an Instance
To import a repository instance, follow these steps:
1. Select a repository instance that you want to overwrite, or create a new repository and
select it.
2. Right-click the repository and choose Import Repository Instance.
You are prompted for a file.
3. Select an XML file that had previously been exported from a repository, either using
TIBCO Designer or using the RepoExport command-line utility.
The system prompts you with the following dialog:
4. Click Yes to replace the contents. In that case, TIBCO Designer first completely
empties the existing repository instance and then imports all information from the file.
5. Click No if you want to partially replace the existing repository. In that case, TIBCO
Designer prompts you whether duplicates should be replaced:
If there are duplicate repository directories, you can replace or reject a whole
directory and its contents.
If there are duplicate repository objects, you can replace or reject the object and its
contents.
You can also use the Import icon to import a repository.
238
| Chapter 5
Repository Palette
2. With the Repository Finder selected, click the Advanced tab in the configuration
panel.
User
Password
Advanced Browsing
Advanced Editing
Object
Attribute
TIBCO Designer displays the object and its attributes. Attributes usually have names,
attribute types, and other properties. The value of each attribute is either a string or a
global name. In the example above, the attribute with the name statusMsg has an
attributeType that is a global name.
The name:value pairs inside the association lists are called properties of the attribute.
For example, name, attributeType, and isKey are properties of the attribute. Custom
properties are also allowed.
Steps
To modify an attribute, follow these steps:
1. Locate the repository in which you want to make changes. See Introduction on
page 220.
240
| Chapter 5
Repository Palette
2. In the configuration panel, click Advanced, then select the Advanced Browsing and
Advanced Editing check box and click Apply.
3. In the project tree panel, find the repository object in which you want to add or change
attributes.
4. When you select the object
the object is displayed in the configuration panel
edit buttons for the configuration panel are displayed at the bottom of the panel (see
below)
you can select the named association lists and their properties
5. To change the value of a property inside an attribute, triple-click the property to select
it, then type the new value into the edit field that opens. In the screen shot below, the
defaultStartup property of the startup attribute is being edited.
6. If you want to add a new association list to an object or an association list, or add a
property to an association list, use one of the following icons (see Table 16 for
explanation):
up/down
association list
binary
reference
string
delete
load file into a byte array (file => byte array)
save the value of a binary property
into a file (byte array => file)
Description
Binary icon
Copies a byte array into a file (on disk) and saves the file. It
does not remove the byte array value from the binary
property.
Reference Icon
String
You must click Commit to save changes before selecting another resource or your
changes are lost.
You can click Rollback to undo changes since the last commit.
You can also move properties by clicking the up/down icon, and delete them by clicking
the delete icon.
242
| Chapter 5
Repository Palette
Toolbar Icons
Create Repository
Instance
Start Repository
Instance
Stop Repository
Server
Add Resource
What is this
Stop Repository
Instance
Clone Repository
Instance
Export Repository
Instance
Import Repository
Instance
Delete Repository
Instance
Add Resource
Toolbar Icons
When you select a repository instance, three icons are added to the toolbar that allow you
to perform actions also available from the instances right-button menu.
Export to XML FileExports the selected instance to a TIBCO Repository
XML file. Clicking this button does the same things as using the TIBCO
Repository RepoExport command-line tool.
The file is saved in generic XML format (not AEXML format).
Import file into RepositoryDisplays a window that lets you choose an XML
file to import into the currently selected repository instance. You can import
repositories in generic or AEXML format.
Clone selected RepositoryCreates a copy of the selected repository.
244
| Chapter 5
Repository Palette
| 255
Index
A
adapter endpoints 205
adapter schemas palette 208
adapters
configuring 203
creating 145
Add Module button 102
Add Namespace button 55
adding 15
adding adapters 145
adding class fields 210
adding class union members 219
adding color to tags 129
adding new XML resource 15
adding operations 212
adding scalar union members 220
adding sequence union members 219
adding unions as union members 219
Advanced folder 188
Advanced pane
Notations tab 65
Advanced panel 63, 103
advanced repository management 247
advisories 186
Advisories folder 190
aliases for attributes 129
aliases for elements 129
all content models 36
all occurrence indicators 35
appendmode attribute 171
association lists 249
associations 221
types 221
B
blue ellipsis icon 135
building content model
with reusables 91
building content models
content model editor 49, 91
occurrence and sequence indicators 45, 87
building documents 138
C
changes from the previous release of TIBCO Designer Palette Reference xiv
choice 34
class 209, 209, 212
adding attributes 209
class fields 210
class reference 219
client service 164
clients 196
cloning repository instances 242
cmname attribute 177
cmqname attribute 178
collapsing elements 128
collapsing markup view 135
TIBCO Designer Palette Reference
256
| Index
color
adding to tags 129
color options 129
comments 124
inserting 122
common table columns 26, 27
completed content model 46
Configuration panel 38, 82, 120
Configuration tab 156
configuring standard adapters 203
Constraints tab 61
content hints 132, 132
as tool tip 125
content model
diagram 33, 33, 49
editor 49, 91
example 46, 89
specifying data type 36
Content model diagram 36
content model diagram 33, 93
modifying display 36
navigating 36
content model editor 49, 91
content panel 121, 121, 138
edit area 131
tag area 122
control pools
JDBC 184
MTS 186
Null 185
ODBC 185
XA 186
creating internal parameter entities 104
creating local repository instances 239
creating repository instances 239, 240
custom adapters 204
custom log sinks 148
customer support xx
customized view tag area 126
customizing documents 139
D
daemon attribute 175, 176, 178, 179
data type
creating 66
specifying in content model panel 36
data types panel 66
declaring attributes 51
defaulttimelimit attribute 177
defining external general entities 107
defining external unparsed entities 107
defining internal general entities 106
deleting items 150
deleting repository instances 243
directories 237, 247
Documentation xv
Documentation, Other TIBCO Product xv
Documentation, TIBCO Designer xv
document-building options 139
documents
customizing 139
modifying structure 124
navigating 125
populating 139
DTD 82
DTD example, examples
DTD 113
E
element list 84
element/type list 41
element/types list 41
elements
aliases 129
collapsing 128
expanding 128
hiding s 128
inserting 122
promoted 130, 130
elements panel list 84
elements/types list 40
Index 257
endpoints 205
overview 191
entry constraints 125
enumeration tab 62, 103
Properties pane 103
Errors panel 110, 135
example
building simple schema 70
defining and deriving complex and simple types 76
examples
building a content model 46, 88
creating a schema 18
creating a user-derived data type 67
creating or editing an attribute 51, 98
including declarations from another schema 57, 102
referencing an element from another namespace 55
exception parameters 217
exceptions folder 215
expanding elements 128
expanding markup view 135
exporting and importing repository instances 245
exporting instances 245
exporting repository instances 243, 245
exporting to XML 254
external general entity 106, 107
external parameter entities 105
external unparsed entity 107, 107
F
factory bar 123, 123
fields
type class 210
type scalar 211
type sequence 211
type union 211
file sink 171
folders
Advanced 188
Advisories 190
Log Sinks 189
G
general entities 106
general entity 105, 106, 106, 107
generic adapter configuration 145
getting started
instance resources 21
schema and DTD resources 17
XML tools palette 15
graphical view
schema 75, 117
H
hawk sink 173
hiding attributes 128
hiding elements 128
I
identifying data
entry constraints 125
importing an instance 246
importing namespace 55
importing repository instances 243, 245
importing XML files 254
Insert box 122, 123
inserting
attributes 122
elements 122
inserting comments 122, 124
inserting processing instructions 122
instance 119
instance editing environment 22
instance resources
getting started 21
internal general entities 106
internal general entity 106
internal parameter entities 91
internal parameter entity 104
introduction to XML 14
TIBCO Designer Palette Reference
258
| Index
item right-button menu 127
J
JDBC control pool 184
L
ledgerfile attribute 177
legacy adapters 204
Load URL 190
local instance 236
local repository instances 239
locating repositories 231
log sinks
custom 148
folder 189
overview 170
logging tab 156
M
markup format 134
markup view
collapsing 135
expanding 135
menu options 28
metadata 237
mixed content model 35
modifying attributes 249
modifying display of content model diagram 36
modifying document structure 124
monitoring tab 158
MTS control pool 186
multiplicity 222
N
namespace 55
Namespaces tab 63
navigating content model diagram 36
navigating the document 125
Navigator bar 125
network attribute 175, 176, 178, 179
network sink 172
new data type 66
new resource 15
Notations tab 64
Advanced pane 65
Notes panel 68, 110
null control pool 185
O
objects 237, 247
occurrence indicators 35, 45, 87
ODBC control pool 185
operation exceptions folder 215
operation parameter folder 214
operation parameters 214
operations 212, 212, 213
defining 214
exception parameters 217
parameters 214
optional and repeatable set of choices 35
Overview panel 53, 53, 100, 100
Overview tree 54, 101
overwriting traces 171
P
panels 24
Parameter entities tab 104
parameter folder 214
Index 259
parameters
type class 215
type scalar 216
type sequence 215
type union 216
populating documents 139
processing instructions 109
inserting 122
projects 230
promoted attributes 130, 130
promoted elements 130, 130
properties 149
Properties pane
enumeration tab 103
Properties panel 58, 102
Properties tab 58
publisher services 160
publishers
default time limit 177, 180
R
reading the content model diagram 33
referencing complex types in other schemas 81
referencing elements from another namespace 56
referencing parameter entities within a content mode 104
referencing reusable (internal) parameter entities 92
repositories 230
repository directories 247
repository directory 238
repository finder 231, 231
repository instance 237, 237
repository instances
cloning 242
creating 239, 240
exporting 243, 245, 245
importing 243, 245
locating 231
starting 244
stopping 244
repository management 247
repository object 238
S
scalar fields 211
scalar reference 220
scalars 217
scheduleractivation attribute 179
schedulerheartbeat attribute 178
schedulerweight attribute 178
schema 37
graphical view 75, 117
reviewing 75, 117
schema and DTD resources
getting started 17
TIBCO Designer Palette Reference
260
| Index
Schema menu 40, 83
schema and DTD resources 28
Schema properties panel 68, 110
schemas
and tibco designer 205
basics 203
example 206
folder 208
overview 203
selecting a hidden element to show 128
sequence 34
sequence fields 211
sequence indicators 45, 87
sequence reference 219
sequences 221
server service 167
server-based instance 236
servers 198
stopping 243
servers and instances 236
service attribute 175, 176, 178, 179
services
client 164
publisher 160
request-response 167
request-response invocation 164
server 167
subscriber 162
sessions 145
sessions folder 189
setting a schema 120
Show as markup 134
Show as Rows 134
siblings displayed on navigator bar 126
simple control pool 186
sinks
file sink 171
hawk sink 173
Source panel 69, 112, 136
Source view 76, 117
specifying additional repository information 241
specifying an alias 129
specifying data type in content model panel 36
specifying values for existing properties 150
standard adapter endpoints 205
TIBCO Designer Palette Reference
T
tag area
customized view 126
tags
adding color 129
technical support xx
terminology 149, 249
TIBCO Rendezvous 237
TIBCO_HOME xvii
timer 199
timers folder 189
toolbar 40, 83, 120
toolbar buttons 27
traces
maximum file size 171
number of rollover files 171
overwrite vs. append 171
transaction controls 184
transaction controls folder 189
type right-button menu 127
U
unacknowledged messages 177
understanding file count and file limit 171
union fields 211
union members 219, 219, 219, 220
union reference 219
unions 218, 218
Index 261
V
viewing attributes 249
X
XA control pool 186
XML
introduction 14
XML file 254, 254
XML instance editing environment 119
XML instance exercise 137
XML menu 120
XML menu (instance resources) 30
XML resource 15
XML schema exercises 70
XML tools palette
getting started 15
XML tools palette resources
common table columns 27