TIBCO Business Studio™ Customization

Software Release 2.0 July 2007

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 TIBCO BUSINESS STUDIO INSTALLATION GUIDE) 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. TIB, TIBCO, TIBCO Software, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO Business Studio and TIBCO iProcess are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries. EJB, Java EE, J2EE, JMS 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. PLEASE SEE THE README.TXT FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM. THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME. THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES. Copyright © 2004-2007 TIBCO Software Inc. ALL RIGHTS RESERVED. TIBCO Software Inc. Confidential Information

Contents i

|

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
How to Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv Target Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi TIBCO Business Studio Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii How to Contact TIBCO Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

Chapter 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Implementing Business Process Integration (Import) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Exporting from TIBCO Business Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Chapter 2 Understanding the File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
XPDL 2.0 Schema Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Execution Details of a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Creating a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Setting the Destination Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Visual Characteristics of a Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 NodeGraphicsInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 ConnectorGraphicsInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 References Between Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Schema Extensions for Service Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Simulation Schema Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Activity Parameters (ActivitySimulationData) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Participant Parameters (ParticipantSimulationData). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sequence Flow Splits (SplitSimulationData) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation Start Parameters (StartSimulationData) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sequence Flow Parameters (TransitionSimulationData) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter Distribution (WorkflowProcessSimulationData). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 20 20 25 27 27 28 30

Chapter 3 Writing an Import/Export Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Creating a New Import/Export Wizard Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
TIBCO Business Studio Customization

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a WebDAV Server Type Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Deployment to a WebDAV Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define States for Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ii | Contents Chapter 4 Deployment Framework . . . Define the Management Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 39 39 40 41 41 42 43 45 45 46 48 51 53 55 57 58 TIBCO Business Studio Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Providing Server Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define the Deployment Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Operations for ServerElements . . . . . . . . . . . . . . Creating the Server Type Connection Implementation . . . . . . . . . . . . . . . . . . . . . . . . Connecting to WebDAV server . . . . . . . . . . . . . . Define the Possible Server Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deploying Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Implementing Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tutorial . . . . . . . . . . . . . . . . . . . . . . . Configuring the Repository . Defining the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

This guide describes the areas of TIBCO Business Studio that can be customized or extended.| iii Preface TIBCO Business Studio™ is used to model. simulate and implement business processes. page viii TIBCO Business Studio Customization . Topics • • How to Use This Guide. page iv How to Contact TIBCO Support.

It also includes a tutorial on deploying to a Web-based Distributed Authoring and Versioning (WebDAV) server.describes how XPDL2 is used by TIBCO Business Studio. • TIBCO Business Studio Customization . Overview .describes how to write a wizard to either import a custom file format into TIBCO Business Studio or export a TIBCO Business Studio Process to a custom format. Chapter 3.iv | How to Use This Guide How to Use This Guide This guide contains the following chapters: • • • Chapter 1. Writing an Import/Export Wizard .describes how to use the Deployment Framework to remotely deploy your own artifact (Module) on a remote server using TIBCO Business Studio. Chapter 2. Understanding the File Format . as well as the extensions provided. Chapter 4. Deployment Framework .describes how to use this guide to achieve your specific goal.

Preface v | Target Audience This guide is aimed at systems integrators and developers who want to integrate TIBCO Business Studio with other applications upstream in the product lifecycle. This guide assumes that you are familiar with the schema of the application whose procedures you want to import into TIBCO Business Studio as well as with Extensible Stylesheet Language Transformations (XSLT). TIBCO Business Studio Customization . extend the Validation Framework. Java programming and Eclipse experience is required if you want to contribute features to TIBCO Business Studio. or use the Deployment Framework.

vi | Related Documentation Related Documentation This section lists documentation resources you may find useful. TIBCO Business Studio Simulation User’s Guide: Read this manual to learn how to use the simulation features of TIBCO Business Studio. TIBCO Business Studio Installation Guide: Read this manual for instructions on site preparation and installation. • • TIBCO Business Studio Customization . TIBCO Business Studio Process Developer’s Guide: Read this manual to learn how to elaborate a Process with execution details and deploy it to a runtime platform. This document also contains lists of known issues and closed issues for this release. TIBCO Business Studio Release Notes: Read the release notes for a list of new and changed features. TIBCO Business Studio Documentation The following documents form the TIBCO Business Studio documentation set: The TIBCO Business Studio documentation set consists of: • • • TIBCO Business Studio Modeling User’s Guide: Read this manual to learn how to model business processes.

To introduce new terms For example: A portal page may contain several portlets. if no parameter is specified. filenames. For example: Esc. To indicate a variable in a command or code syntax that you must replace. for example. The warning icon indicates the potential for a damaging situation. bold code font Bold code font is used in the following ways: • • • In procedures. Ctrl+Q. Portlets are mini-applications that run in a portal. Table 1 General Typographical Conventions Convention code font Use Code font identifies commands. to indicate the parts of the sample that are of particular interest. In command syntax.Preface vii | Typographical Conventions The following typographical conventions are used in this manual. data loss or corruption if certain steps are taken or not taken. For example: Ctrl+C. For example: MyCommand pathname Key combinations Key name separated by a plus sign indicate keys pressed simultaneously. Key names separated by a comma and space indicate keys pressed one after the other. The tip icon indicates an idea that could be useful. to indicate the default parameter for a command. The note icon indicates information that is of special interest or importance. and output displayed in a command window. For example: See TIBCO BusinessWorks Concepts. TIBCO Business Studio Customization . for example. for example. code examples. In large code samples. to indicate what a user types. pathnames. For example: Type admin. an additional action required only in certain circumstances. For example: Use MyCommand to start the foo process. MyCommand is enabled: MyCommand [enable | disable] italic font Italic font is used in the following ways: • • • To indicate a document title. a way to apply the information provided in the current section to achieve a specific result. For example.

education. visit http://www.com/services/support/ • If you already have a valid maintenance or support contract. visit this site: http://www. you can request one.com Entry to this site requires a username and password. If you have purchased another TIBCO product that includes support for TIBCO Business Studio and have comments or problems with this manual or the software it addresses. TIBCO Business Studio Customization .tibco. • For an overview of TIBCO Support.html.tibco. and information about getting started with TIBCO Support. For self-service support.viii | How to Contact TIBCO Support How to Contact TIBCO Support The community edition of TIBCO Business Studio is unsupported. and access to the TIBCO Developer Network. If you do not have a username.tibco.com/devnet/index. visit this site: http://support. please contact TIBCO Support as follows.

page 2 Exporting from TIBCO Business Studio. page 3 TIBCO Business Studio Customization .|1 Chapter 1 Overview This chapter describes how to use the information in the rest of this guide. Topics • • Implementing Business Process Integration (Import).

Study the selected BPA tool. Register the XSLT as a plug-in that may be distributed to all users (by copying to the plugins directory) or installed directly.tibco. you must do the following: 1. 6. 2. particularly the XML export facility. Referring to Understanding the File Format. Construct a mapping table (for example. 3. 4. This archive contains a file called ARISXML_2_XPDL2. Identify the significant elements in the BPA tool’s XML format. For an example of a mapping XSLT. To import a process from an established BPA tool into TIBCO Business Studio.xslt that contains the mappings that TIBCO Business Studio uses for the import of Aris models. a spreadsheet) between the interesting elements. To leverage the investment in the current Business Process Analysis (BPA) tool by importing existing processes into TIBCO Business Studio and getting the Processes into an executable form.aris_x.xpd. Using WinZip. 5. See Writing an Import/Export Wizard on page 31. open the file com.2 | Chapter 1 Overview Implementing Business Process Integration (Import) Scenario Goal TIBCO Business Studio is not yet the primary corporate modeling tool. Implement the mapping in XSLT. This will be the basis of the XSLT that will transform elements from the BPA XML output into XPDL that can be imported into TIBCO Business Studio. familiarize yourself with the XPDL format and the TIBCO extensions. navigate to eclipse\plugins sub-directory of your Eclipse installation.z. Approach TIBCO Business Studio Customization .y.

To export Process information from TIBCO Business Studio to another application: 1. the desired output is a default form with a field for each Parameter of the User Activity. (Optional) Document any restrictions on creating the output (such as the JSP form generator supporting only simple data field types). Goal Approach TIBCO Business Studio Customization . create a JSP web page for each User Activity). a spreadsheet) between the significant TIBCO Business Studio XPDL elements and their target objects (be they XML objects or widgets in a GUI toolkit). 2. Referring to Understanding the File Format on page 5. Transform part or all of the process into supporting artifacts in the final solution (for example. For example. portal pages and document management systems). Construct a mapping table (for example. JSP forms.Exporting from TIBCO Business Studio 3 | Exporting from TIBCO Business Studio Scenario Application developer or systems integrator wants to take output from TIBCO Business Studio and embed it within a custom BPM solution (for example. familiarize yourself with the XPDL format and the TIBCO extensions. Study the required output. 5. suppose that for each User Activity in the Process. Implement the mapping in XSLT. 4. in the case of JSP forms. 3.

4 | Chapter 1 Overview TIBCO Business Studio Customization .

page 19 Simulation Schema Overview.XPDL extensions to support the simulation of Processes To import a file. page 6 Execution Details of a Package. • Various extension schemas. each describing meta-data for one or more sub-types of service task. Topics • • • • • XPDL 2. only the correct XPDL and Extensions semantics are required.process-related XPDL extensions Simulation schema .0 Schema Overview. simulation is optional and default simulation parameters can be added by TIBCO Business Studio once the Process has been imported. This chapter describes the Extensions and Simulation schemas used by TIBCO Business Studio. for direct deployment to the TIBCO iProcess Engine) Extensions schema .|5 Chapter 2 Understanding the File Format The TIBCO Business Studio Package file uses the following schemas: • • • • XPDL Version 2.0 XPDL Version 1. page 20 TIBCO Business Studio Customization .0 (Internally. page 11 Visual Characteristics of a Package. page 13 Schema Extensions for Service Tasks.

For more information. The following series of diagrams show the relationship between the BPMN elements in TIBCO Business Studio and their mapping to the XPDL schema. see: • • XPDL .wfmc.htm BPMN .org/ TIBCO Business Studio Customization .0 Schema Overview The XPDL Version 2.http://www.0 schema provides all the elements needed to execute a process as well as the visual elements necessary to view a process in TIBCO Business Studio.bpmn.org/standards/xpdl.6 | Chapter 2 Understanding the File Format XPDL 2.http://www.

Process. TIBCO Business Studio Customization . Activity and Transitions).0 Schema Overview 7 | Process Flow Objects This diagram shows the major Process Flow Objects (Package. excluding the visual objects such as Pools.XPDL 2. Lanes.

8 | Chapter 2 Understanding the File Format Artifacts XPDL Artifacts belong to the Package and are referred to in a Process by Lanes and Pools. This diagram shows the relationship of Artifacts to other objects: TIBCO Business Studio Customization .

XPDL 2.0 Schema Overview 9 | Associations This diagram shows how optional Associations are made between non-flow objects (such as a Text Annotation) and flow objects or flows: Message Flow Message Flow can connect objects in different Pools or objects in one Pool with the boundary of another Pool. The following diagram shows Message Flow: TIBCO Business Studio Customization .

TIBCO Business Studio Customization . The relationship of a Participant to a Pool is denoted in BPMN.10 | Chapter 2 Understanding the File Format Data Fields. Formal Parameters. Formal Parameters can only be created at the Process level and Type Declarations can only be created at the Package level. Formal Parameters. but neither required nor enforced by TIBCO Business Studio. and Package. The following diagram shows the relationship of Data Fields. Process. and Type Declarations to Pools. Participants. Participants. and Type Declarations Data Fields and Participants can be scoped in that they can be created at the Process level or at the Package level (if you want to share them amongst Processes).

com</email:To> <email:Subject>RE: minutes of our meeting</email:Subject> </email:Definition> <email:SMTP email:Configuration="Server"/> </email:Email> </xpdl2:TaskService> </xpdl2:Task> TIBCO Business Studio Customization . Creating a Package The root XPDL element is Package and the following namespaces are used: The semantics for the Package.Execution Details of a Package 11 | Execution Details of a Package This section describes the parts of the XPDL Package file that must be present if you want to execute a TIBCO Business Studio XPDL package/process in iProcess Engine. It does not cover visual aspects of a Process (see Visual Characteristics of a Package on page 13). A Package Header in TIBCO Business Studio is defined by XPDL as follows: TIBCO Business Studio contributes the following elements to the Package only: These are elements called ExtendedAttribute that are in the base namespace and should not be confused with extended namespaces such as the following: <xpdl2:Task> <xpdl2:TaskService xpdExt:ImplementationType="E-Mail" xpdl2:Implementation="Other"> <xpdl2:MessageIn Id="_V_wdICrAEdy4JvZXy-dYnw"/> <xpdl2:MessageOut Id="_V_wdISrAEdy4JvZXy-dYnw"/> <email:Email> <email:Definition> <email:From email:Configuration="Server"/> <email:To>manager@foo. Process and Redefineable Headers allow the least restrictive interpretation of the XPDL schema possible.

You can specify multiple destination environments. but there is no checking or validation. The example indicates that the Process was created in TIBCO Business Studio. what simulation parameters are associated with the Process. simulation1. CreatedBy FormatVersion <xpdl2:ExtendedAttribute Name="FormatVersion" Value="3"/> Setting the Destination Environment Setting the destination environment on a Process controls the validation that is performed on that Process and also. If this value is missing. Specifies that the Process is validated for direct deployment to the TIBCO iProcess Engine. Specifies that the Process is validated for simulation. in the case of simulation.x Description Specifies that the Process is validated for export to the TIBCO iProcess Modeler. This process may not be successful.2"/> Value ipm10.12 | Chapter 2 Attribute Understanding the File Format Example <xpdl2:ExtendedAttribute Name="CreatedBy" Value="TIBCO Business Studio"/> Notes You can provide any value. Mandatory. This must be set to 3. The following example shows the XPDL for a Process intended for simulation: <xpdl2:ExtendedAttribute Name="Destination" Value="simulation1.x ipe10.2 TIBCO Business Studio Customization . the TIBCO Business Studio will attempt to validate/add required visual extensions to the XPDL.

The following table describes the standard Attributes/Elements of NodeGraphicsInfo. Width • TIBCO Business Studio Customization . Green. except for connecting lines (see ConnectorGraphicsInfo on page 15). if not present. see Special Purpose NodeGraphicsInfo Elements on page 15. String containing three comma-separated numeric values representing Red. and so on) about visual objects. text is wrapped at the specified width. This would be important for example. 0. Blue values for the color (each between 0 and 255). NodeGraphicsInfo This XPDL2 element stores graphical information (for example. For more information.0. 255.0 (bright red). width is set automatically. BorderColor.Visual Characteristics of a Package 13 | Visual Characteristics of a Package This section describes how the visual characteristics of a Package/Process are created. color. • • Width is never specified for a Lane (this is calculated automatically from its content). Attribute/Element ToolId Description For all standard NodeGraphicsInfo elements this is XPD. If width is present for diagram note. For special purpose NodeGraphicsInfo elements. For example.0 (black). if you have your own XPDL that you want to import and display in TIBCO Business Studio. ToolId is extended for different purposes (for example.0.BorderEventPosition). Height and width of the object in pixels. XPD. and so on. Width and Height are never specified for a Pool (these are calculated automatically from its content). size. Height is always calculated automatically for diagram notes. FillColor Height.

Artifacts in a Lane – The parent LaneId. these coordinates define the center of the the left hand edge. TIBCO Business Studio specifies the LaneId value as follows • • • • Activities in a Lane . Notes: • • Intermediate Events that are attached to a Task boundary should be specified as 0. TIBCO Business Studio Customization . Therefore.0.14 | Chapter 2 Understanding the File Format Attribute/Element Coordinates Description XCoordinate and YCoordinate specify the pixel location of the center of the object. LaneId XPDL is not specific about the requirements for various BPMN concepts. Artifacts in an Embedded Sub-Process The activity set Id for the Embedded Sub-Process. LaneId is dependent on object type.The parent LaneId. Activities in an Embedded Sub-Process LaneId not set. IsVisible For Lanes only: • • false – Lane is closed true – Lane is open (default if not present). For Text Annotations (Diagram Notes).

Attribute/Element ToolId Description For all standard ConnectorGraphicsInfo elements this is XPD.0 (black). Specifies the connection line color as a string containing three comma-separated numeric values representing Red. These are distinguished from the standard NodeGraphicsInfo elements by their extended ToolId value. the following special purpose NodeGraphicsInfo element is used when extra graphical information does not fit into the single standard NodeGraphicsInfo element for an object. Green.BorderEventPosition Description An Intermediate Event on a Task boundary is specified as a percentage of distance around the parent task’s boundary line (going clockwise from top right corner).0 (bright red). XPD. This distance is specified in the Coordinates/XCoordinate attribute as a floating point number. see Special Purpose ConnectorGraphicsInfo Elements on page 16. The following table describes the standard Attributes/Elements of ConnectorGraphicsInfo. and so on. 255. For example. Blue values for the color (each between 0 and 255).LabelAnchorPosition). Border Color TIBCO Business Studio Customization . 0. MessageFlow and Association. ConnectorGraphicsInfo This XPDL2 element stores graphical information about connection lines such as Transition (Sequence Flows). For more information.0. ToolId is extended to for different purposes (for example. ToolId XPD. For special purpose ConnectorGraphicsInfo elements.0.Visual Characteristics of a Package 15 | Special Purpose NodeGraphicsInfo Elements In addition to the standard NodeGraphicsInfo elements listed in the previous table.

The percentage distance around the object’s boundary. Other Objects . These are distinguished from the standard ConnectorGraphicsInfo elements by their extended ToolId value. the following special purpose ConnectorGraphicsInfo elements are used for extra graphical information that does not fit into the single standard ConnectorGraphicsInfo element for an object. in pixels. ToolId XPD. Connection (Associations only) . The actual position is stored in the Coordinate/XCoordinate attribute. • TIBCO Business Studio Customization . — Gateway – Top (middle). starting from point dependent on the object type: — Task – Top right corner.StartAnchorPosition Description Specifies a fixed position on a source object’s boundary for the connection line to start. — Data Object – Bottom left corner.The offset.EndAnchorPosition Specifies a fixed position on target object’s boundary for the connection line to end. The value of this depends on the source object type: • • Pool (Message Flows only) . from the left hand edge of the Pool. The value of this is as for the XPD. — Diagram Note – Top left corner. The actual position is stored in the Coordinate/XCoordinate attribute.StartAnchorPosition detailed above. This is always clockwise.The percentage of total length distance from start of the connection line. XPD. — Event – Right hand side (middle).16 | Chapter 2 Understanding the File Format Special Purpose ConnectorGraphicsInfo Elements In addition to the standard ConnectorGraphicsInfo elements listed in the previous table.

TIBCO Business Studio Customization . The second Coordinate specifies a horizontal and vertical offset from the anchor position (in the XCoordinate and YCoordinate attributes).LabelAnchorPosition Description Specifies the anchor position for a connection’s label in relation to the connection line itself as two Coordinate elements. • XPD. YCoordinate=Height. If text wrapped at the given width is too large for the height.LabelSize XCoordinate=Width. • The first Coordinate specifies the anchor point of the label as a percentage distance along connection line (from start of connection) in the XCoordinate attribute.Visual Characteristics of a Package 17 | ToolId XPD. the height is automatically adjusted on screen.

and the Process reference is WorkflowProcess Id of the target event’s parent Process. Inter-Process references (for example from Sub-Process Call Tasks) use the Process Id. Activity Performers (Task Participants) Data Fields / Formal Parameters Type Declarations Processes Activity performers are references to the Ids of Participants. Performer type Data Fields. References to a Process in another Package use the XPDL filename of the Package (without the . All references to Data Fields and Formal Parameters (except from Activity Performers). TIBCO Business Studio Customization .18 | Chapter 2 Understanding the File Format References Between Elements This section describes the values that TIBCO Business Studio specifies for various standard XPDL2 cross references between elements.xpdl extension). The target Link Event specifies its own TriggerResultLink/LinkId attribute as 0. use the name of the Field or Parameter. process is always -unknown-. References are from Data Field / Formal Parameter by the Type Declaration’s Id. or Performer type Formal Parameters. Element Reference Task Intermediate Link Event Cross Reference Value A reference task references the target task using the target task’s Activity/Id attribute. The source of the Link Event pair specifies the Activity/Id attribute of the target event.

check the security settings of your browser. You can view HTML documentation of the extension schemas and the actual XSD files for the Service Task types by clicking the following links: If the following documents do not open. • • • • • • Database HTML Database XSD Email HTML Email XSD Java HTML Java XSD All other types of Service Task (for example.0 schema.Schema Extensions for Service Tasks 19 | Schema Extensions for Service Tasks TIBCO Business Studio uses the standard XPDL 2. a web services Service Task) conform to the base XPDL 2.0 schema with extensions for the following types of Service Tasks. TIBCO Business Studio Customization .

use the simulation schema extensions as described in this section. If you want to over-ride any default simulation parameters. For example: <xpdl:Implementation> <xpdl:No/> </xpdl:Implementation> Activity Parameters (ActivitySimulationData) This section describes the extensions that allow you to specify simulation data for Activities: TIBCO Business Studio Customization . default simulation parameters are added for Simulation. You can view HTML documentation for the simulation schema extensions and also actual schema by clicking the following links: • • Simulation HTML Simulation XSD Implementation The Activity child Implementation and its child (No) must be present for simulation (there is no impact on modelling).20 | Chapter 2 Understanding the File Format Simulation Schema Overview When you import a Process into TIBCO Business Studio and with Simulation as the Destination Environment.

0" StandardDeviation="2. <simulation:NormalRealDistribution Mean="5. you can specify the following types: Attribute ConstantReal Distribution UniformReal Distribution NormalReal Distribution Exponential RealDistribution Example <simulation:ConstantRealDistribution ConstantValue="5.0"/> <simulation:UniformRealDistribution LowerBorder="2.0" UpperBorder="5. Specify a decimal value for Mean.Simulation Schema Overview 21 | Specifying Duration Distributions The following allows you to specify either basic distribution types (where the Activity duration is defined by a mathematical distribution) or a Parameter-based distribution (where imported Parameters are used): For basic distributions.0"/> TIBCO Business Studio Customization . Specify decimal values for LowerBorder and UpperBorder.0"/> <simulation:ExponentialRealDistribution Mean="5. Specify a decimal value for the Mean and StandardDeviation.0"/> Notes Specify a decimal value for ConstantValue.

three different distributions are specified. MINUTE. For example: This section specifies the distribution for the default case This section specifies the distribution for new customers (ExistingCustomer= No) This section specifies the distribution for existing customers (ExistingCustomer= Yes) In this example. Example <simulation:TimeDisplayUnit>HOUR</simulation:TimeDisplayUnit> Valid values include YEAR. MONTH. Specifying the Time Unit The time unit specifies the time unit that is used for display purposes in the TIBCO Business Studio user interface. depending on whether the customer is new or existing. DAY.22 | Chapter 2 Understanding the File Format Parameter-based distributions allow you to specify a distribution for each parameter. They are then displayed in the user interface in the unit you specify for TimeDisplayUnit. All values for time units (with the exception of SLA information) are stored in the XPDL in minutes. HOUR. and SECOND. TIBCO Business Studio Customization . You must specify a default distribution to handle parameters with values other than the ones you explicitly specify. all other values are handled by the default.

Specifies the Activity to proceed with once the loop is finished. <simulation:LoopControl> <simulation:MaxLoopCountStrategy> <simulation:DecisionActivity>5</simulation:DecisionActivity> <simulation:ToActivity>8</simulation:ToActivity> <simulation:MaxLoopCount>5</simulation:MaxLoopCount> </simulation:MaxLoopCountStrategy> </simulation:LoopControl> Attribute DecisionActivity ToActivity MaxLoopCount Notes Specifies the Activity that will be used to decide whether to end the loop. TIBCO Business Studio Customization .Simulation Schema Overview 23 | Adding a Looping Control Strategy A looping control strategy provides the Simulation engine with the necessary mechanism to break out of loops: MaxLoopCountStrategy This strategy allows Sequence Flow to traverse a loop up to the specified maximum number of times. NormalDistributionStrategy This strategy allows Sequence Flow to traverse a loop based on a normal distribution of times (which you specify by providing the mean and standard deviation). Specifies the maximum number of times that the loop should be followed.

Specifies the mean used to construct the normal distribution. Specifies the standard deviation used to construct the normal distribution. Specifies the Activity to proceed with once the loop is finished.0</simulation:Mean> <simulation:StandardDeviation>0. <simulation:LoopControl> <simulation:MaxElapseTimeStrategy> <simulation:DecisionActivity>5</simulation:DecisionActivity> <simulation:ToActivity>8</simulation:ToActivity> <simulation:DisplayTimeUnit>MINUTE</simulation:DisplayTimeUnit> <simulation:MaxElapseTime>10. TIBCO Business Studio Customization .5</simulation:Standard Deviation> </simulation:NormalDistributionStrategy> </simulation:LoopControl> Attribute DecisionActivity ToActivity Mean StandardDeviation Notes Specifies the Activity that will be used to decide whether to end the loop. MaxElapseTimeStrategy This strategy allows Sequence Flow to traverse a loop for an elapsed period of time. Specifies the Activity to proceed with once the loop is finished.0</simulation:MaxElapseTime> </simulation:MaxElapseTimeStrategy> </simulation:LoopControl> Attribute DecisionActivity ToActivity Notes Specifies the Activity that will be used to decide whether to end the loop.24 | Chapter 2 Understanding the File Format <simulation:LoopControl> <simulation:NormalDistributionStrategy> <simulation:DecisionActivity>5</simulation:DecisionActivity> <simulation:ToActivity>8</simulation:ToActivity> <simulation:Mean>2.

and SECOND.0"> The unit used for SlaMaximumDelay is specified using TimeDisplayUnit (see Specifying the Time Unit on page 22). MaxElapseTime Adding SLA Information This specifies the maximum amount of delay permissible on the Activity: <xpdl:ExtendedAttribute Name="ActivitySimulationData"><simulation:ActivitySimulationData SlaMaximumDelay="3. MINUTE. DAY. HOUR. MONTH. cost. Valid values include YEAR.Simulation Schema Overview 25 | Attribute DisplayTimeUnit Notes Specifies the unit in which the elapsed time is measured. TIBCO Business Studio Customization . Participant Parameters (ParticipantSimulationData) This allows you to specify the information about the Participant that is necessary for simulation (instances. Specifies the elapsed time in which you want the loop to finish. SLA information and so on).

0" SlaMaximumUtilisation="85.8333333333333334 </simulation:Cost> <simulation:TimeDisplayUnit>HOUR </simulation:TimeDisplayUnit> </simulation:TimeUnitCost> <xpdl:ExtendedAttribute Name="ParticipantSimulationData"> <simulation:ParticipantSimulationData SlaMinimumUtilisation="65.0"> <simulation:Instances>3</simulation:Instances> <simulation:TimeUnitCost> <simulation:Cost>0. Specifies the cost and time unit used for the Participant in simulation. SlaMinimumUtilisation SlaMaximumUtilisation see SlaMinimumUtilisation example TIBCO Business Studio Customization .0"> Notes Specifies the number of Participants. This is displayed visually when the Process is simulated.125</simulation:Cost> <simulation:TimeDisplayUnit>HOUR </simulation:TimeDisplayUnit> </simulation:TimeUnitCost> </simulation:ParticipantSimulationData> </xpdl:ExtendedAttribute> </xpdl:ExtendedAttributes> </xpdl:Participant> Attribute Instances TimeUnitCost Example <simulation:Instances>1 </simulation:Instances> <simulation:TimeUnitCost> <simulation:Cost>0. Specifies the minimum utilization percent for the Participant.26 | Chapter 2 Understanding the File Format <xpdl:Participants> <xpdl:Participant Id="1" Name="Call Center Operator"> <xpdl:ParticipantType Type="ROLE"/> <xpdl:ExtendedAttributes> <xpdl:ExtendedAttribute Name="ParticipantSimulationData"> <simulation:ParticipantSimulationData SlaMaximumUtilisation="95. Specifies the maximum utilization percent for the Participant. This is displayed visually when the Process is simulated.

0"/> </simulation:Duration> TIBCO Business Studio Customization . These are found on the Properties view of the Start Event: <xpdl:ExtendedAttribute Name="StartSimulationData"> <simulation:StartSimulationData NumberOfCases="100"> <simulation:Duration> <simulation:ConstantRealDistribution ConstantValue="5.Simulation Schema Overview 27 | Sequence Flow Splits (SplitSimulationData) This specifies the Parameter that is used to distribute Sequence Flow through a split. For example: SplitSimulationData specifies the Parameter associated with the Gateway (in this case isPaperworkCorrect): <xpdl:ExtendedAttribute Name="SplitSimulationData"><simulation:SplitSimulationData> <simulation:ParameterDeterminedSplit>true </simulation:ParameterDeterminedSplit> <simulation:SplitParameter ParameterId="isPaperworkCorrect"/> </simulation:SplitSimulationData></xpdl:ExtendedAttribute> Simulation Start Parameters (StartSimulationData) This provides the start parameters needed for simulation such as the distribution and number of cases.

0" StandardDeviation="2. UniformRealDistribution (Specify decimal values for LowerBorder and UpperBorder).28 | Chapter 2 Understanding the File Format <simulation:DisplayTimeUnit>MINUTE </simulation:DisplayTimeUnit> </simulation:StartSimulationData></xpdl:ExtendedAttribute> Attribute NumberOfCases Duration Example <simulation:StartSimulationData NumberOfCases="100"> <simulation:Duration> <simulation:BasicDistribution> <simulation:NormalRealDistributi on Mean="5. this is specified as a Rule: In this case. In TIBCO Business Studio. ExponentialRealDistribution (Specify a decimal value for the Mean).0"/> </simulation:BasicDistribution> </simulation:Duration> Notes Specifies the number of Cases for simulation. • • • Sequence Flow Parameters (TransitionSimulationData) This allows you to specify an expression that is evaluated to determine whether a Sequence Flow is traversed. NormalRealDistribution (Specify a decimal value for the Mean and StandardDeviation). Specifies the distribution for case starts as one of the following: • ConstantRealDistribution (Specify a decimal value for ConstantValue). the sequence flow highlighted will only be traversed if the parameter isPaperworkCorrect is equal to Wrong receipts. This is specified as follows: TIBCO Business Studio Customization .

Specifies the condition that is evaluated to allow the Sequence Flow to be traversed. =. The condition is made up of: • • • ParameterId Operator (>. >=. < =) ParameterValue StructuredCondition <simulation:StructuredCondition> <simulation:ParameterId>isPaperwork Correct </simulation:ParameterId> <simulation:Operator>=</simulation: Operator> <simulation:ParameterValue>Wrong receipts </simulation:ParameterValue> </simulation:StructuredCondition> TIBCO Business Studio Customization . Attribute ParameterDetermined Condition Example <simulation:ParameterDeterminedCondit ion>true </simulation:ParameterDeterminedCondi tion> Notes Specifies whether a parameter will be evaluated to determine flow through the Sequence Flow. <.Simulation Schema Overview 29 | <xpdl:ExtendedAttributeName="TransitionSimulationData"> <simulation:TransitionSimulationData> <simulation:ParameterDeterminedCondition>true </simulation:ParameterDeterminedCondition> <simulation:StructuredCondition> <simulation:ParameterId>isPaperworkCorrect </simulation:ParameterId> <simulation:Operator>=</simulation:Operator> <simulation:ParameterValue>Wrong receipts </simulation:ParameterValue> </simulation:StructuredCondition> </simulation:TransitionSimulationData></xpdl:ExtendedAttribute> This specifies that the Sequence Flow will only be traversed when the parameter isPaperworkCorrect has the value Wrong receipts.

<xpdl:ExtendedAttributeName="WorkflowProcessSimulationData"> <simulation:WorkflowProcessSimulationData> <simulation:ParameterDistributionParameterId= "ExistingCustomer"> <simulation:EnumerationValue Value="Yes" WeightingFactor="10. EnumerationValue <simulation:EnumerationValue Value="Yes" WeightingFactor="10.0"/> WeightingFactor See EnumerationValue example.30 | Chapter 2 Understanding the File Format Parameter Distribution (WorkflowProcessSimulationData) Allows you to define simulation parameters and distributions.0"/> </simulation:ParameterDistribution> </simulation:WorkflowProcessSimulationData> </xpdl:ExtendedAttribute> Attribute ParameterDistributionId Example <simulation:ParameterDistributionPara meterId="ExistingCustomer"> Notes Specifies the parameter that will be evaluated to determine flow through the split. Specifies the weighting given to each transition in the split. if each transition has the same weighting (10 in the previous example). Simulation parameters are used in splits and in parameter-based distributions for Activities.0"/> <simulation:EnumerationValue Value="No" WeightingFactor="10. the split will be 50:50. TIBCO Business Studio Customization . Specifies the possible values for the parameter. For example.

Topics • • Overview.| 31 Chapter 3 Writing an Import/Export Wizard This chapter describes how to create either an import wizard for a file format that you want to import into TIBCO Business Studio or an export wizard for exporting a TIBCO Business Studio package into another file format. page 32 Creating a New Import/Export Wizard Plug-in. page 33 TIBCO Business Studio Customization .

Using these. TIBCO Business Studio Customization . This chapter describes import and export wizards for mappings implemented in XSLT. you need to create a wizard that will allow users to perform the export or import. The New Import Wizard Plug-in and New Export Wizard Plug-in dialogs allow you to do this.32 | Chapter 3 Writing an Import/Export Wizard Overview Once you have written the XSLT that will be used either to import your files into TIBCO Business Studio or to export from TIBCO Business Studio into another format. You can however use the Eclipse extension points and implement mappings in Java although this is beyond the scope of this document. you can create a plug-in for your product with all the required JAR files for exporting from and importing to TIBCO Business Studio.

The Plug-in Information dialog is displayed. For example.Version information for your plug-in. which is used if you select the Use default plug-in name check box.Creating a New Import/Export Wizard Plug-in 33 | Creating a New Import/Export Wizard Plug-in To create a new export or import wizard plug-in. In the Select a wizard dialog.ID which uniquely identifies your plug-in. 1. This becomes part of the name of the JAR file when your plug-in is created. if you enter an ID of MyImport. you should increment the version number to ensure the latest version is loaded by Eclipse.identifier where x.this is created from the ID that you enter with the Name appended. — Plug-in Version .z. — Wizard Type . — Plug-in Name .Select either Import or Export as appropriate. expand Other and select New Import/Export Plug-in Generator Wizard. Click Next.y. The Import Wizard Information or Export Wizard Information dialog is displayed. Select New > Other. Eclipse version numbers are specified in the form x. y and z are integers and identifier is a string (for example. The default name is Plug-in. the name becomes MyImport Plug-in by default. if you revised the XSLT). I20060831). — Plug-in Provider . 3.Provider information for your plug-in. depending on the type of wizard you are creating. When creating new plug-ins (for example. TIBCO Business Studio Customization . do the following. Click Next. Enter the following information: — Plug-in ID . 2.

— XSLT . — Output File Extension . Enter the following information: — Wizard Title . Any schemas that you specify are validated. — Wizard Description . use a comma-separated list (for example. or Business Process Management). XPDL. The Plug-in Destination dialog is displayed. When specifying more than one.this is used in the wizard to only display files whose extension match the filter.(optional) Browse to select an icon that will be displayed in the export/import listing. which you must do to use your newly-created export import wizard. For example.Browse to specify the location of the XSLT that will be used for export/import. TIBCO Business Studio Customization . — Schema (XSD or DTD) (optional) . Click Next.xsd files.34 | Chapter 3 Writing an Import/Export Wizard 4.Select the Category under which your wizard will be listed in the Import or Export listing (for example.This is the title that you want displayed in your Import/Export wizard and in the Import or Export listing. — Category (optional) . If you choose the Install Plug-in option. General. 6.doc. — Select the special folders from which the resources to be exported can be selected. You can also specify file extensions to limit the formats that can be exported or imported. you are prompted to re-start Eclipse. only files with this extension are available for import/export. XML). Depending on whether you are creating an import or export wizard: — Select the special folders which can contain the imported resources. Select how you want the Plug-in created: — Install Plug-in . Team. if you specify .Text description of what your wizard does. 5.the Plug-in JAR files are created and installed as a plug-in in your Eclipse environment using the Plug-in information that you specified previously.dtd or . You can select either . The Import/Export Wizard File Selection Filter dialog is displayed. Click Next.Browse to locate the schema for the product you are importing. — Icon .

Use this option if you want to distribute the plug-in to other users. Re-start Eclipse (if prompted) and ensure your wizard is displayed in the list (choose either File > Import or File > Export as appropriate). TIBCO Business Studio Customization .Creating a New Import/Export Wizard Plug-in 35 | — Folder . If the plugins/features directory does not exist. The Plug-in is installed into the folder that you specify under the plugins/features sub-directory. 7. Click Finish. it gets created automatically.

36 | Chapter 3 Writing an Import/Export Wizard TIBCO Business Studio Customization .

Topics • • • Overview. page 45 TIBCO Business Studio Customization .| 37 Chapter 4 Deployment Framework This chapter describes how to deploy your own artifact (Module) on a local or remote server. page 39 Tutorial . page 38 Implementing Deployment.Deployment to a WebDAV Server.

The user creates a Server within TIBCO Business Studio that contains all the necessary connection parameters and details. interrogates server objects and performs operations on them. The typical way deployment is used is as follows: 1. 2. Using the repository allows the separation of deployment into two distinct phases: • • Providing the Module to the Server (for example. you can connect and disconnect from the Server. by sending them to a location known to the server). The user connects to the running Server. you can manage Modules and other objects on the Server by interrogating their states and performing operations on them. Deployment Repository The deployment framework also supports the concept of a deployment repository. The user disconnects from the Server.the Module is only deployed (or redeployed) when the user explicitly chooses to do so. deploys Modules. TIBCO Business Studio Customization . Actual deployment Deployment repositories only handle the first phase of deployment (providing the Module). 3. Modules that are going to be deployed are placed in the repository where the Server can obtain instances of the Modules to deploy. The deployment framework assumes that the physical machine referred to by the Server is running. However. you cannot start and stop the Server from within TIBCO Business Studio. Modules are stored in the Eclipse workspace. Deployment Policy The deployment framework also handles the deployment policy.38 | Chapter 4 Deployment Framework Overview The deployment framework allows you to deploy a resource (represented in TIBCO Business Studio as a Module) on a local or remote system (represented in TIBCO Business Studio as a Server). but it must be located using a Uniform Resource Locator (URL). Once connected. The Module can be a resource or set of resources. which means that they can have the following deployment policies: • Deploy on request .

TIBCO Business Studio provides extension points (some of which are optional) that you can implement to do the following: • • • • define the server specify the method of connection to the server define how the server elements will be retrieved from servers detail the operations and states that are possible from each operation. you can use the TIBCO Business Studio user interface to perform operations on the deployed Modules. You must define these operations. Implementing Deployment This section describes the steps that you must follow to implement deployment. Define the Management Operations When a Module is deployed on the server. Define the Module The artifacts that you want to deploy are managed as Modules in TIBCO Business Studio. TIBCO Business Studio Customization . The deployment framework provides the following: • • • definition of the server type abstract connection server element structure.the Module is deployed (or redeployed) whenever the Package is saved.Implementing Deployment 39 | • Deploy on save . You also need to define how the Modules are created.

TIBCO Business Studio Customization . Server getServer().tibco. the isConnected() method should return true.core. you can close the connection by invoking the disconnect() method.xpd.xpd.extension. In your extension.runtimeTypes and by providing values for the necessary runtime parameters. Operation operation). void disconnect().40 | Chapter 4 Deployment Framework Defining the Server The com. The available configuration parameters are defined in the serverTypes extension point.tibco. The connection to the server is represented by a class that implements the com.core. This is implemented using the extension point com. When the connection with the server is established and valid. } Connecting to a Server Connection holds a reference to a server which you can obtain using the getServer() method.Connection interface.deploy.xpd. createConnection. Object deployModule(String url). you must provide a reference to a class that implements com. The Connect method is responsible for connecting to a Server. which is initialized when the server is created. The values for these parameters are provided by the user when creating an instance of the Server using the New Server Wizard. ConnectionFactory has one method.model. Object performServerElementOperation(ServerElement serverElement. All necessary parameters needed to obtain connection can usually be taken from the server configuration. this server type could use common configuration details.deploy.tibco. and optionally all necessary server configuration parameters.deploy. Defining a Runtime (Optional) A Runtime is configuration data that is shared amongst many server types. otherwise it returns false. if you use a client-side management system such as a JMX console to manage many servers. For example: public interface Connection extends IAdaptable { void connect(). boolean isConnected().model.ServerType extension point allows you to define the type of server on which you want to deploy.xpd.ConnectionFactory. that takes a Server object and should returns a connection specific to your server. For example.deploy.extension. void refreshServerContent().tibco. When the connection is no longer needed.

For more information see Implementing Operations for ServerElements on page 57. You must do the following: • • define the hierarchy and way of displaying the elements in the Project Explorer you must create the structure such that it conforms to the Composite Design Pattern. the method refreshServerContent retrieves the structure of objects on the server from which it builds the tree of server elements from the model. you must define the possible server elements and the method for obtaining them. an iProcess procedure can be Released. Unreleased. TIBCO Business Studio Customization . Define the Possible Server Elements Next. Define States for Elements You must define the possible states in which an element can be. you also define the setTo state (the state that logically follows the success of the operation). For example. The operation names and states that you choose will be displayed in the user interface. it should be reflected in the serverTypes extension by providing the associated RuntimeType sub element with the identifier of the runtime type extension. For each operation. Withdrawn. The method getPossibleOperations defines the legal progression of states. When the Framework needs to refresh. and so on.Implementing Deployment 41 | If a server type has an associated runtime. In this process you define the possible states for a given element type.

In this case. The parameter of the deployment operation is the inquiry URL of the Module. and it works well if the server is on the same machine as the client and the server can deploy Modules directly from the Eclipse workspace. The inquiry URL is an absolute or a relative URL of the Module in the Repository which is known and accessible from the server.42 | Chapter 4 Deployment Framework Configuring the Repository The Repository is where a server can obtain Modules which are going to be deployed.a path to the repository folder.The Module is published to the Repository and the inquiry URL is evaluated. • TIBCO Business Studio Customization . 2b -The deploy module operation is invoked on the server.The following diagram shows the phases of deployment based on the Java Business Integration (JBI) example: • Phase 1 .The repository will be located in a local folder or equivalent (for example mapped network folder. This repository type is default. or WebDAV mapped folder).a prefix of the enquiry URL that can be resolved on the server (the URL server will use this to obtain the module). Local folder . This repository type requires two additional configuration parameters: — Publishing folder . — Inquiry URL prefix . Phase 2a. the publish action (Phase 1) does nothing. and the inquiry URL is the same as the URL of the Module in the workspace. The deployModule(String inquiryUrl) method which is a part of the Connection interface is responsible for this step. • Repository Types Each server type must be associated with at least one repository type. There are two pre-defined repository types: • Workspace .

You also must provide the implementation of the com. TIBCO Business Studio Customization . Define the Deployment Wizard You need to define a wizard that allows users to deploy your Module.xpd. File file) method is responsible for publishing Modules to the repository and will be invoked before deployment. File file) is for obtaining the inquiry URL corresponding to the file parameter. The configuration state can also be cached in controls and transferred to the configuration object just before finish. the appropriate code to transfer the state to the configuration has to be put to the transferStateToConfig() method. This extension requires the implementation of the com. implement the com.tibco.xpd.RepositoryPublisher interface for the newly defined repository type and provide any additional configuration parameters that are needed: public interface RepositoryPublisher { public void publish(RepositoryConfig config. This requires the implementation of getModulesURL. RepositoryConfig config) method will be invoked before the page is created. } The publish(RepositoryConfig config. The key to this is that your artifact must be capable of being represented as a URL. void transferStateToConfig().RepositoryConfigWizardPage interface that defines the additional wizard page with configuration details: public interface RepositoryConfigWizardPage extends IWizardPage { void init(RepositoryType type.model.deploy.wizards. you should implement a repository configuration wizard page. RepositoryConfig config). Your deployment wizard must conform to the Eclipse iDeployWizard. In ui. This provides the RepositoryConfig reference that can be interrogated for configuration parameters and filled by the user accordingly.deploy.repositoryConfigWizardPage extension. you make the association between the server type id and the wizard.repositoryTypes extension point and reference the repository from the serverType extension.deploy.Implementing Deployment 43 | If you need to define another type of repository. public URL getInquiryUrl(RepositoryConfig config.tibco.deploy.deployWizards. The config parameter references all repository configuration parameters and their values (that were provided when the server was created).ui. } The init(RepositoryType type.extension. In this case. File file). File file).core. the values for which should be provided by the user.xpd.tibco. extend the com.ui. If the repository type needs parameters.repository. To do this. The second method: getInquiryUrl(RepositoryConfig config.tibco.xpd.

44

| Chapter 4

Deployment Framework

When you deploy on the server, the extension point registry is searched, and the available wizards for the server type that you are deploying are displayed. The user then chooses a wizard.

TIBCO Business Studio Customization

Tutorial - Deployment to a WebDAV Server 45

|

Tutorial - Deployment to a WebDAV Server
This tutorial shows how to use the TIBCO Business Studio Deployment Framework to create a plug-in for the deployment of a workspace file to a WebDAV (Web-based Distributed Authoring and Versioning) server. It also describes how to retrieve server objects, information about them, and how to implement operations performed on these objects. WebDAV is an extension of the HTTP protocol designed to facilitate editing of web resources. In this tutorial, we will create a deployment system based on a WebDAV folder (also called a collection in WebDAV terminology). The TIBCO Business Studio Deployment module will be any workspace file. During deployment, the file will be put to the selected WebDAV folder which in our example we will call “site”. We will also display content of the site underneath the server and implement a delete operation which you can use to remove deployed files.

Prerequisites
This section lists the tasks that you must complete before you can follow the tutorial. Creating the Server Create or obtain access to a WebDAV compatible server. Open source alternatives such as Apache Web Server WebDAV module are available as well as WebDAV support in commercial web server products. This tutorial uses Apache Slide, which is based on the Tomcat application server. Apache Slide Installation To install Apache Slide do the following: 1. Download the binary Tomcat bundle from: http://jakarta.apache.org/slide/download.html 2. Unpack the zipped package. 3. Set the JAVA_HOME environment variable to root directory of Java SDK and run startup.bat (startup.sh on Unix systems). For detailed installation instructions, see http://jakarta.apache.org/slide/installation.html. By default the server runs on port 8080, the default path to the WebDAV root is /slide, and the username and password are “root”.

TIBCO Business Studio Customization

46

| Chapter 4

Deployment Framework

To test if the installation was successful, enter http://localhost:8080/slide in your browser. After providing the correct username and password, a simple directory structure should be displayed. WebDAV client library To communicate with the server, obtain a Java WebDAV client library. You can use the client provided as a part of Apache Slide project, but for the purposes of this tutorial, use the WebDAV support provided by Eclipse. Eclipse WebDAV Support Installation To install “DAV and FTP support plug-ins”, do the following: 1. Download eclipse-FTP-WebDAV-3.2.2.zip from: http://download.eclipse.org/eclipse/downloads/drops/R-3.2.2-2007021213 30/ 2. Unpack the content of the Eclipse subdirectory into the target platform or into the Eclipse/TIBCO Business Studio root directory. After successful installation, the WebDAV support plug-ins should be listed as an installed plug-in.

Creating a WebDAV Server Type Extension
1. To add a new server type (also called Runtime in TIBCO Business Studio) you must extend com.tibco.xpd.deploy.core.serverTypes. By convention, servers are defined in separate eclipse plug-ins named com.tibco.xpd.deploy.server.servername. Therefore, create a new plug-in for the deployment server called com.tibco.xpd.deploy.server.webdav. 2. Next, provide the necessary dependencies:

TIBCO Business Studio Customization

Add the serverType extension that looks similar to the following: <serverType connectionFactory= "com.Tutorial .webdav" name="Web DAV"> <supportedRepository repositoryId="com.deploy.xpd. and its purpose is to provide the server connection implementation class for a particular server: public class WebDavConnectionFactory implements ConnectionFactory { public Connection createConnection(Server server) { return new WebDavConnection(server).xpd.webdav.w Sub Folders" name="Show Sub Folders" parameterType="boolean" required="true"> </configParameter> </serverType> — The connectionFactory attribute points to an instance of ConnectionFactory interface.xpd.server.User Name:" name="User Name" parameterType="string" required="false"> </configParameter> <configParameter key="password" label="&amp.deploy.Password:" name="Password" parameterType="password" required="false"> </configParameter> <configParameter defaultValue="false" key="showSubfolders" label="Sho&amp.WebDavConnectionFactory" id="com.ui.server.WorkspaceRpository"> </supportedRepository> <configParameter key="siteUrl" label="&amp.tibco.deploy.Site URL:" name="Site URL" parameterType="string" required="true"> </configParameter> <configParameter key="username" label="&amp.tibco. } } TIBCO Business Studio Customization .tibco.Deployment to a WebDAV Server 47 | 3.

tibco.deploy.xpd. By default this parameter is false.WorkspaceRpository.ui.48 | Chapter 4 Deployment Framework Connection implementation is the central class of the server and is described in Creating the Server Type Connection Implementation on page 48.CONNECTED_LITERAL). Creating the Server Type Connection Implementation The server type Connection implementation class is responsible for communication with a remote server including: • • • • • connecting to / disconnecting from server deploying modules providing and refreshing server elements updating server state performing server element operations The simplest form of Connection implementation could look like this: public class WebDavConnection implements Connection { private final Server server.server = server. } public void connect() throws ConnectionException { server. — Finally. but you can also define your own repository type by extending the com. — Server type must support at least one repository type.deploy.setServerState(ServerState.DISCONNECTED_LITERAL). all necessary server connection parameters are defined: siteUrl – URL to the WebDAV directory (also called collection) where files will be deployed. If the repository is large. public WebDavConnection(Server server) { this. } public void disconnect() throws ConnectionException { server. There are two repository types already defined in the com. which simply provides deployment modules directly from Eclipse workspace.xpd. showSubfolders – Sets whether subfolders of the site should be shown.ui plug-in. com. username. } TIBCO Business Studio Customization .deploy.setServerState(ServerState.tibco.tibco. This tutorial uses the default. setting this parameter to true can cause refresh problems.repositoryTypes extension. password – Authentication information for the WebDAV server.core.

Severity. } } Although this implementation only changes the server state on a connect or disconnect action. } public Object getAdapter(Class adapter) { return null. } public void refreshServerContent() throws ConnectionException { } public Server getServer() { return server. } public DeploymentStatus deployModule(String url) throws DeploymentException { return new DeploymentSimpleStatus( DeploymentSimpleStatus.Tutorial .CONNECTED_LITERAL.getServerState() == ServerState. null).OK.Deployment to a WebDAV Server 49 | public boolean isConnected() throws ConnectionException { return server. Operation operation) throws DeploymentException { return null. it is sufficient for the purposes of the tutorial. TIBCO Business Studio Customization . } public Object performServerElementOperation(ServerElement serverElement. "".

50 | Chapter 4 Deployment Framework In TIBCO Business Studio. you should now be able to start the New Server Wizard and choose Web DAV as the Runtime. For example: TIBCO Business Studio Customization .

getConfigParameter(“password”).getConfigParameter(“username”). you can view the rendered parameters of the server and the assigned repository.getServerConfig(). you must implement the connect() method.getConfigParameter(“siteUrl”). You can also invoke connect and disconnect actions from the context menu and as a result see the server state change.Tutorial . The following example implementation of the method checks if the authentication information is correct for the provided site. and also checks that the site is a valid WebDAV resource. String password = config. String siteUrl = config. on the screen that follows. The widgets to capture parameter values are automatically generated using the parameter descriptions provided in the extension. String username = config.Deployment to a WebDAV Server 51 | If you select Web DAV as the runtime. After clicking the Finish button. getValue(). Connecting to WebDAV server To make a real connection to the server. getValue(). you can view the new server created under the Deployment Servers in the Project Explorer.toString(). getValue().toString(). private CollectionHandle siteHandle. public void connect() throws ConnectionException { ServerConfig config = server. TIBCO Business Studio Customization .toString().

and if the corresponding remote resource is a valid WebDAV collection resource.52 | Chapter 4 Deployment Framework try { password = EncryptionUtil. } } catch (DAVException e) { throw new ConnectionException(e).". httpClient. siteHandle = new CollectionHandle(davClient. password)). httpClient).newLocator(siteUrl).canTalkDAV()) { server.setAuthenticator(new SimpleBasicAuthenticator(username. so there is no explicit session associated with a connection. we create davClient and siteLocator (which is responsible for locating DAV resource).setServerState(ServerState. } catch (IllegalArgumentException e) { throw new ConnectionException( "Connection failed. HttpClient httpClient = new HttpClient(). DAVClient davClient = new RemoteDAVClient(davFactory. ILocator siteLocator = davFactory. The WebDAV is a request response protocol. However. } } In this example.CONNECTED_LITERAL). " + "Password has changed in the servers configuration file. TIBCO Business Studio Customization . } else { throw new ConnectionException( "Cannot connect to WebDAV site."). Next we create CollectionHandle (the proxy for a remote resource) for the site and invoke the canTalkDAV() method. Then. the HttpClient used by siteHandle does contain some session information (for example authentication information) that is sent with every request. " + "Please re-enter the server password.decrypt(password). the server parameters’ values are read from the server configuration. } WebDAVFactory davFactory = new WebDAVFactory(). This method checks if the connection to the server can be made. try { if (siteHandle. siteLocator). e).

They are displayed in the Project Explorer under the server and can be arranged in a hierarchical structure: The refreshServerContent() method from the Connection interface is responsible for providing and updating server elements.Deployment to a WebDAV Server 53 | Providing Server Elements The server can contain multiple ServerElement objects which represent objects on the server (usually existing modules).getServerElements().clear(). The following example shows an implementation of the method for a WebDAV server.Tutorial . } catch (DAVException e) { server. throw new ConnectionException(e). public void refreshServerContent() throws ConnectionException { if (isConnected() && siteHandle != null) { try { refreshServer(siteHandle). disconnect(). } } else { TIBCO Business Studio Customization .

54 | Chapter 4 Deployment Framework server.contains(memberName)) { ModuleContainer moduleContainer = DeployFactory. member). } } } for (AbstractResourceHandle member : members) { String memberName = getMemberName(member). } } if (!exist) { iter. for (AbstractResourceHandle member : members) { if (isCollectionMember(member) && name.getServerConfig().SHOW_SUBFOLDERS)).hasNext(). iter .add(name).remove(). } } private void refreshServer(CollectionHandle site) throws DAVException { boolean showSubfolders = Boolean. HashSet<String> existingFileNames = new HashSet<String>(). HashSet<String> existingDirNames = new HashSet<String>().createModuleContainer().setName(memberName). } } else if (se instanceof ServerModule) { boolean exist = false. for (Iterator iter = server.eINSTANCE .) { ServerElement se = (ServerElement) iter.getName(). WebDavConstants. } exist = true. for (AbstractResourceHandle member : members) { if (!isCollectionMember(member) && name.equals(getMemberName(member))) { setModuleProperties((ServerModule) se.clear().getServerElements().remove().parseBoolean(WebDavConstants . if (isCollectionMember(member)) { if (!existingDirNames.getConfigParamValue(server. if (showSubfolders) { TIBCO Business Studio Customization .iterator().equals(getMemberName(member))) { if (showSubfolders) { refreshCollection((CollectionHandle) member.next(). moduleContainer. } } if (!exist) { iter. (ContainerElement) se). String name = se. existingDirNames. existingFileNames. exist = true.add(name). Set<AbstractResourceHandle> members = site. if (se instanceof ModuleContainer) { boolean exist = false.getServerElements().getMembers().

contains(memberName)) { ServerModule module = DeployFactory. url). String deploymentMsg = "Deploying: " + url. public DeploymentStatus deployModule(String url) throws DeploymentException { Assert.Deployment to a WebDAV Server 55 | refreshCollection((CollectionHandle) member.add(moduleContainer).isTrue(url != null && url. String remoteUrl = getSiteRelativeURL(siteHandle. moduleContainer).eINSTANCE .getServerElements().createServerModule(). } server.trim().newLocator( TIBCO Business Studio Customization . all server elements should be removed. setModuleProperties(module. This method is responsible for the deployment of a single file to the WebDAV site.add(module).setName(memberName).getServerElements(). member). InputStream inputStream = null. } } else { if (!existingFileNames. } } } } During the method invocation.isNotNull(siteHandle). server. we connect to the WebDAV server and obtain remote resources’ information. Implementing the deployModule Method The following example shows an implementation of the deployModule method for a WebDAV server. Then we create corresponding server modules and/or update their state and properties. Assert. ILocator resourceLocator = client. module.getDAVFactory().Tutorial .length() > 0). Provide a deployment wizard. try { DAVClient client = siteHandle.getDAVClient(). Deploying Modules To implement modules deployment we will have to do the following: • • Implement DeploymentStatus deployModule(String url) method for the Connection implementation. When the user disconnects from the server. In a future implementation. the server elements could be enhanced to better support hierarchical structures of server objects.

deployWizards"> <deployWizard TIBCO Business Studio Customization .SC_NO_CONTENT) { return new DeploymentSimpleStatus( DeploymentSimpleStatus. } } } The method’s parameter is a string that contains the URL of the file in the deployment repository (also called the inquiry URL).newContext().getDAVFactory(). deploymentMsg.SC_CREATED || statusCode == IResponse. Because we use “Workspace Repository” this URL is the same as the URL of the local file. Before the module is deployed.xpd. and it is used by the server to access the module from the repository (it could be different to the local module URL).ERROR.OK. inputStream = localUrl.ERROR.Severity. <extension point="com. deploymentMsg + responseMessage. } finally { try { inputStream. null). URL localUrl = new URL(url).put(resourceLocator. deploymentMsg + responseMessage. it is published to the server repository and the repository is asked to provide the inquiry URL for the published module. } } catch (IOException e) { return new DeploymentSimpleStatus( DeploymentSimpleStatus. client . } else { return new DeploymentSimpleStatus( DeploymentSimpleStatus.printStackTrace(). e).Severity.tibco.getStatusMessage().deploy.openStream().deploy. } catch (IOException e) { // TODO Log error e.deployWizards extension point.getStatusCode().xpd.ui. IResponse response = client. if (statusCode == IResponse. Providing the Deployment Wizard This section describes how to provide a deployment wizard and associate it with the WebDAV server type by implementing the com.ui. int statusCode = response.56 | Chapter 4 Deployment Framework remoteUrl). String responseMessage = "\n" + statusCode + ':' + statusMessage.tibco. null).close(). This inquiry URL is passed as a parameter to the deployModule method. inputStream). String statusMessage = response.Severity.

deploy. fileType = f.tibco.deploy. States should not be shared between different element types publishedState = f. you must define the following: • • • • Types of elements Possible states for a defined element type Operations that can be performed Operations that can be performed when an element is in a particular state It is also necessary to set the correct type and state for every server element created when calling the refreshServer method.eINSTANCE. } finally { TIBCO Business Studio Customization .tibco.setName("Published").createServerElementState().Deployment to a WebDAV Server 57 | class="com. private void initialiseServerElementTypes() { DeployFactory f = DeployFactory.WorkspaceFileDeployWi zard" id="com. publishedState. To do this.Tutorial .add(publishedState).workspaceFileWizard" name="Workspace File" serverTypeId="com. which (after the wizard finishes) should return a list of modules’ local URLs. The following code fragment shows how to create and configure all necessary elements to implement a WebDAV module (file) delete operation.getStates(). // states. Implementing Operations for ServerElements To implement operations for server elements. the wizard class must implement IDeployWizard.createServerElementType().xpd.deploy.xpd. // all states server element type could be in fileType. private ServerElementState publishedState. // operations deleteFileOperation = new OperationImpl() { @Override public Object execute(ServerElement serverElement) throws DeploymentException { try { return deleteRemoteFile(serverElement). The most important method in this interface is List<URL> getModulesUrls(). private ServerElementType fileType.xpd.webdav"/> </extension> The main purpose of a deployment wizard is to provide a list of URLs for local modules.server.ui. private OperationImpl deleteFileOperation.webdav.server.webdav.server.tibco.

see Defining a Runtime (Optional) on page 40.setServerElementType(fileType). "On save" module deployment.getPossibleOperations(). Summary This tutorial showed how to use the TIBCO Business Studio Deployment Framework to create a plug-in for the deployment of a workspace file to a WebDAV server. • TIBCO Business Studio Customization . // all available operations for server element type fileType. This is useful.setServerElementState(publishedState). for example. serverElement. } } }. // possible operations for states publishedState. } Also when you create modules using the refreshServer method.add(deleteFileOperation). information about them.getOperations(). The reuse of configuration information in a client runtime. you must set an element’s type and state as follows: serverElement.58 | Chapter 4 Deployment Framework refreshServerContent(). It also described how to retrieve server objects. if many server types use common configuration data or a common platform on the client side. This common configuration information can be stored by the client runtime which can be shared by multiple servers. deleteFileOperation.setName("Delete"). For more information about runtimes.add(deleteFileOperation). in which a module is automatically deployed when the content of the module changes. Other Framework Features The following features are available. and how to implement operations performed on these objects. but were not demonstrated by this tutorial: • • The ability of the deployment framework to allow you to create additional module repository types.

Sign up to vote on this title
UsefulNot useful