About Me

About Me
Working with SOA technologies , implementing solution using IBM BPM , IBM Integration Designer,IBM WODM and IBM DataPower

About me

View Mahesh Dondeti's profile on LinkedIn

upcoming posts on IBM Bluemix,Devops,Worklight,Node js.

Tuesday 24 November 2015

Deleting Failed events in IBM BPM Advanced v8.5



                           Deleting Failed events in IBM BPM Advanced 

The Failed Event Manager can get filled up with thousands of failed events, especially in a development or test environment.  Using the admin console you can delete these events, however you are limited to delete a maximum of 500 per occurrence.  This limitation is to prevent the JVM from crashing by attempting to delete too many failed events at a time.  If you have thousands of events to delete- this can be difficult task to perform in the admin console.
wsadmin provides an API to determine the number of failed events and remove a configurable number of failed events in a single instance.  To automate the deletion of failed events I wrote a script which loops through the failed events and removes 100 events with each looping iteration.  This mitigates the risk of crashing the JVM and also allows you to run the script and multi-task while the script is running.  The script is pasted below for your use.



######################################################################################
# Description: Script used to remove failed events
# Author: Mahesh Dondeti  mdondetimss@gmail.com
# Date: 2015-11-24
# Version Info: 1.0
######################################################################################


######################################################################################
#
#   Important Usage information:
#
# To run the script- run the following command"
#  [WAS_PROFILE_HOME]/bin/wsadmin.sh -lang jython -f FailedEventsDelete.py
#
#  (ensure you include the fully qualified path of the FailedEventsDelete.py script)
#
#
######################################################################################
# lookup the failed event manager
objstr = AdminControl.completeObjectName('WebSphere:*,type=FailedEventManager')
obj = AdminControl.makeObjectName(objstr)

# count the overall number of failed events
fecount = AdminControl.invoke(objstr,"getFailedEventCount")
print "Failed event number before discarding: ", fecount

delnum = 100
fecount = int(fecount)

while (fecount > 0):
    if fecount < 100:
        delnum = fecount
        fecount = 0
    else:
        delnum = 100
        fecount = fecount - 100
     
    # get 100 failed events
    msglist = AdminControl.invoke_jmx(obj,'getAllFailedEvents',[delnum],['int'])

    # discard 100 events in single batch run
    print "Discarding ", delnum, " failed events"
    AdminControl.invoke_jmx(obj,'discardFailedEvents', [msglist],['java.util.List'])

# count the overall number of failed events
fecount2 = AdminControl.invoke(objstr,"getFailedEventCount")
print "Failed event number after discarding: ", fecount2
 ######################################################################################
Command Console:-


 
Note: Check SOAP port  number on  your server .


Resubmit:-

# lookup the failed event manager
objstr = AdminControl.completeObjectName('WebSphere:*,type=FailedEventManager')
obj = AdminControl.makeObjectName(objstr)

# count the overall number of failed events
fecount = AdminControl.invoke(objstr,"getFailedEventCount")
print "Failed event number before resubmit: ", fecount
delnum = 100
fecount = int(fecount)
while (fecount > 0):
    if fecount < 100:
        delnum = fecount
        fecount = 0
    else:
        delnum = 100
        fecount = fecount - 100 
    # get 100 failed events
    msglist = AdminControl.invoke_jmx(obj,'getAllFailedEvents',[delnum],['int'])
    # discard 100 events in single batch run
    print "Resubmiting ", delnum, " failed events"
    AdminControl.invoke_jmx(obj,'resubmitFailedEvents', [msglist],['java.util.List'])
# count the overall number of failed events
fecount2 = AdminControl.invoke(objstr,"getFailedEventCount")
print "Failed event number after Resubmiting: ", fecount2

I hope this post helps you. So far this is my best effort to explain. Please correct me if I do anything wrong.


Please share your valuable suggestions and feedback to my mail id"mdondetisbit@gmail.com" to improve myself.

Please post any issues/query’s related to BPM,WODM and DATAPOWER  to "mdondetisbit@gmail.com  

Monday 23 November 2015

Technologies you should learn in next year



                      Technologies you should learn

Technology moves fast! If you're stuck in your cube editing old coding,EAI/SOA integrations you probably live in an area of the country where there's only one employer. Most of us have to figure out what we need to learn, or at least become acquainted with, just to keep our careers on track.
Cloud Integration
The cloud is also transforming the landscape for integration. In the past, Application Integration, Data Integration, and B2B Integration were considered separate disciplines that required custom technologies and skills. Today, a new pattern of integration has emerged that cuts across these disciplines. Using this pattern, a business can convert their APIs and Data into gold, by rapidly externalizing system of record data and enriching it with real-time contextual data from mobile and IoT applications. The resulting Data sets and APIs provide a source for new engaging applications. I like to think that these new apps behave more like Uber and AirBnB versus the insurance companies that say in 15 mins they can save you 15%. The following integration patterns let’s you create apps that act in the “now”.
Connect clouds securely together
Shape data for analysis
Sync data to be closer to users
Expose APIs and data to downstream consumers
Compose an app or service

IBM Blue mix:
In 2014, Bluemix was launched with the tagline, “A platform where developers can act like kids in a sandbox.” As a developer myself, I love having a great place to play with code. But a sandbox is more fun with friends, so let’s invite integrations developers to the party.
Bluemix already has some powerful capabilities for developers
  • MQ Lite
  • Liberty Java
  • Node.js
  • Mongo DB
  • Devops
  • Docker
Node.js. I'm not saying you should become a JavaScript developer and forgot  all else. I'm saying you should have a taste of event-based, non blocking systems like Node.js and at least one dynamic language like JavaScript on the server. You could do other, but you'd miss that event-based, non blocking part. There are reasons to really dislike Node.js (it's single threaded), but there's plenty to love as well. A lot of serious people use Node.js, which has a vibrant community and wide industry support -- everyone from Microsoft to Cloud bees to VMware and beyond.
Git Repository :-Look, if you don't know Git and haven't set up a GitHub account or two, you're late to the effective and well-known developer party. You really should've learned it last year. Of course, if you're still using ClearCase,SVN  in your current position, you should either be getting serious hazard pay or you should quit and get a job where you don't have to use Clear Case.
 Hadoop. If you learn nothing else this year, You need to know what MapReduce is and how to use it. Frankly, by any measure of buzz, popularity, or demand, Hadoop dominates the market in newer technologies.