While working in TIBCO Projects, you often come across situations where teams are working on multiple projects and there are certain common functionality that is reusable among different projects. Instead of reinventing the wheel in every project and doing duplicate things; TIBCO provides options to create design time libraries using LibraryBuilder and then share it with other project teams so that they can import design time libraries and use the same.
In this step by step tutorial, I will explain how to use TIBCO BW Library Builder to create design time libraries(.projlib) and how to import and use such libraries in other projects.
I am taking a simple scenario for this tutorial. Let’s suppose that we have a Student Schema that is a common schema and will be used across multiple projects. We will create a Schema for Student and add it to a Project Library by using LibraryBuilder resource from General Palette.
We will build the library and then will import it as a design time project library in another project and use there.
Let’s go step by step with TIBCO Project Library tutorial:
Step 1: Create a common reusable Schema
In this step, create a new XML Schema (XSD File) by using Schema element from XML Tools Palette. In the Student Schema, I am adding StudentName, StudentAge and StudentDOB as its tags as shown below:
We want this schema to be added to a Project Library so that It can be reused in other projects.
Step 2: Create Project Library Using LibraryBuilder in TIBCO
To create Project Library(.projlib), drag LibraryBuilder from the General Palette in your project. In the configuration tab, give some name to your project library. Also specify the path where you want to save your Project Libary file with .projlib extension:
Now go to Resources tab of the LibaryBuilder and add the resources. We want to add the Schema that we created in Step 1. Using binocular button, browse and select the Schema file as shown in the screenshot below:
Now build the Project Library by clicking on Build Library button (appears in the bottom). On successful build, you will get a Success message that your Project Library has been built successfully.
Now we proceed to next step in which we will import this library in a different project and will use it.
Step 3: Import Project Library (.projlib) and use it
I created a new TIBCO Designer Project and named it as ProjectLibraryImport. Go to the Project Root by clicking on the project name in the Project Panel. Go to Design Time Libraries tab and using + button, browse and import the Project Library that was created in previous step.
As you can see in below screenshot, Library has been imported in the project and Its enclosed Schema is now available in the project:
Now you can use this Schema in this project in any desired manner.
Let’s create a process and use StudentSchema in its Start activity. I created a new Process with the name StudentProcess. In the Output Editor of Start Activity, choose the StudentSchema by using the option XML Element Reference as shown in screenshot below:
Feel free to contact me if you are unclear on any point or If you need further help.