Monday, December 21, 2015

Enable External Purge in Sterling Integrator

Starting an External Purge

Procedure

  1. If you have a cluster installation, make sure that you are not running the external purge on another node of the cluster. If you are running the external purge on more than one node, it will cause database locks. For more information, see Monitoring an External Purge.
    Important: It is the customer's responsibility to keep exactly one of these external purge processes running in the cluster. If you need to shut down the hardware that is running the external purge, you must run the external purge on a different node.
  2. Disable the default Purge service. Click Deployment Schedules, search for PurgeService, and then clear the Enabled checkbox for PurgeService.
    Note: If you have customized the Schedule_PurgeService business process, you need to add your customized code to the new Schedule_PurgeService business process. The new Schedule_PurgeService business process includes a warning message about running the external purge while the scheduled new purge is enabled.
  3. Turn off the "Important Schedules are Disabled" email notifications by adding the following line to the customer_overrides.properties file. This removes the Purge Service SQL query for the schedule.
    resourceMonitor.ScheduleMonitor.propertyValue.1=SELECT STATUS, SERVICENAME FROMSCHEDULE WHERE SERVICENAME IN ('BackupService','IndexBusinessProcessService','AssociateBPsToDocs'
    ,'BPRecovery','BPLinkagePurgeService')
  4. Do the following:
    • In Windows, do one of the following:
      • Run the command startExternalPurgeWindowsService.cmd from the INSTALL_DIR\bin directory.
      • Run the Windows service. Click Control Panel > Administrative Tools > Services, right-click IBM Sterling B2B Integrator External Purge at BASE_PORT, and click Start.
    • In UNIX, run the command control_extpurge.sh start from the INSTALL_DIR/bin directory.
    • In iSeries, run the command
      SBMJOB CMD (QSH CMD('cd INSTALL_DIR/bin; ./ExternalPurgeConsole.sh -clearlocks > INSTALL_DIR/logs/extpurge.log')) JOB(EXTPURGE)

Remote FTP Directory Sync using lftp

http://www.cyberciti.biz/faq/lftp-mirror-example/

$lftp user@my.ftp.com
$mirror -c source target

Reverse Sync to Server:
Change local directory to  where you saved the files /home/somedirectory
$lcd /home/somedirectory
$mirror -R

Friday, December 11, 2015

Enterprise Logging with Logstash

Basic Flow of Logstash?

LS Agent(s) (Installed on App Server(s)) --> RabbitMQ --> LS Server --> Elasticsearch Server <-- Kibana <-- end user.

So which scripting language is recommended to parse the logs or data?

There is a bunch of plugins for logstash but mostly we use the grok filter.
It takes grok expressions which can be the special grok or even ruby regexes with named captures.
If you need help building patterns to match your logs, you will find the http://grokdebug.herokuapp.com and http://grokconstructor.appspot.com/ applications quite useful!

We need to include Puppet in setup or we can manage with out puppet?

Puppet manages LS Agents on all servers. We create filters and apply them based off the server hostgroup and also input files.

Videos on Logstash:





Download Logstash:



10 Management Tips



Wednesday, November 25, 2015

Remove SFG Partner Profile (Hard Delete if SFG removal fails)

There was bug in SFG (old versions) where it leaves some orphan entries in DB when you try to remove the trading partner from SFG UI. To solve the problem here are steps to do hard delete of partner profile.

Attempt to delete from SFG in regular way and then remove from Dashboard --> Trading Partner (All Contracts, Document Exchange, Profile, Routing Channels, Mailbox Virtual Roots if any etc.)

Make sure the following table should not return any entry for Trading Partner, If it returns then remove the entry manually...

This example Partner Name is : EDI

select 'YFS_USER' from YFS_USER where UPPER(USERNAME) like '%EDI%'  UNION
select 'YFS_ORGANIZATION' from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) like '%EDI%'  UNION
select 'MBX_ACTION'  from MBX_ACTION where UPPER(USER_ID) like '%EDI%'  UNION
select 'MBX_MAILBOX'  from MBX_MAILBOX where UPPER(PATH) like '%EDI%'  UNION
select 'SCI_CONTRACT' from SCI_CONTRACT where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_DOC_EXCHANGE' from SCI_DOC_EXCHANGE where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_ENTITY'  from SCI_ENTITY where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_PACKAGING'  from SCI_PACKAGING where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_PROFILE' from SCI_PROFILE where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_TRANSPORT' from SCI_TRANSPORT where UPPER(OBJECT_NAME) like '%EDI%'  UNION
select 'SCI_CODE_USR_XREF'  from SCI_CODE_USR_XREF where UPPER(USER_ID) = 'EDI%';

select * from YFS_USER where UPPER(USERNAME) = 'EDI';
select * from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) = 'EDI';
select * from MBX_ACTION where UPPER(USER_ID) = 'EDI';
select * from MBX_MAILBOX where UPPER(PATH) = 'EDI';
select * from SCI_CONTRACT where UPPER(OBJECT_NAME) ='EDI';
select * from SCI_DOC_EXCHANGE where UPPER(OBJECT_NAME) = 'EDI';
select *  from SCI_ENTITY where UPPER(OBJECT_NAME) = 'EDI'; 
select *  from SCI_PACKAGING where UPPER(OBJECT_NAME) = 'EDI';
select * from SCI_PROFILE where UPPER(OBJECT_NAME) = 'EDI';
select * from SCI_TRANSPORT where UPPER(OBJECT_NAME) = 'EDI';
select * from SCI_CODE_USR_XREF where UPPER(USER_ID) = 'EDI';

--finally delete (be careful) --
DELETE from YFS_USER where UPPER(USERNAME) = 'EDI';
DELETE from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) = 'EDI';

Jayaprakash Narayan | Talks at Google

Friday, November 20, 2015

Enterprise Integration Techniques - Notes

Integration Patterns:
   Enterprise Integration Patterns

   Self Managing
 
   Minimize the dependency between components.
 
   John Prosul Robust principle
 
   Be liberal with what you receive and be specific with what you send out.
 
   Always support previous versions (Backward compatibility). It's always hard to support backward compatibility but it's matter of discipline.
 
   Software is craft not a science.
 
   Be wise on Technical Decision vs Business Decision.
 
   InfoQ.com
 
   gotoconferences

   Twitter University

   Emerging Techologies for Enterprise (Conference hosted in Philly)
 
   Agile Stuff
 
   hackernews.com (YCombinator)
 
   HighScalability.com
 
   Netflix Engineering
 
   Thoughtworks Tech Radar
 
   Micro Services (Sam Newman)

Thursday, September 24, 2015

Sterling Integrator issue with MSSQL Database

Error while installing - The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed.".
[2014-11-13 17:31:50.499] ERRORDTL [1415899910498]com.microsoft. sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed.".

Solution below link.  -- Alternate Solution:



Tuesday, August 11, 2015

Encoding a Payload in Sterling Integrator using Java Task

import java.io.InputStream;
import java.lang.StringBuilder;
import com.sterlingcommerce.woodstock.workflow.Document;
import com.sterlingcommerce.woodstock.util.Base64;

Document doc = wfc.getPrimaryDocument();
InputStream in = doc.getInputStream();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < in.available(); i++) {
   sb.append(in.read());
}
byte data[] = sb.toString().getBytes();
byte newdata[] = Base64.encode(data);
doc.setBody(new String( ""+ new String(newdata)+"").getBytes());
return new String(sb.toString());

Friday, July 31, 2015

Sir A.P.J Abdul Kalam

Don't take rest after your first victory because if you fail in second, more lips are waiting to say that your first victory was just luck." - A.P.J Abdul Kalam

"All Birds find shelter during a rain. But Eagle avoids rain by flying above the Clouds." - A.P.J Abdul Kalam

"Failure will never overtake me if my definition to succeed is strong enough". - A.P.J Abdul Kalam

"Man needs difficulties in life because they are necessary to enjoy the success." - A.P.J Abdul Kalam

"If you want to shine like a sun. First burn like a sun." - A.P.J Abdul Kalam

"It is very easy to defeat someone, but it is very hard to win someone" - A.P.J Abdul Kalam

"All of us do not have equal talent. But , all of us have an equal opportunity to develop our talents." - A.P.J Abdul Kalam

" Be more dedicated to making solid achievements than in running after swift but synthetic happiness." -A.P.J Abdul Kalam

"Thinking should become your capital asset, no matter whatever ups and downs you come across in your life." - A.P.J Abdul Kalam

" Without your involvement you can't succeed. With your involvement you can't fail. " - A.P.J Abdul Kalam

Thursday, June 11, 2015

Mule Fundamentals Video Tutorial

To ensure delivery, add no-reply@vimeo.com to your address book.
Vimeo
Mule Fundamentals
by Mulesoft Training /
Forward this email to your friends and family so that they can watch the video too.

              
TM + © Vimeo, LLC
555 West 18th Street, New York, NY 10011
Terms | Privacy Policy

Jack Ma Speech - How to Run Business


Wednesday, June 10, 2015

Intellij IDEA for Students FREE (1 Year)

Folks,
          Jetbrains is offering Intellij IDEA Ultimate Edition for one year FREE for students with edu email address. If you are student and you got .edu email address go and download the most intelligent IDE.

                            https://www.jetbrains.com/estore/students/


Happy Coding!

Friday, June 5, 2015

Introduction To Mule Application Development - Part I

Send Command / Process to Back Ground From Terminal

Here are the list of command to send a process or command to back ground from terminal

1) Press ctrl+z
2) Then type bg (bg means back ground)
3) Then type "disown"

To make sure process is running in back ground execute below command,
ps auxw | grep

Friday, April 3, 2015

#1 Mistake for Startup E-Commerce Web Sites

Contacting Manufacturers of Brand Names For Your Ecommerce Store

XML To JSON Converter

Have the following jars in the classpath,

 commons-beanutils-1.6.1.jar
 commons-collections-3.2.jar
 commons-lang-2.1.jar
 commons-logging-1.1.jar
 ezmorph-1.0.4.jar
 json-lib-2.3-jdk15.jar
 xom-1.0.jar

import net.sf.json.JSON;
import net.sf.json.xml.XMLSerializer;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

public class XML2JSONConverter {
    public String convertXMLTOJSON(String inputXML) {
        String jsonString = "";
        try {
            JSON objJson = new XMLSerializer().read(inputXML);
            jsonString = objJson.toString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return jsonString;
    }

    static String convertStreamToString(java.io.InputStream is) {
        java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }

    public static void main(String[] args) throws Exception {
        File inputFile = new File("input xml file path");
        InputStream inputStreams = new FileInputStream(inputFile);
        XML2JSONConverter toJASON = new XML2JSONConverter();
        System.out.println("JASON Object:" + toJASON.convertXMLTOJSON(convertStreamToString(inputStreams)));
    }
}

Java InputStream to String Covertion

Found this small method to convert InputStream to String, This will help to avoid using Apache IOUtils etc.,

 static String convertStreamToString(java.io.InputStream is) {
        java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }


Thursday, February 5, 2015

My Experience Talk:What I learnt from a year of start up experience

Sirish Reddy Gongal Reddy has sent you a link to a blog:



Blog: My Experience Talk
Post: What I learnt from a year of start up experience
Link: http://www.myexperiencetalk.com/2014/10/what-i-learnt-from-year-of-start-up.html

--
Powered by Blogger
http://www.blogger.com/

Wednesday, January 7, 2015

Sterling Integrator Purge All Tables

1.  EDI_COMPLIANCE_RPT
2.  EDI_DOCUMENT_STATE
3.  WF_INST_S
4.  WORKFLOW_CONTEXT
5.  WORKFLOW_LIFESPAN
6.  WORKFLOW_DATA
7.  EDIINTDOC
8.  MSGMDNDUP
9.  MSGMDNCORRELATION
10. WEBX_MINED_DATA
11. WF_INACTIVE
12. GENERIC_ACK
13. CORRELATION_SET
14. ACT_SESSION
15. ACT_AUTHENTICATE
16. ACT_AUTHORIZE
17. ACT_XFER
18. ACT_NON_XFER
19. DATA_FLOW
20. DMI_ROUTE
21. DMI_ROUTE_FACT
22. MBX_MESSAGE
23. TRANS_DATA