Friday, December 21, 2012

No Shortcuts for Success

This photograph inspired me a lot and I see this picture daily before I go to bed.

There is no shortcut for success. Attitude and Hard Work will get you to Success.

Tuesday, December 11, 2012

Remove Custom Service from Sterling Integrator

If we need to uninstall a custom service in IBM B2B Sterling Integrator follow the blow steps. Please note you have to clean from File system and from database as well.

File System Cleanup


C:\Sirish\SterlingIntegrator\install\installed_data\Your Custom Service Name directory.

C:\Sirish\SterlingIntegrator\install\jar\
Your Custom Service Name directory.

C:\Sirish\SterlingIntegrator\install\properties\lang\en\Your Custom Service Name_en.properties

C:\Sirish\SterlingIntegrator\install\properties\services\Your Custom Service Name.xml


Database Cleanup


select * from service_def_guid where current_id = 461;

select * from service_def_parms where def_id = 461

select * from service_def where def_lookup_name like '%com.mypackage%';  

Note: 

Please check def_look_up name in service instance page under Development --> Services --> Installation/Setup  

delete from service_def_guid where current_id = 461;

delete from service_def where def_id = 461;

delete from service_def_parms where def_id = 461;

commit;

Note: 461 is my CS unique Id in a database.

Monday, December 10, 2012

IBM B2B Sterling Integrator - Oracle Database User and Table Space creation Scripts

Below process explains how to create Oracle database for Sterling Integrator with all required user permissions.

1. Create a new database using Oracle Database Configuration Assist for Sterling Integrator with all required Initilation perameters. Initilation perameters are very critical so refer installation document very carefully while creating new database.

2. Log on to Database as a Power User (system or sys as sysdba) and create new table space,
       CREATE TABLESPACE SI_TABLESPACE DATAFILE
       '/u01/app/sterling/SI52.DBF' SIZE 2000M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED
        LOGGING
        ONLINE
        PERMANENT
        EXTENT MANAGEMENT LOCAL AUTOALLOCATE
        BLOCKSIZE 8K
        SEGMENT SPACE MANAGEMENT AUTO;

3. Log on to Database as a Power User (system or sys as sysdba) and create new user for Sterling Integrator Database in this case the user is "Sterling". Excute below scripts one by one.

    DROP USER STERLING CASCADE; --Not Required This Statement.
    CREATE USER STERLING IDENTIFIED BY STERLING DEFAULT TABLESPACE SI_TABLESPACE TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK;
    GRANT EXP_FULL_DATABASE TO STERLING;
    GRANT IMP_FULL_DATABASE TO STERLING;
    GRANT RESOURCE TO STERLING;
    GRANT CONNECT TO STERLING;
    ALTER USER STERLING DEFAULT ROLE ALL;
    GRANT UNLIMITED TABLESPACE TO STERLING;
    GRANT DBA TO STERLING;
    GRANT ALTER SESSION TO STERLING;
    GRANT CREATE PROCEDURE TO STERLING;
    GRANT CREATE SEQUENCE TO STERLING;
    GRANT CREATE SESSION TO STERLING;
    GRANT CREATE SYNONYM TO STERLING;
    GRANT CREATE TABLE TO STERLING;
    GRANT CREATE VIEW TO STERLING;
    GRANT EXECUTE ANY PROCEDURE TO STERLING;
    GRANT INSERT ANY TABLE TO STERLING;
    GRANT UPDATE ANY TABLE TO STERLING;
    GRANT SELECT ANY TABLE TO STERLING;
    GRANT SELECT_CATALOG_ROLE TO STERLING;
    ALTER USER STERLING DEFAULT ROLE "CONNECT", "RESOURCE",SELECT_CATALOG_ROLE;
    GRANT CREATE TRIGGER TO STERLING;
    GRANT CREATE TYPE TO STERLING;
    GRANT EXECUTE ANY TYPE TO STERLING;
    GRANT SELECT ANY TABLE TO STERLING;
    GRANT SELECT ANY DICTIONARY TO STERLING;

4. Connect to Database as new user Sterling just to make sure you don't have any issues while connecting or accessing Sterling Integrator database.

5. You can proceed with the SI installations :)

Wednesday, December 5, 2012

JMS Clients

JMS Clients

  1. http://queuemanager.nl/offline-installation/  
  2. Hermes is an interactive JMS browser and administration tool. We can Download JNLP file from http://www.hermesjms.com/. Hermes is an interactive JMS browser (Useful with JBoss)

Wednesday, November 7, 2012

IBM Support Portal How-to videos on YouTube

IBM Electronic Support Channel
 









Sterling Integrator - Database to XML Mapping

Here is the process for oracle and I am sure it's gonna be same for other databases as well,

1. Install Oracle Client Software. (Not Server).
2. Put database server entry in tnsnames.ora file.
3. Go to Control Panel where you installed Map editor create System DSN. When you click on
   Add you should see Oracle client there. (If you installed oracle client property)
4. Provide required database credentials and complete DNS creations.
5. Bring up your map editor create new map choose data format as SQL (Database
    Connectivity).
6. Go to Source Side properties in map editor go to Data Source tab select your DNS name and
    it will list all your tables and when you select table you can auto generate fields.

From here regular mapping. Be careful while editing tnsnames.ora.

Sunday, November 4, 2012

Tuesday, October 2, 2012

Override Persistence Level in Business Process

Here is how we can override persistence level in Workflow dynamically,

<assign to="WF_RUNTIME_OVERRIDE_PERSISTENCE_LEVEL">PERSISTENCE_FULL</assign>

<assign to="WF_RUNTIME_OVERRIDE_PERSISTENCE_LEVEL">PERSISTENCE_MINIMAL</assign>

Friday, September 28, 2012

Append two Arrays in Java

Still need to optimize this method but this works with out any issues,

public String[] appendArrays(String[] arrayToAdd, String[] arrayFromAdd) {
        List<String> list = new ArrayList<String>(Arrays.asList(arrayToAdd));
        if (arrayFromAdd != null && arrayFromAdd.length > 0) {
            list.addAll(Arrays.asList(arrayFromAdd));
        } else {
            arrayFromAdd = new String[]{"N/A"};
            list.addAll(Arrays.asList(arrayFromAdd));
        }
        return list.toArray(new String[list.size()]);
    }

   



Convert ResultSet to Array in Java

public String[] convertRStoArray(ResultSet resultSet, boolean closeResultSet) {
        String[] arrayofDataColumns = null;
        Map columnsMap = new HashMap();
        int columns = 0;
        try {
            List<String> record = new ArrayList<String>();
            while (resultSet.next()) {
                arrayofDataColumns = new String[resultSet.getMetaData().getColumnCount()];
                columns = (resultSet.getMetaData()).getColumnCount();
                String value = null;
                for (int i = 1; i <= columns; i++) {
                    value = resultSet.getString(i);
                    record.add(value);
                    if (columnsMap.containsKey(i)) {
                        if (value != null && !value.equals("")) {

                            if (columnsMap.get(i) != null && !columnsMap.get(i).equals("") && !columnsMap.get(i).equals(value)) {
                                value = columnsMap.get(i) + "|" + value;
                                columnsMap.put(i, value);
                            }
                        }
                    } else {
                        columnsMap.put(i, value);
                    }
                }
                Object[] keys = columnsMap.keySet().toArray();
                for (int ii = 0; ii < keys.length; ii++) {
                    arrayofDataColumns[ii] = (String) columnsMap.get(ii + 1);
                }
            }

        } catch (Exception e) {
            logger.log(Level.SEVERE, "Got the exception in convertRStoArray:" + e.getMessage());
        } finally {
            if (closeResultSet)
                closeResultSet(resultSet);
        }
        return arrayofDataColumns;
    }
    



Saturday, September 22, 2012

IBM Sterling B2B Integrator Code List Deployment through Command Prompt

C:\Sirish\SterlingIntegrator\install\tp_import>import.cmd -update -passphrase passphrase -input C:\Sirish\bpml_coding\Sirish.xml

This is the format requires to import from command prompt.

Sirish.xml

<?xml version="1.0" encoding="UTF-8"?>
<SI_RESOURCES xmlns="http://www.stercomm.com/SI/SI_IE_Resources" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" GISVersion="6000" FrameworkVersion="2">
            <CODE_LISTS>
                        <CODE_LIST_XREF>
                                    <LIST_NAME>Sirish</LIST_NAME>
                                    <SENDER_ID/>
                                    <RECEIVER_ID/>
                                    <LIST_VERSION>2</LIST_VERSION>
                                    <SIResourceDefaultVersion>true</SIResourceDefaultVersion>
                                    <STATUS>1</STATUS>
                                    <COMMENTS/>
                                    <USERNAME>Sirish Reddy Gongal Reddy</USERNAME>
                                    <CREATE_DATE>2012-09-21 14:43:16.087</CREATE_DATE>
                                    <CODE_LIST_XREF_ITEMS>
                                                <CODE_LIST_XREF_ITEM>
                                                            <SENDER_ITEM>Sirish Reddy</SENDER_ITEM>
                                                            <RECEIVER_ITEM>Gongal Reddy</RECEIVER_ITEM>
                                                            <TEXT1>Target System - One</TEXT1>
                                                            <TEXT2>Target System - Two</TEXT2>
                                                            <TEXT3>Target System - 3</TEXT3>
                                                            <TEXT4>Target System - 4</TEXT4>
                                                            <TEXT5>Target System - 5</TEXT5>
                                                            <TEXT6>Target System - 6</TEXT6>
                                                            <TEXT7>Target System - 7</TEXT7>
                                                            <TEXT8>Target System - Eight</TEXT8>
                                                            <TEXT9>Target System - Nine</TEXT9>
                                                            <DESCRIPTION>Just Testing the Auto Import</DESCRIPTION>
                                                </CODE_LIST_XREF_ITEM>
                                    </CODE_LIST_XREF_ITEMS>
                        </CODE_LIST_XREF>
            </CODE_LISTS>

</SI_RESOURCES>

Tuesday, September 11, 2012

Offset for given Time Zone

import java.util.TimeZone;

public String getTimeZoneOffSet(String timeZoneID) {
        TimeZone tz = TimeZone.getTimeZone(timeZoneID);
        int rawOffset = tz.getRawOffset();
        int hour = rawOffset / (60 * 60 * 1000);
        int minute = Math.abs(rawOffset / (60 * 1000)) % 60;
        return hour + ":" + minute;
    }

Test:
 tc.getTimeZoneOffSet("America/New_York")); This returns Offset for NY -->-5:0

Using Calendar Class

import java.util.Calendar;

public int getOffsetForTimeZone(String timeZoneId) {
        int a;
        Calendar calendar = new GregorianCalendar();
        TimeZone timeZ = calendar.getTimeZone();
        timeZ = timeZ.getTimeZone(timeZoneId);
        a = (int) ((timeZ.getRawOffset()) * (2.77777778 / 10000000));
        return a;
    }


Thursday, September 6, 2012

Graphical Process Modeler not opening in Sterling Integrator

Most of the times we get the below exception while opening Graphical Process modeler because the IP address in the below URL is not correct. Sterling Integrator host address and GMP host address different then we need to fix the host name and make it common.

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://192.168.235.76:15000/gbm/pmodeler/ProcessModeler.jnlp
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

How to Fix:

       1. Stop Sterling Integrator.
       2. <SI_Install>/bin folder and execute the below commnad.
       3. <SI_Install>/bin> patchJNLP.cmd <put your hostname here>
       4. Start the Sterling Integrator and go to Business Process Manager and Run Graphical Process Modeler. (Don't use old jnlp file and download fresh copy)



Tuesday, August 14, 2012

Status Report from Service Execution in Sterling Integrator

<input message="Xin">
<assign to="." from="*"></assign>
<assign to="." from="Status_Rpt('Report')"></assign>
</input>

DOMToDoc can also be used in conjunction with the Status_Rpt function to write the information to a document instead of process data.
    

Monday, July 30, 2012

Installing IBM Sterling B2B Integrator on Windows 7

Needs to be updated matrix.properties with the value for Windows 7 as 7 and for Windows XP as XP and go for silent installation. Avoid using InstallWizard you should be good. It worked perfectly on my Windows 7 PC. 

Friday, April 20, 2012

opencsv - Flat File Parser

I was looking for a open source flat file parser in java and found opencsv http://opencsv.sourceforge.net/. A very clean and easy to use java utility. Would recommend this for any one who looking for flat file parser.

Passing Primary Document to Child Business Process

Using the below assign statement we can pass PrimayDocument and other required value from process data to chaild business process which is going to be executed in Async,

<assign to="message_to_child" from="PrimaryDocument | /ProcessData/Xpath1/text() | /ProcessData/Xpath2/text()"/>

<operation>
    Invoke Business process in Async mode from here.
</operation>

Monday, March 26, 2012

Format & Split Huge XML file in Linux

"xmllint"  is a command used to format and split huge XML files.

Format:

xmllint --format <Input.xml> >>output.xml

Tuesday, January 17, 2012

35 Tips To Make This Your Best Year Yet by Robin Sharma




I'm sitting on an airplane thinking about what the best performers and most successful people do to continually outperform everyone around them.

As we enter what I hope will be the single best year of your life yet, I've come up with 35 Tips that I invite you to concentrate on. Share these tips, reflect on then, post them where you can see them - and allow them to infuse your mindset:

  1. Remember that the quality of your life is determined by the quality of your thoughts.
  2. Keep the promises you make to others - and to yourself. 
  3. The project that most scares you is the project you need to do first. 
  4. Small daily improvements are the key to staggering long-term results. 
  5. Stop being busy being busy. This New Year, clean out the distractions from your work+life and devote to a monomaniacal focus on the few things that matter.
  6. Read "The War of Art". 
  7. Watch "The Fighter". 
  8. In a world where technology is causing some of us to forget how to act human, become the politest person you know. 
  9. Remember that all great ideas were first ridiculed. 
  10. Remember that critics are dreamers gone scared. 
  11. Be "Apple-Like" in your obsession with getting the details right. 
  12. Take 60 minutes every weekend to craft a blueprint for the coming seven days. As Saul Bellow once said: "A plan relieves you of the torment of choice."
  13. Release your need to be liked this New Year. You can't be a visionary if you long to be liked. 
  14. Disrupt or be disrupted. 
  15. Hire a personal trainer to get you into the best shape of your life. Superstars focus on the value they receive versus the cost of the service.
  16. Give your teammates, customers and family one of the greatest gifts of all: the gift of your attention (and presence).
  17. Every morning ask yourself: "How may I best serve the most people?" 
  18. Every night ask yourself: "What 5 good things happened to me this day?" 
  19. Don't waste your most valuable hours (the morning) doing low value work. 
  20. Leave every project you touch at work better than you found it. 
  21. Your job is not just to work. Your job is to leave a trail of leaders behind you. 
  22. A job is not "just a job". Every job is a gorgeous vehicle to express your gifts and talents - and to model exceptionalism for all around you.
  23. Fears unfaced become your limits. 
  24. Get up at 5 am and take 60 minutes to prepare your mind, body, emotions and spirit to be remarkable during the hours that follow. Being a superstar is not the domain of the gifted but the prepared.
  25. Write love letters to your family. 
  26. Smile at strangers. 
  27. Drink more water. 
  28. Keep a journal. Your life's story is worth recording. 
  29. Do more than you're paid to do and do work that leaves your teammates breathless. 
  30. Leave your ego at the door every morning. 
  31. Set 5 daily goals every morning. These small wins will lead to nearly 2000 little victories by the end of the year.
  32. Say "please" and "thank you". 
  33. Remember the secret to happiness is doing work that matters and being an instrument of service. 
  34. Don't be the richest person in the graveyard. Health is wealth. 
  35. Life's short. The greatest risk is risk-less living. And settling for average.
I genuinely wish you the best year of your life. 

Stay Great.