Saturday, September 30, 2023

Error Handling | BW 6.X

Errors (or faults) can occur when executing a business process. 

Using fault handlers you can catch faults or exceptions and create fault-handling procedures to deal with potential runtime errors in your process definitions.

Fault handlers are the recommended way to catch faults or exceptions in a process. Two types of fault handlers are available: 

1. Catch Specific Fault 
2. Catch All Faults.

Fault handlers are defined at the scope level, as a result you can catch faults or exceptions thrown by activities within a scope. 

To catch faults or exceptions specific to an individual activity, you need to define a new scope for that individual activity and attach a fault handler to the new scope.

At runtime, once a fault handler is executed, the associated scope will not complete due to the error thrown. 

If a fault is not thrown in the fault handler, the process execution continues with the first activity that follows the scope. If a fault is thrown in the fault handler, then the engine looks for an enclosing scope that is designed to handle the fault. 

If one is found, the engine executes it. Once the enclosing fault handler finishes its execution, the engine executes the next activity following the scope. If no fault handlers are found in the enclosing scopes, then the job terminates with a fault.

Fault handlers can be defined at the process level, or at a scope level within a process
If the fault handlers are defined at the scope level, you can catch exceptions thrown by activities within a scope. 

How to define Fault handlers for a scope:
  • Create a group for one or more activities (where exceptions are expected) and right click and select Scope
  • Move the cursor right underneath the scope's lower border to view the icons to create fault handlers. 


1. For Catch Specific Fault :
Select the activity  - right click and select Catch and then select the expected exception. Then catch block will be created automatically with the selected exception.


2. Catch All Faults.
Select the activity- right click and select Catch All. Then catch block will be created automatically.



Process Level:
Move the cursor right underneath the process's lower border to view the icons to create fault handlers.





Best practice : Create a sub-process for complete exception handling and invoke it in your actual business process.

Thanks for reading :-)

Source: Tibco documentation

Error Handling | BW 5.X

What is an Exceptions..?

An exception is a problem that arises during the execution of a program or logic. When an Exception occurs the normal flow of the program is disrupted and the program or the application terminates abnormally, which is not recommended, therefore, these exceptions are to be handled properly.

An exception can occur for many different reasons. Following are the various reasons 

  • User has entered an invalid data.
  • A file that needs to be opened cannot be found.
  • Network or DB connection has been lost in the middle of communications or the JVM has run out of memory.

How to handle exceptions in TIBCO BW 5.x

Following are the important activities to handle exceptions:

CATCH

The catch activity is used when an unhandled exception occurs

Using this we can either specify a particular exception that needs to be caught or we can specify all unhandled exceptions

More than one catch activity can be used but each activity should handle a unique exception type.


Generate Error

This activity generates an error and causes an error transition, if any error transition is present else it stops the execution of the process.

This is generally used in a group activity or in a called process.


Rethrow

This activity is always preceded by the Catch activity and it rethrows the exception identified by the catch activity. It does not contain any input or output.


Suppose A B and C are processes, A is the parent and it's top level process and begins with an event handler, A invokes B as a subprocess and B invokes C as a subprocess. 

A, B and C all include a Catch activity. 

Then A receives an event and starts, A invokes B and B invokes C. 

If an error occurs in process C, then the Catch activity in C will catch the error. If C does a Rethrow then the Catch activity in B will catch the error. If B does a Rethrow then the Catch activity in A will catch the error.

Note: Rethrow activity must be preceded at some point by a Catch activity, which is not needed in case of Generate error activity.

Ref: Tibco documentation

Thanks for reading :-)

BW 5.x Vs BW 6.x Vs CE (Container Edition)

Developer Perspective:

BW6- is a modern integration and service delivery platform for modern things such Mobile, Cloud, Internet of Things or Microservices.

BusinessWorks Container Edition (CE) - which is a cloud-native, based on the same code base of BW6, but ready for the cloud and its specific requirements such as container-supported deployment.

Canvas is clever enough- when you drag and drop certain artifacts on canvas like files, you can see a popup where you can select one of several File activities such as a FilePoller. This step also automatically adds configuration such as the file name. Same thing applies for parsing a XML Schema, SOAP/ REST, SQL statement.

The intelligent mapper includes auto-complete features (e.g. adding parentheses or commas between different inputs in a function), automatic warnings (e.g. if 0 is used for an 1-based array index) or quick fixes (e.g. for type conversion).

BW Container Edition is stateless by default. You can still “create state” (e.g. by writing data to a message queue or database), but some features of BW6 are missing, because BW CE is cloud-native supporting PaaS platforms and containers (which are usually built stateless).

BW6- It's a single environment to do development, debug, testing and deployment  environment. 

BW6.x is using eclipse IDE to implement Java code seamlessly and use other features like Maven support..etc.

API testing can be done easily with Swagger built-in functionality. It's a powerful REST framework. Whereas in BW5.x, we need to use third-party products like SOAP UI or Postman.etc.

Admin Perspective:

Key differences identified in TIBCO BW6 TEA and BW5

In BW 5.x, we need to use Domain Utility to create domain, whereas in BW 6, we can do domain management through from TEA or we can use bwadmin utility to create Domain, AppSpace and AppNode.

In BW5, every machine should have TRA installed, but in BW 6.x every machine should have one bwagent running to communicate with TEA.

In BW6, we can install directly from Business Studio by adding Deployment Servers directly, which is very much useful.

In BW6, we can see process diagram directly in TEA, which is very helpful to understand process flow, sub-flows, source and target systems. Eventually, useful for application support team to debugging a process.

In BW6, a running AppNode can be enabled for remote debugging from either bwadmin or the Admin UI. Once we enabled, use TIBCO Business Studio to debug the application running on the AppNode.

When we deployed an application in an app space in BW6, it gets deployed to all the machines which are part of that space.

In BW6, for deployed application properties, multiple profiles can be created and then we can choose profile for a deployed solution.

We can view easily endpoints, components, processes, log files (view/download) for a running application from the Admin UI.

BW 5.x is the best integration platform for on-premise environment. But, if you are using or planning to migrate to the cloud, then BW6.x or BWCE are the best products. 

For CI/CD- continuous Integration and continuous delivery perspective, both are good. But, I recommend BW6.x, because it support maven plug-in, Sonarqube and Nexus for achieving CI/CD


Sources:

Tibco documentation


TIBCO 5.x Installation Steps

TIBCO product download and installation procedure is same as in TIBCO  BW 6.x.

Steps already explained in BW 6.x installation steps

In TIBCO 5.x, after we have download all/required products from edelivery or tap.tibco.com sites, ensure to install them in the sequence as shown below.

Note: Version may vary based on your selection.

1. TIB_RV_8.4.4_win_x86_64_vc10
2. TIB_EMS_8.3.0_win_x86_64_vc10
3. TIB_TRA_5.11.0_win_x86_64
4. TIB_DB Drivers_2.0.6_win_x86_64
5. TIB_BW_5.13.0_win_x86_64
6. TIB_ADADB_7.2.0_win_x86_vc8
7. TIB_HAWK_5.2.0_win_x86_64
8. TIB_TIBCO-Admin_5.11.0_win_x86_64

TIBCO Administrator | Roles & Responsibilities

Roles and Responsibilities:

  • Install, configure and upgrade TIBCO middleware components on Linux servers servers.
  • Monitor and maintain TIBCO infrastructure to ensure optimal performance and availability.
  • Troubleshoot and resolve issues related to TIBCO middleware and Linux systems.


Security and Compliance:

  • Implement and maintain security polices for TIBCO components and Linux servers.
  • Ensure compliance with industry standards and organizational security policies.

Performance Tuning:

  • Optimize the performance of TIBCO middleware applications by fine-tuning configurations.
  • Identify and address performance bottlenecks/issues.

Backup and Recovery:

  • Develop and implement backup and disaster recovery strategies for TIBCO middleware and Linux systems.
  • Perform regular backups and test recovery procedures.

Patch Management:

  • Apply patches and updates to TIBCO middleware and Linux systems.
  • Keep systems up to date with the latest security and software updates.

Documentation:

  • Maintain accurate documentation of TIBCO configurations, procedures and troubleshooting steps.
  • Create and update system documentation for Linux servers.

Collaboration:

  • Collaborate with cross-functional teams, including developers, network administrators and database administrators to support TIBCO middleware.

Monitoring and Alerting:

  • Implement monitoring solutions to proactively detect and address issues.
  • Set up alerting systems for TIBCO middleware and Linux servers.

Skills:

  •     TIBCO middleware administration
  •     Linux system administration
  •     Shell/Python - Scripting and automation
  •     Security and compliance
  •     Performance tuning
  •     Backup and recovery
  •     Documentation
  •     Monitoring and alerting
  •     Basic SQL skills
TIBCO Components - Business Works, MFT, EMS, Hawk, RV, TRA, Plugins and Adapters.

TIBCO 6.x Installation Steps

TIBCO 6.x Product Download & Installation Procedure

There are two version of s/w available to download.

1. Community Edition or Developer Evaluation 
2. Enterprise Edition

How to download Community Edition or Developer Evaluation.?

Validity is 90 days only.
You can use your personal id or business id to download the community version.


Create your account with any mail id..


Search your required product and read the description clearly, before you use it.


Please check installation procedure mentioned under Enterprise Edition. OR download product installation guide also.

How to download Enterprise Edition.?

Enterprise edition is not free of cost, your client has to purchase the product.
Then, you can request your client to provide product download access to your mail id. 
Based on your client's license, you can see product catalogue to download the products.

Validity is depending on your license

Enter your mail id and password

In order to download, either you can browse, search or click on All Products A-Z


Upon product selection, select your version, platform

Before you download, ensure to read readme document. If your platform does not support, then choose alternate product version from drop down as shown above.


Ensure to read product installation guide thoroughly before you start it.

Double click on .exe file and specify Tibco Home directly. Then, click on next, next and then installation will be completed in 5 min (depending on your system performance)

Note: Ensure to select different directory / folder, when you are installing EMS.
For others like plug-ins (Salesforce, Twitter, SFTP..etc) select TIBCO_HOME directly where you installed BW.

*******************************************************************
Thanks for reading.

Thursday, September 28, 2023

EAR - Enterprise Deployment | BW 6.X

Before we proceed, please refer local deployment here. for more information on appspace, appnode creation, upload archive and deployment through CLI.

Now, we will see to how to do deployment through GUI (TIBCO Enterprise Administrator) - T.E.A

Step1: 
Stop T.E.A from services (Windows) before making config changes

Step2: 
Go to C:\tibco_inst_6.9.0\bw\6.9\config
Open bwagent.ini file in Nodepad++ and change bw.admin.mode = enterprise (default is local)
OR set it in the command prompt “BW_HOME\bin>bwadmin mode enterprise”.

Note: Ensure to take backup of these files


Open: bwagent_db.json file and make necessary changes as per Database.
Here, DB stores process related, admin related, monitoring related data.


Create DB tables manually, here my db is mysql. So, I have selected mysql files.
Create schema "bwadmindb" and user "bwuser" and provide full permission to the user "bwuser".




Update "bwagent_db.json" file as per your db details, EMS, TEA etc.


Start EMS Server



Start the BW Agent
Register the TEA Agent with BWAgent

In the BW admin command window, 

“bwadmin registerteaagent http://localhost:8777 or   machinename:portnumber”

this command will register the BW Agent with the TEA

Open TEA admin
http://localhost:8777



Create domain
Select Create domain. In the Create domain dialog box, enter the domain name and Choose the agent registered with the TEA server from the Agent drop-down.
Create AppSpace 
Enter into the domain you want and select the Appspace on the sidebar.
Click on “create Appspace”.
Enter the name, node and choose the Agent from the drop-down.


Create AppNode and select the create Appnode option.

In the dialog box “Appnode” dialog box,

Enter the name , node and choose the Agent
Type “localhost”in the http interface tab and choose the available port.
And start the Appspace.


Upload and Deploy application:
Upload the EAR in Tibco Enterprise Admin

In the Application Archives

Click the “Upload”option and browse the EAR to be uploaded.
Click on deploy and start the application.


Check application status, start it if not running


Open the application and check the processes. It will help the admin/app support guys to understand the high level flow.


Logs:
You can check application logs as shown below


Now, test the application from SOAP UI/ PostMan for RESTful applications.



That's all about Enterprise deployment.

Thanks for reading :-)

EAR - Local Deployment - BW 6.X

Here, I am going to explain how to create enterprise archive file (ear) and deploy it on local BW runtime.

Step 1: How to create an enterprise archive file (EAR)



If you have configured GIT in Business Studio, then you can check out code directly to Git Hub.

Step 2 : Below mentioned steps to be followed before deploying ear in local BW run-time.

Create domain:
Go to: C:\tibco_install_6\bw\6.5\bin>bwadmin.exe
Syntax: create domain <domain-name>

bwadmin[admin]> create domain tibco6x_domain

To see list of domains:

bwadmin[admin]> show domains


Create AppSpace:
Syntax: create appspace <appspace-name>

create appspace tibco6x_appspace

Create AppNode:
Syntax: create appnode <appnode_name>

create appnode orderAppNode1




All the folders are created as shown below


-bin folder basically contains .bat files to start and stop the node.
startBWAppNode.bat - to start the node
stopBWAppNode.bat - to stop the node

Open the startBWAppNode.bat (Run as Administrator), then you can see the process in Win(Task Manager)


Upload ear file
Syntax: upload "relative path of ear file"

Use forward slash (/) for Windows

C:/Users/Lenovo/Desktop/EAR/Demohello.application_1.0.0.ear

Deploy ear file

-show archives

To see list of archives files

Syntax: deploy <application name>

-show applications
Finally, start the application
Syntax: start <application-name> <version>


Test your application logic and check the logs and your desired output.

log folder - contains application log.


That's all about deployment, now you can test the application and check the logs.

******************************************************


Thanks for reading.


Monday, September 25, 2023

EMS - Server Setup | BW 6.X

EMS Driver Installation and Setup

Here, I am going to explain how to install ems driver and start EMS server and EMS adminstation.

First, go to 
C:\tibco_inst_6.9.0\bw\6.9\bin   > enter bwinstall.exe to see all the drivers and related information


 
Next, specify:
C:\tibco_inst_6.9.0\bw\6.9\bin>bwinstall ems-driver



Then, specify EMS server plugins and press ENTER
C:\tibco_ems_8.7.0\8.7\components\shared\1.0.0\plugins


Driver is installed successfully


Start EMS Server



Start EMS Admin

C:\tibco_ems_8.7.0\8.7\bin>tibemsadmin.exe


Create Queue Connection Factor:
create factory QueueConnectionFactory queue url=tcp://localhost:7222
Create Topic Connection Factor:
create factory TopicConnectionFactory topic url=tcp://localhost:7222

show factories
-> to show list of factories

Queue creation:
create queue bw6.queue
Topic creation:
create topic bw6.topic

Create JMS Connection and specify all required parameters and Test Connection.

That's all.

Thanks for reading :-)

XML Palette Activities

The XML palette provides activities for parsing XML strings into schemas and rendering schemas into XML strings Parse XML: Parse XML  is use...