google ads

Friday, December 2, 2011

How to write Hawk Rule to monitor all dependent systems for an application

My client has asked to monitor end-to-end systems for an application. I think of writing a hawk rule for the same. This hawk rule would monitor front-end web servers, middle systems like web services, ems servers, back end databases and would send out alert/email when any of the system is going in danger zone.

The fundamental question would be, how do I write a rule to monitor two data sources using one rule?

Thursday, December 1, 2011

Unlocking iProcess Procedures



delete from ipeadmin.procedure_lock

delete from [TibIPE2].[ipeadmin].[pm_objects_lock]

Kill a login session on Windows 2003 server


If maximum connection is reached for some server, we can kill the active login session.

1)      Go to any of the application server.

2)      Run - > “tsadmin” command

3)      Go to All Listed Servers under the <domain> and right click on that and select “Connect to computer”

4)      Connect to the computer where you’re not able to login.

As per axis policy, MAX of 2 users are allowed to login on the server.

Pick the victim J and Disconnect the session.

Load Balanced iProcess Engine Restart Sequence


iProcess Engine Restart Sequence:

Sequence should be
è Shut down SECONDARY (secondary_host)
è Wait till it’s entirely shutdown (swsvrmgr status –v    show all STOPPED for MACHINE ID 2)
è Shut down PRIMARY (primary_host)
è Wait till it’s entirely shutdown (swsvrmgr status –v    show all STOPPED for MACHINE ID 1)
è Bring up PRIMARY (primary_host)
è Wait till it’s entirely up (swsvrmgr status –v    show all RUNNING for MACHINE ID 1)
è Bring up SECONDARY (secondary_host)

Wednesday, November 9, 2011

A TIBCO BW project has 2 EARs - need to hide unused global variables

We have one TIBCO BW project, creating two separate Enterprise Archives (EARs).

We have a set of global variables defined for the whole project. There are some common global variables for both the project. Then we have groups of global variables for each of the respective archives.

When I am creating the EAR for one of the project, I do not want to include the global variables defined for the other archive.

What are my options?

i) I can divide the project into two separate projects, and then clean up the global variables -- but for some reason, I do not want it. I want the project to have all the related processes defined.

ii) I can make the group of global variables un-editable (by deselecting the 'deployment' option in global variable), but I do not want it that way either.

Any other options?


Wednesday, November 2, 2011

iProcess Jetty Server Log4j configuration


The default log file for Jetty Server in-built with iProcess Engine 11.x does not come with Rolling File setup for log files, and hence the log file can grow to a huge size depending on your configuration and choice of debug, warn settings.

Following are the lines that you can use in log4j.properties inside 'eaijava' folder, and retstart jetty server, so that the log files would be rolled over after it reaches 5 MB.

log4j.rootLogger=warn, EAIJAVA

log4j.appender.EAIJAVA=org.apache.log4j.RollingFileAppender
log4j.appender.EAIJAVA.Append=true

log4j.appender.EAIJAVA.File=C:/swserver/dev_nod2/logs/eaijava.log

log4j.appender.EAIJAVA.MaxFileSize=5MB
# Keep one backup file
log4j.appender.EAIJAVA.MaxBackupIndex=5


log4j.appender.EAIJAVA.layout=org.apache.log4j.PatternLayout
log4j.appender.EAIJAVA.layout.ConversionPattern=%d [%-5p]%x %c{1} - %m%n%n
TIBCO.SingleLogFile=true

Monday, October 31, 2011

iProcess Quick Restart


Check the status of iProcess Engine, and Restart Iprocess Engine

i)                    Login to primary machine (XYZ02)
ii)                   Run ‘swadm show_servers’ to list all the primary and secondary machines.



The above screenshot shows, the list of servers for DEV environment.


iii)                 Now, remember, we have to stop all secondary machines processes before stopping primary machine processes.
iv)                 Login to secondary machine, stop iProcess Engine Sentinel from ‘Services’, Stop the Jetty Server from ‘Services’.




The above screenshot shows the status of processes in all machines. In the machine ID = 2, we could see that all the processes are stopped.



According to our iProcess Architecture setup, all applications needs to connect to the director running in secondary machine (which is machine id = 2). Hence the director process has to run in machine = 2. But in order to run the directory, the SPO service should be running in machine = 2, and SPO automatically brings all other processes up. Hence we need to make sure SPO and DIRECTOR in machine = 2 are up and running.

When I logged into the secondary machine, I observed an issue that the iProcess Engine processes went down for some reason, as shown in the above screenshot. This might be due to some issue with the operating system/machine instability. We should ideally check all the logs of the services to get to the root cause of this issue.
v)                  In the secondary machine, run Task Manager and kill the pvcmgr.exe and java.exe if they are still running.




vi)                 Go back to primary, and repeat (iv) and (v)



vii)               Now, start the iProcess Engine and Jetty Service from Primary machine ‘Services’.




viii)              Check the status of iprocess engine services using swsvrmgr status –v from either primary or secondary machine.




ix)                 After the primary services shows RUNNING status, run the iProcess Engine and Jetty Server in secondary machine from ‘Services’.
Again run swsvrmgr.exe status –v, to make sure all processes are up and running fine.






Saturday, October 29, 2011

Log4J settings for TIBCO BW applications

TIBCO BW already comes with Log4J enabled. We need to change the service instance settings to setup the rollover settings for the applications.

Following screenshot shows, application configuration for TIBCO BW application. And we need to select the "Service Instance" from this configuration to set up the log settings.

Diagram 1:









The following screenshot show the application log setting for TIBCO BW application service instance. Here you can change the default values of maximum file size for the log file, and log file count for rolling over. If you want 10 files to be kept as archive, you can set here the max log file count = 10.

Diagram 2:


Thursday, October 27, 2011

TIBCO BW SOAP tracing


################## SOAP tracing ######################## REMOVE ASAP ###############
Trace.JC.*=true
Trace.Engine=true
Trace.Debug.*=true
java.property.com.tibco.plugin.soap.trace.inbound=true
java.property.com.tibco.plugin.soap.trace.outbound=true
java.property.com.tibco.plugin.soap.trace.filename=C:/soaptrace.txt
java.property.com.tibco.plugin.soap.trace.pretty=true

Saturday, October 22, 2011

Decrypting password from TIBCO global variable




Use the following java code in our java code palette and it will decrypt the password global variable. 

import the package com.tibco.pe.plugin.PluginProperties in java code explicitly.

String VarName=PluginProperties.getProperty("tibco.clientVar.ProjectName/Connections/JDBC_Connections/Password");

System.out.println (" GV password "+ VarName);


Where  <ProjectName>/Connections/JDBC_Connections/Password is Global variable which is password datatype.

The password will be printed in the System Console. If you want to print it as output, you have to tweak the code little bit.

Happy BW coding.

-Rajendra

Thursday, October 6, 2011

Adding activities inside the inner group of TIBCO Business Works process.

When you try to add an activity inside the first group, TIBCO designer works as expected. You can just an activity from the palettes outside the group, then drag-n-drop it inside the group, and it simply get added into the group.

But if you have multiple inner groups, the it becomes little tricky. To give an example, if you have two groups, one inside the another one, e.g. group "inner group" is inside group "outer group", and you want to add an activity inside group "inner group", then if you try to drag-n-drop the activity inside the group "inner group", it would ask you if you want to add the activity in group "outer group", which is the parent group. But since your intention is to add the activity inside group "inner group", you do not get a simple answer for this.

Many a times, what people do is, remove the groups by un-grouping all the activities, and then adding the desired activity, and then regrouping again. But that would remove all your mappings for the group, and transitions from start of the group and to the end of the group activity. The code TIBCO BW project code gets messed up. And that is not desired. It takes too much more time to get back what you had before removing the groups.

The trick is, drag-n-drop the activity inside the inner group "inner group", and TIBCO Designer will ask the question if you want to add the activity in group "outer group", select 'No' on this option, and then it will pop-up another question, if you want to add the activity in group "inner group", now you can select 'Yes' to add that activity into the inner group "inner group".


Diagram 1: The above diagram shows an activity that we are about to add into the inside group "inner group".


Diagram 2: The above diagram shows the first question that pops up asking if we want to add the activity into parent group "outer group".


Diagram 3: The above diagram shows the second question that pops up asking if we want to add the activity into the inner group "inner group".

Diagram 4: The above screen shows, the activity is added to the inner group.



Diagram 5: Now you can add transitions to the end of the group activity.

This is a simple trick, and I found it not so intuitive and hence I wanted to share with you. I hope it has been helpful for you.

Happy TIBCO Business Works process designing. Look forward to my next blog on the common mistakes people do, while configuring the JDBC palettes, which you should not repeat.

Cheers.

Tuesday, September 27, 2011

Clean up unused global variables in TIBCO Business Works Project


DISCLAIMER: The screenshot of projects shown are from the default sample project that comes along with TIBCO installation, and they are TIBCO's proprietary codes. Only the screenshots are reproduced here for educational purpose. Please report me at do.tibco@gmail.com for any unintentional usage of copyright violations, and I would take action as soon as possible to remove such content.

Objective:
A tip on how to use the TIBCO Designer to find the unused global variables and remove them from your project. This will help you keep your project clean, and clutter free. And it will help the deployment process easy.
Brief description of the issue:
I have come across this issue so many times, that I could blindly say that about 90% of TIBCO applications developed today, would having unused global variables, after the development cycle.
If you are a TIBCO Administrator, and when you are requested to deploy an TIBCO BW application, you will come across the request for setting the global variables properly. And then when you go to change the global variables, you will find that there are too many unused global variables for which, you are requested to set dummy values, or leave it blank or even set a value like 'Not Applicable'.
If you are doing scripted deployment using 'AppManage', this issue might not surface at deployment administrator's level, but it will go down one level to developers, who has given you the configuration files with these global variables. When you ask the developer, you will find that it is not that he kept them intentionally, but he is also helpless or ignorant or does not have so much time to go through each and every global variable, and processes and activities, and figure out what is really used or not used. Also, he will say that, he has taken a TIBCO project template and that already had all these global variables, and he did not know what they are for, and how that should be used, so he just left it that way.
If you are an developer who is not really experienced or does not have time, you could be doing this unintentionally.
Solution to this issue:
The developer while working in TIBCO Designer can verify all the global variables usage, and make sure all they are really used in the project except the default global variables which TIBCO Designer creates. The easiest way to verify all the global variables are used, is to use a tool supplied within TIBCO Designer. Its called "Find Global Variable Usages" under the Tools menu.
Let's take a look at a global variable that we want to find where it has been used. The following screenshot shows a global variable that we want to search. In the screenshot below, we are interested to find all the usages for global variable "BW_approval_file". We have high lighted the global variable.


Screenshot 1: Show the global variable "BW_approval_file".
In the following screenshot let's open the "Find Global Variable Usages" tool:


Screenshot 2: Show the Tools -> Find Global Variable Usages menu
The next step would be to choose the global variable we are interested to search in this "Find Global Variable Usages" tool.


Screenshot 3: Choose the global variable
Next, click on "Find" button and it will search all occurring of "BW_approval_file" global variable. The search result is shown in the following diagram.

Screenshot 4: Search results of global variable "BW_approval_file".
In next step, you would click on any of the search results, and it would automatically show you that occurring of global variable usage high lighting the activity using it.

Screenshot 5: Show the activity which is using the global variable. This same process applies for processes as well. In the search results, you might have observed that it lists both the processes and activities which are using that global variable, and if you click at the process, it would high light the process, where as if you click on the activity, it will high the activity inside the process, which is what we generally look for.
Now before I conclude, I want to show another screenshot of, how the search results would look like, when there are no matching global variables usage found.

Screenshot 6: No matches found.
This is the key solution point. When you see that a global variable usage has 'No Matches Found', you need to decide if this global variable is something that a user (architect while developing the project template, or a designer/developer added while developing the process or if this was something created by Designer by default), and then delete that global variable if that is really not intended to be used in future.
Conclusion:
I hope this blog has been a useful tip for you. In the next blog I would like to show another tip on how to add an activity inside an inner group.