Professional Documents
Culture Documents
Geoffrey Beers, Software Engineer, IBM Rochester Francis Dinardo, ISSW, IBM Raleigh Mannie Kagan, ISSW, IBM Toronto Eric Herness, WebSphere Business Integration Chief Architect, IBM Rochester Logan Colby, Software Engineer, IBM Rochester April, 2006 Copyright International Business Machines Corporation 2006. All rights reserved. This article provides detailed steps and usage examples to help you engage in team development using IBM WebSphere Integration Developer Version 6.0.1 and IBM WebSphere Process Server Version 6.0.1. It identifies the artifacts needed for remote version control management, as well as the necessary procedures to develop applications with artifacts remotely managed in a team environment using WebSphere Integration Developer. It is assumes that the reader has basic knowledge of Service Component Architecture (SCA) and Eclipse.
Introduction......................................................................................................................... 2 Describing the application .................................................................................................. 4 Authored versus generated artifacts.................................................................................... 6 Artifact types: derived versus non-derived ........................................................................ 7 Application components and artifacts................................................................................. 9 SCA Component Artifacts .............................................................................................. 9 Exports and Imports...................................................................................................... 10 BPEL............................................................................................................................. 10 Business State Machines............................................................................................... 11 Human Task Manager................................................................................................... 12 Business Rules and Selectors........................................................................................ 13 WSDL Interfaces and Business Objects ....................................................................... 14 Maps and Relationships ................................................................................................ 14 POJOs ........................................................................................................................... 15 Team development with CVS........................................................................................... 15 Developing Process Server applications in a team environment using CVS................ 16 Adding new Process Server projects and artifacts to CVS ........................................... 16 Extracting remote Process Server artifacts from CVS.................................................. 20 Synchronizing files with the CVS repository ............................................................... 22 Committing local changes to CVS................................................................................ 23 Updating local workspace with remote CVS artifacts.................................................. 23 Synchronization considerations with multiple users..................................................... 24 Managing libraries in CVS ........................................................................................... 24 Managing staging modules in CVS .............................................................................. 25 Wiring components in a team environment .................................................................. 26 Hints and tips when working in a team environment ................................................... 27 Conclusion ........................................................................................................................ 28 Resources .......................................................................................................................... 28 About the authors.............................................................................................................. 28 Appendix........................................................................................................................... 29
Introduction
This article describes the configuration of IBM WebSphere Integration Developer (hereafter, referred to as Integration Developer) workspace in Version 6.0.1 and gives careful attention to the management and generation of the various resources of the Service Component Architecture (SCA) applications developed for WebSphere Process Server (hereafter, referred to as Process Server). It is based on the development of an application that leverages most of the capabilities of the business integration development environment including detailed coverage of the most common components and functionality in Process Server and Integration Developer. The scenario leverages the team development facilities of Eclipse and Integration Developer using Concurrent Versioning System (CVS) as the primary tool for team development and application version control. The article begins with an analysis of the
modules core elements as well as those pieces generated by Integration Developer. It then discusses the quintessential components of a module as they pertain to business integration development in a team environment. The final sections of this article describe a detailed methodology, as well as the known problems and workarounds, for team-based Process Server application development. Service-oriented architecture (SOA) is based on the principles of abstraction, implementing a strong and rich interface to a service that will make it reusable in a number of environments. Service Component Architecture (SCA) enables SOA and introduces additional metadata and associated runtime machinery to enable a consistent invocation model for services as well as bindings to popular invocation styles such as Web services and Java Message Service (JMS). SCA also introduces metadata, which captures dependencies (references) that a specific service implementation has on other resources and services in order to function successfully. This leads to a richer solution assembly environment. To enable reuse of services, not only do we need an SOA with SCA at the specification level, we need a set of development tools that facilitate the SOA development methodology. WebSphere Integration Developer does this. Integration Developer enables developers to create new services using a variety of authoring paradigms such as business rules and business processes, with tools to easily and quickly test them. Integration Developer also enables developers to publish new services for access in a variety of ways (Web services, native SCA, and JMS). Given this basic set of capabilities, we have now enabled individual developers for SOA development in a first-class way. Scaling up SOA development means that we need teams of developers working together, building and reusing services and other artifacts that those services depend upon. Libraries enable sharing of Web Services Definition Language (WSDLs), XML Schema Definition (XSDs), and other common building blocks for SOA applications across application modules. The next key capability required for scaling up SOA development is team development. A set of procedures and processes, leveraging existing capabilities in Eclipse and source code control systems is needed. This article provides details on the team development aspect of scaling up SOA development. It begins with background information on team development and discusses the basic premise of team development for this environment. Next, to provide this information in the most effective way, we introduce an application with a number of interesting requirements and capabilities. This application becomes the basis of many of the procedures and tasks centered on the team development that follows. After introducing the application, we provide some basic concepts around source code control and the Eclipse enablement of source code control. This section, entitled Artifact types: derived versus non-derived describes the files involved in enabling each key feature of Process Server, sorting through where each comes from and what purpose each serves in the overall application. This knowledge is then leveraged and built upon
the next section entitled Team development with CVS, where key developer tasks are explained and demonstrated using our example application. This section concludes with some suggestions for building and managing solutions that consist of a number of SCA modules and libraries. Examples based on Integration Developer and Process Server Version 6.0.1 are used throughout this paper. Temporary workarounds and suggested implementation patterns are also noted. Expected changes to procedures due to future product fixes and enhancements are identified as well. In Version 6.0, team development within Integration Developer was only viable through the Resource perspective. Additional support has been added in 6.0.1 to include team development functionality in the Business Integration perspective, thereby seamlessly integrating the development and team management environments within the same view. After reading this article, you will understand the effort needed to scale up SOA team development and the details involved.
The application consists of three primary modules: 1. A service module for each component type. 2. A service library. 3. A J2EE Web project to invoke an SCA component from an external Web project. We cover many of the different component types in the application, including BPEL processes, Business State Machines, Human Task Manager, Business Rules, Selectors, Business Objects, WSDL interfaces, POJOs, and Maps. The application contains the standard J2EE staging modules. The end-to-end scenario uses a library where Business Objects and WSDL interfaces are shared amongst the various service modules. When built, every project in Integration Developer will result in the creation of the following staging modules: App EJB EJBClient Web The staging modules are not visible in the Business Integration perspective, but they can be seen in the Resource perspective. As shown below, after we build our service module the four staging modules are generated.
We introduce the essential elements and imperative files found in the primary service module, as well as those generated in the staging modules. The derived files that are generated from each of these component types will be examined and noted. Additionally, we use a separate J2EE Web Project, which includes a simple JSP application that invokes a Process Server SCA component. This demonstrates a design pattern that places dynamic Web content in a separate Web project defined by the developer, instead of relying upon the generated Web module associated with the primary service module.
When the Derived box is checked, it tells us that the file is generated by the Integration Developer builders, and therefore is not authored when a project is created. Upon creating a new component, authored (non-derived) files get created for us. After building this component the generated (typically derived) files are created. In the simplest case, assume we create a Java component. When authored, a non-derived .java file representing the Java source code logic is created for us. After we build the application, an associative .class file will be generated and have derived properties. Some components have a much more complex infrastructure, which includes the generation of several non-derived files. For example, if we create a business state machine, we will get .sacl and .saclex files that define the state machine logic. These files are created by Integration Developer when we create the state machine, and therefore they are not derived. Once the project is built, however, we will get several other files that are generated from the core .sacl logica .bpel file, for instance. Since the .bpel is generated by the Integration Developer builders, it is marked as being
derived. A detailed listing and explanation indicating which files are derived for each component in an Integration Developer business integration project will be discussed in the following section. Of course, in a BPEL application, the .bpel and .bpelex files are considered authored artifacts, and therefore are classified as non-derived artifacts. Furthermore, we can use the knowledge of derived files to assist us with the management of files in a team environment. Since a file marked as derived is generated by Integration Developer, it implies that we do not need to maintain a copy of this file in the CVS repository. We know that if it is not present, it will be regenerated on subsequent builds. In fact, any file noted as derived will not be placed in the CVS repository when the user synchronizes his project with CVS. CVS functionality will be discussed in much greater detail later. The user has the ability to change the derived properties of any file, but this practice is strongly discouraged. If a file marked as derived by Integration Developer has this property changed by the user, then it will be placed in CVS unnecessarily. While this practice is not particularly harmful to a team development project, it does create added confusion to other developers using CVS, since it implies that the file is one of the initial application files created by Integration Developer when the application was created. A perhaps larger problem occurs when a file marked as un-derived is manually changed by the programmer to being derived. When the user synchronized his local workspace with CVS, the file would not be updated properly on the remote CVS repository. There are instances when the derivation properties of a file may need to be changed. We will discuss this in a later section. The four staging modules generated when an application is built are not explicitly marked as derived. Since the staging projects are generated they typically do not need to be managed on CVS. There are certain exceptions with the App staging module where custom deployment descriptor and security role settings are changed, thereby overwriting the default settings generated by Integration Developer. In this case the App staging module would need to be managed in CVS. Similarly, if the developer places any Web content in the generated Web module, then this will also have to be managed by CVS. The EJB and EJBClient modules consist of entirely generated, unalterable code. There is never a viable reason why these two modules should be managed on CVS. Certain cases where CVS management of the staging modules is required will be discussed later. As mentioned above, the folder and file properties must still be viewed under the Resource perspective, in spite of newly added team development functionality added to the Business Integration view. Since only the necessary artifacts are uploaded to CVS via the Business Integration perspective, a full understanding of the derivation properties is not quite as important as it was in Version 6.0. You can make the following assumptions regarding authored and generated and derived and non-derived files: Authored files are always non-derived.
Generated files are usually derived, but sometimes they are non-derived. Eclipse files in your workspace that setup your classpath, runtime, project, or preferences are generated by Eclipse, but they are marked as non-derived. Staging modules are generated, but their folders and file contents are non-derived. Non-derived files are uploaded to CVS when we perform a commit operation. Derived files are not committed to CVS unless we specifically change the properties of the file. Non-derived files that are inside of a folder marked as derived assume the properties of the parent folder, and therefore, are also derived.
BPEL
When a BPEL application is created in Integration Developer, two non-derived files with extensions .bpel and .bpelex appear in the primary service module. The .bpel file specifies the BPEL workflow logic, while the .bpelex file specifies the GUI positioning for the various BPEL activities. There also is an authored Artifacts.wsdl file that is created for the user when a BPEL process is created. When the project is built, there are additional derived files that are introduced in the service module. An authored .mon file for CEI and Audit Log event monitoring gets created. The .mon file serves as a template for user-enabled monitoring. If the BPEL process does not include any monitoring functionality, then this file will have no immediate effect. It does not enable any specific events. However, if monitoring functionality is added to the process, then the monitored activities will be added to the existing .mon file. Although the _bpel.mon file appears to be generated, it is really an authored artifact. Monitoring capabilities are optional, so if this file is not present, then the application will still build properly; it just will not have any event monitoring functionality. Furthermore, several Java (.java and .class) and .smap files get generated in a folder having the same logical folder structure as the target namespace attribute defined in the Business Process Execution Language (BPEL) logic. For example, the target namespace defined in the following BPEL process is: http://CleanPublishBPEL/com/clipsandtacks/process. A lowercase directory tree for the generated files will resemble this target namespace path as: cleanpublishbpel/com/clipsandtacks/process. This can be seen in the file structure below.
POJOs
A POJO is a Plain Old Java Object implementation of an SCA component. The .java file will include the component logic and will be located in the primary module based on the packaging structure defined in the Java code. When built, a .class file will be created in the same folder. Like other components, when a POJO is added to the Assembly Editor, a .component file will be created. In the Business Integration perspective, the POJO will be located in the Java section under Business Logic. In the Resource perspective, the POJO will be located in the Java package path defined by the user. As we see in the Resource perspective below, the POJO is represented by Component1Impl.java.
Figure 10. POJO component artifacts
core artifacts. As an extension to the previous section, we will also examine which core artifact files need to be tracked in a CVS environment.
Under most circumstances, only the primary module needs to be managed in a team development environment. Because of this, the Business Integration perspective only supports team management of the primary module. In the unlikely circumstance that the developer requires version control management of a staging module, then the Resource perspective will be required.
Furthermore, the Business Integration perspective has a Show Files option that will show you the authored artifacts in the Physical Resources view for a component. If you rightclick on your component in the Business Integration perspective and select Show Files, it highlights the corresponding authored files in the Physical Resources view for the selected component. For example, if you perform a Show Files operation on a BPEL process, the .bpel, .bpelex, bpel.mon, and Artifacts.wsdl files will be highlighted in the Physical Resources view. As of version 6.0.1, you can now add projects to CVS using the Business Integration view in addition to using the Resource perspective or Physical Resources view in Integration Developer. The Business Integration and Physical Resources views filter out the staging modules, thereby only showing the service module. Since the user is typically only interested in managing the service module, this is usually not a problem. However, if the user needs to manage the staging modules in a remote repository, the Resource perspective must then be used to share the project. When adding a Process Server module to CVS, use these steps: 1. Right-click on the module name and select Team => Share Project. 2. Select a repository type (currently CVS or Clearcase).
Figure 11. Select a repository type
3. Select a location for the remote repository, if necessary. 4. After selecting your user profile, make sure you select Use project name as module name. This is especially important in Integration Developer applications because the sca.module file depends on the module name, and if the module name changes, you will get naming errors later.
Figure 12. Use the project name as the module name
5. Select the entire module name since we will add the entire module.
Figure 13. Add the entire module to CVS
6. You will be notified that you have uncommitted changes that have yet to be shared. Click Yes.
Figure 14. Commit any outstanding changes
7. You will be notified of the number of files you are attempting to commit. Click Yes.
8. Add an optional comment for version tracking. The files and folder structure will be uploaded to the remote CVS repository and the service module will be available for check out.
empty folders to CVS. This is the easiest method and will make it much easier for users to manage when they try to commit files on future builds. Realistically, at some point the empty files will be placed there by someone anyway, so adding them in the beginning will serve no harm whatsoever.
Below we see a remote module within the Business Integration view. Newly added team development functionality in version 6.0.1 allows the user to share and manage version control projects within the Business Integration view, as shown below.
Figure 17. Remote artifacts can also be managed in the Business Integration view
2. Create a gen/src folder in the primary service module. From the Resource perspective, right-click on the service module and select New => Folder. Unfortunately, the folders have to be added separately. First, add a gen folder and click Finish. Then repeat this process and add src under the newly created gen folder. This problem does not occur so much when you first extract a module. It appears much more prevalently when you are calling updates to CVS. If you should experience this problem, it may be better to disable the directory pruning option in the Preferences. This is a one-time fix, whereas creating the gen/src folder may have to be done repeatedly (this occurs more often with updates see below).
There is a simple command that fixes this problem. If you right-click on your module under the Synchronization tool, you will see an option Clean Timestamps. This removes from view any files showing up as unsynchronized, assuming the only difference they share is caused by inconsistencies in their timestamp.
As is the case in any application where a library project is used, CVS users should take precautions when modifying elements inside of libraries. It is feasibly possible that changes to Business Objects and WSDLs in the library may cause unforeseen incongruities in other service modules that also depend on the library. For instance, assume that user1 is developing a BSM and user2 is developing a BPEL application. Assume that the BSM and BPEL applications are in their own separate module. A library is used for the Business Objects and WSDLs, since the modules implement the same interface. User1 extracts his BSM module from CVS, but to get the state machine to work as desired, he needs to make some changes to some of the Business Objects and WSDL operations in the library. He notices that with the changes to the library artifacts his state machine works as he anticipated. Thinking there are no problems, he commits the changes to CVS and closes his session. Later, user2 logs in to CVS and extracts his BPEL and libraries. Although nobody else has modified the BPEL application, he notices that his application will no longer build properly due to the changes that user1 made to the shared Business Objects and WSDL interfaces. Without knowing it, user1 made changes to the shared library that affected other components and modules. Therefore, when changing shared artifacts managed in any version control system, it is crucial that one is aware of the effects that these changes may have on other modules.
staging modules consist of entirely generated artifacts. Thus, they will always be recreated when the project is built, and therefore, never need to be managed by CVS. As mentioned above, staging modules can only be managed on CVS using the Resource perspective. Since the staging modules contain artifacts that do not typically need to be managed on CVS, the functionality for managing these generated staging modules is explicitly not included in the Business Integration perspective.
the Assembly Editor or use emulators via Test Component to test the viability of the BSM without specifically relying on other components.
When you delete an authored file from your local workspace and synchronize with CVS, you will see a - sign notifying you that you will delete the artifact from the remote server. This will remove all traces of the file. Be careful! For BO maps, some of the generated files show up as non-derived, when they really should be derived. This is known for the target namespace generated directory structure in BO maps. As we have discussed, this does not have significant impact on team development. It simply implies that we are placing files on CVS that do not need to be there. When the artifacts are extracted and rebuilt, these specific files will be regenerated. When testing your components in the Assembly Editor, consider using stubs when testing your component. Team-based component wiring can be risky, especially at earlier stages of development.
Conclusion
This paper provided the background and details on accomplishing team development using Integration Developer and Process Server Version 6.0.1. Relevant details around the steps and actions have been outlined and examples of usage have been given. This document focuses on identifying the appropriate artifacts needed for remote version control management, as well as procedures needed to develop applications with artifacts remotely managed in a team environment using Integration Developer. Although CVS is used as the tool for version control management in this document, conceptually, these methods can be applied to other version control management systems such as Clearcase.
Resources
IBM WebSphere Business Process Management Version 6.0 Information Center http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp
Eric Herness is currently the Chief Architect for WebSphere Business Integration and is from the IBM Rochester, MN, USA development lab. He is a senior member of the WebSphere Foundation Architecture Board and a core member of the Software Group Architecture Board. Eric has been involved product architecture and product development in object technology and distributed computing for over 15 years. You can reach Eric at herness@us.ibm.com. Logan Colby is a software engineer at IBM in Rochester, Minnesota. He is a developer for WebSphere Process Server. You can reach Logan at lcolby@us.ibm.com.
Appendix
Below is a table that includes a listing of the authored and generated artifacts for each component type. Authored artifacts, typically non-derived, must be persisted when managing projects with CVS for team development. On the other hand, generated artifacts are those files that are created from the authored artifacts when the Process Server builders are called. Generated artifacts are usually derived files, and therefore, they do not need to be managed or exported to CVS when sharing team-based projects. Each primary component type is listed below with their corresponding authored and generated artifacts in Table 1. There are certain files and folder structures, such as sca.module and .component files, that are commonly presented in all business modules. The artifacts listed in all projects are listed in their own section below. Table 2 shows the EJBs that are generated for each component type. Table 1. List of authored and generated artifacts
Component Type Common to all modules: Authored Files .component sca.module sca.modulex sca.references MANIFEST.MF .classpath .project .runtime Folders .settings META-INF xsd-includes .bpel .bpelex _bpel.mon Artifacts.wsdl Generated
BPEL
.tel _htm.mon .brg .brgt .dtable .ruleset _brg.mon .xsd .wsdl .java .sel .selt _sel.mon .ifm .map _map.mon _ifm.mon .rel .rol .export .import
Table 2. EJB generation for imports and exports Component Type EJB Module Stateless Session Bean (SSB) All Modules BPEL, BSM, and HTM Imports and Exports SCA Import SCA Export JMS Import JMS Export JCA Import JCA Export Trademarks
Resource reference in ejb-jar.xml export.ExportName SSB Resource reference in ejb-jar.xml export.ExportName MDB _import.ImportName MDB export.ExportName MDB
IBM and WebSphere are trademarks or registered trademarks of IBM Corporation in the United States, other countries, or both.
Windows and Windows NT are registered trademarks of Microsoft Corporation in the United States, other countries, or both. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Other company, product, and service names may be trademarks or service marks of others.