Search This Blog

Sunday, July 2, 2017

sanity check scripts # Top priority component in the success of overall software project # Most Ignored hero


Success of any software project lies into three areas

Development
Quality Assurance + Delivery
Operations

To assure the continous operation Projects do have state of the art 24/7 monitoring system, for Quality Assurance + Delivery Projects spend un-countable hours in CI-CD ,Test Automation, Regression Tests and many more. For Development we have Tools to get the functionality translated into Technical Artifacts. But one component which can smoothen the transition of Developed code till Production is often missed.

Sanity Check scripts save huge amount of Time if they are developed and maintained in the initial phase of any project. And they continue to save time in each area as we mentioned above.

In a SOA/BPM Project where Architecture is disctributed among layers, varous interfaces talking to different backend applications, technology stack serving different purpose (e.g. BE, BPM, BW, Spotfire, EMS) and on top of that this Architecture has to be scalable. No way the requirements may not find their way at enough speed to land into production even small bug fix may take good amount of time to land into target environment.

They help to check the Technical Readiness of your underlying stack before you beginn with any Test and save great amount of Time, even if you want to deploy a code into environments otherwise n number of hours can be vested to find the root cause of a problem
Absence of sanity can add more frustation to Developers and Test team to do their da to day job, if they found same issue is occuring 10 number of times which can be detected far before wasting whole day to figure out what went wrong.

Sanity checking can be on very high level divided into two areas:

Technical readiness of the Stack
Functional readiness of the Stack.

In Technical readiness following areas can be checked before running tests.

1. Filesystem check:
  1. Sufficien space available or not
  2. Expected mounts and partitions available or not
  3. Can the Unix user write or ftp to filesystem or not
2. Database Availability:
  1. TNS Ping
  2. Tablespace availibility
  3. Necessary database objects exists or not
3. Unix/Windows level process status:
  1. Necessary applications are running or not
  2. Check for the ghost processes
4. JMS and Application server availibility:
  1. Needed JMS destinations are available or not
  2. Needed Application Servers can be reached or not.
5. Necessary backend applications are available or not:
  1. Making test Rest or SOAP calls
Above mentioned minimum technical readiness criterias can be checked. They are not only usefull before running functional tests but also before doing the Deployment or Rollout of the environment.

This can be easily automated by using the combination of Ant, Shell and Python.

Functional Readiness:

In this area we need to make sure if the data is available or not in the backend before we run tests. In the absence of data Tests fails and it takes time to figure out what went wrong. Every project has a different criteria for this area but all of them need the availability of data before running even a smoke test. This check can be easily fulfilled by using offered webservices by the stack and in case if data is missing data can be created.



Sunday, May 21, 2017

Milestone workflow pattern using AMX BPM


WHAT?

 The Milestone workflow pattern is a BPM Process behaviour in which an activity is only enebled when the process instance is reached in specific state (milestone), in case process instance progresses beyond this state, then the task is no more enabled.

 An interesting graphical animation, simulating the behaviour of such use case can be found here.

WHY?


 There are lot of real life industry use cases which needs to have this pattern implemented in TIBCO AMX BPM, which is preferred BPM Product by many clients today. We can consider an example BPM Process use case in Aviation Industry which has to do with Flight Management. 

 In this use case there is requirement that check-in's are allowed only during specific time, i.e. once a process instance reached certain milestone, check-in's should be allowed and prior to 45 minutes of closing of gates



HOW?


 AMX BPM Provides lot of implementation alternatives to implement this use case using TIBCO Business Studio. However to make this use case and its implementation understandable, I will try keep the suggested solution as simple as possible.

 In the simplest approach as shown below in the Diagram:

  1. A signal can be thrown to start check-ins.
  2. As soon this signal is caught before allowing check-ins a Time comparison should be done if check-ins should be allowed are not. Based on the results process instances continues execution. 






Note: In case if you are intrested in actual sample implementation or you have a problem implementing or even you feel there is better approach for the beginners then it would be helpful if you can drop a message. 


We strongly believe that collaboration makes internet better place.

Monday, November 28, 2016

Handling Time zone in your SOA/BPM architecture.

WHAT?


Need of handling Time zone correctly in your SOA/BPM architecture.


WHY?


There can be many reasons why this problem needs to be addressed before it comes back as a serious Production defect. Few of the commonly occurring situations are like you need to perform manipulations on the date times in your application and you might need to consider Leap months OR your applications are distributed across different geographical location e.g. End users using GUI in APAC region and SOA/BPM Stack is in Europe and Backend/Legacy application based in America OR more important your application needs to cater for Winter/Summer time zone changes in case of daylight savings OR many known/unknown reasons. There can endless scenarios happen when you deal with date time in your application stack.


Also using correct time zone offset doesn’t solves the all problems completely as in many cases time zone offset is changed based on geographic condition. Hence for sure it makes sense to use open source libraries which hides all this complexities and provides APIs for Developers so that they can focus on building robust application.

If you are still not convinced that using 3rd party library for dealing with date times is a good option then this video is recommended for you 


HOW?


When talking about application development using TIBCO Products based on the Industry experience following approach is recommended however for the implementation in other technology is also more or less same.
  1. Your application will need to invoke APIs of Joda-Time http://www.joda.org/joda-time/ in your BW, BPM implementation, hence you will need to integrate Joda-Time libraries inside your BW Application.
  2. There are many ways one can integrate Joda-Time libraries in the code below is an example for beginners.
  3. When your application is dealing with timestamp in case of :
    • Creating new server timestamp, this will give you correct timezone based on the date e.g. in case your code want  to know timezone offset for the date in summer when it gets executed in winter. 
    • Comparing, Manipulating timestamps in the different timezone.

        

Integrating Joda-Time in TIBCO BusinessWorks:

  1. Include the jars in the Alias Library.
  2. Use Java Code Activity to translate the date time to correct target timezone. Now here you can make the code more intelligent to handle it correctly and you can use different APIs given by Joda.

Integrating Joda-Time in TIBCO AMX BPM:


There are more options available in AMX BPM. For beginners they can expose the functionality which was created in BusinessWorks and can expose them as a web service to use in a AMX BPM or they can expose the same java code in AMX BPM as a service or even using AMX Mediation Component a virtualized service can be created. The new versions of tpcl that comes shipped along with TIBCO BusinessStudio already contains Joda library.

Note: In case if you are intrested in actual sample implementation or you have a problem implementing or even you feel there is better approach for the beginners then it would be helpful if you can drop a message. We strongly believe that collaboration makes internet better place.