About

Hello – I’m Hari Krishnan and I use this blog to share my knowledge that I gained over the years. It’s been my long time wish to share the things that I learned and I hope I’ll do justice to my wish. I live and work in the bay area and my area of expertise includes the Microsoft .NET stack, Salesforce and application integration. I love listening to melody music, specifically, Illayarja‘s music and my all time favorite is ‘Do Anything‘ from the album ‘How to name it?’. My interests go beyond technology and I love to learn new things and I spend my personal time in exploring Cosmology, Anthropology, World history,  etc.

Advertisements

11 thoughts on “About

  1. Santhosh N September 18, 2012 at 2:10 pm Reply

    Hello Harikrishnan,

    I was going through your blog and learnt pretty good stuff about webservice callout to Cast iron from salesforce and was able to implement that perfectly. But, when I was trying to do HTTP callout to cast iron orchestration, I am getting ‘Received fatal alert: handshake_failure’ exception. Can you help me out with this? The code below is to test the callout. The orchestration has ‘Recieve Request’ activity as a starter activity with the URL set to ‘bscString’, so basically ‘:443/bscString’ should invoke the orchestration but is not happening from Salesforce. I am not able to figure out if I am missing any headers or certificates or what? Thanks for your time.

    public class AuthCallOut{

    public static void doHTTPCallout(){
    try{
    HttpRequest req = new HttpRequest();

    req.setEndpoint(‘:443/bscString’);
    req.setMethod(‘POST’);
    req.setHeader(‘Content-Type’, ‘text’);
    req.setHeader(‘Accept’, ‘text/plain’);

    // Specify the required user name and password to access the endpoint

    // As well as the header and header information
    // String username = ”;
    //String password = ”;

    //Blob headerValue = Blob.valueOf(username + ‘:’ + password);
    //String authorizationHeader = ‘BASIC ‘ +EncodingUtil.base64Encode(headerValue);

    // req.setHeader(‘Authorization’, authorizationHeader );
    //StaticResource cert = [Select id, body from StaticResource where name =’SFClientCert’];
    // String temp = cert.body.toString();
    //req.setClientCertificateName(‘CorvidaeCert’);
    // Create a new http object to send the request object

    // A response object is generated as a result of the request
    req.setBody(”);
    ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, req.toString()));

    Http http = new Http();
    HTTPResponse res = http.send(req);

    ApexPages.Message responseMesg = new ApexPages.Message(ApexPages.Severity.INFO, ‘RESPONSE:::::’+res.getBody());
    ApexPages.addMessage(responseMesg);
    //System.debug(res.getBody());
    }catch(System.CalloutException e){
    ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, e.getMessage()));
    }
    }
    }

    • Hari Krishnan November 1, 2012 at 6:14 pm Reply

      Santhosh,
      1. Make sure the web service in the Cast Iron appliance is running. You can verify it through many ways. A simple way is to put the web service URL in your browser and see if you see any reply (with no 404’s or other errors).
      2. The other thing that I noticed is you are using HTTP callout APIs in Apex, which is normally used for HTTP calls (GET, POST,…). I suggest to import the WSDL (Setup->Develop->Apex Classes->Generate from WSDL). I have described this approach in the article and have the code in box.com that you can download.

  2. Santhosh N September 18, 2012 at 2:12 pm Reply

    I included some content between “less than” and “greater than” operators and they were skipped for some reason.. there should be “ci-instance-url” before “:443/bscString”

  3. rotnelson October 30, 2012 at 7:03 pm Reply

    This blog is superb! Thanks for sharing!! The Salesforce to IBM Cast Iron using SSL posts are really good

  4. Chidam January 8, 2013 at 5:58 pm Reply

    Great Blog and Nicely done, thanks for sharing.

  5. Sivakumar Kothakota June 17, 2013 at 1:17 pm Reply

    I am a beginner to IBM cast iron , can you any one please share link for learn SAP activities in cast iron apart from IBM info centre .????

    • Hari Krishnan June 17, 2013 at 4:15 pm Reply

      Hello Sivakumar,
      I have not seen any articles or blog posts on using SAP activities Cast Iron. Your best bet will be to reach their support services.

  6. Amit Sahai December 2, 2013 at 8:56 am Reply

    Hi Hari,

    Your blog has helped me get a log of details on the areas quizzed in the 401 exam and many thanks due to you….

  7. Bruce May 24, 2014 at 3:03 pm Reply

    Hey Hari, those are good ideas for your trigger handler framework. I would like to use it at our college. I’m thinking of making an addition to the framework and would like your advice on at what level to implement the change.
    As it is, the framework is based solely on object type, I would like to have separate handlers for each object record type. We want to treat contacts which represent prospective students differently than contacts representing students.
    To accomplish it, I’m thinking of separating out the contacts into their own lists prior to creating the dispatcher. In this scenario I’d have a different dispatcher for each contact record type.
    Another (and perhaps better) possibility would be to separate out the routing functionality that the factory takes on so that the logic of the decision on which dispatcher to create could be easily overridden.
    What do you think? At what level would you recommend implementing the change? Or do you think we should add a sort of dispatch router class which would be injected into the factory and used to determine which dispatcher to create? Perhaps there’s a third option I haven’t considered.

    • Hari Krishnan May 29, 2014 at 7:57 pm Reply

      If you want to treat contacts for both prospective students and existing students, you can do that with record types. If you need to have clean code, then one idea is to put all your logic in separate methods for each type of students, and call them from your event handlers after checking the record type. The following psuedocode explains what I’m talking about.


      public override void mainEntry(TriggerParameters tp) {
      for(sObject s : tp.newList) {
      if(s.recordType == 'ProspectiveStudents')
      processProspectiveStudents();
      else if (s.recordType = 'ExistingStudents')
      processExistingStudents();
      }
      }

      private void processProspectiveStudents() {
      ...
      }

      private void processExistingStudents() {
      ...
      }

  8. Laura C September 8, 2016 at 10:56 pm Reply

    Hi Hari,

    Your LinkedIn profile led me to this blog – awesome work to knowledge share with your peers and the online community. I would like to sync up with you regarding Salesforce – possible for you to send me your contact info or perhaps you can drop me a note?

    Thanks,
    Laura

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: