Connected Thoughts – Thiago Almeida

August 21, 2008

Death of the BizTalk JDE Adapter?

Filed under: BizTalk — Tags: , , — Thiago Almeida @ 11:17 am

I have recently had to investigate integrating BizTalk 2006 R2 to JD Edwards version 8.12 (latest version). My first thought was to use the BizTalk JDE Adapter. I enquired about it on the BizTalk MSDN forums and also on a mailing list we have between our Auckland Connected Systems User Group and the Sydney and Brisbane BizTalk user groups. No responses. 

I reviewed the BizTalk JD Edwards Adapter documentation. I reviewed the 376 pages of Oracle’s JD Edwards EnterpriseOne Tools Interoperability Guide. I also checked out the JD Edwards EnterpriseOne Business Services Data Sheet and the Extending with Service Oriented Architecture White Paper.

After all this, the solution was quite simple: nowadays JD Edwards EnterpriseOne offers native support of Web Services. You still need a JD Edwards developer to expose them, but this means there is no need to install the java components and go through the long list of steps to get the JD Edwards Adapter installed and working correctly on the BizTalk Server. It’s much nicer and cleaner to have Web Services exposed directly from the JD Edwards server. It is also beneficial to the company because other systems can call the same Web Service, especially if they are looking at an SOA approach.

This is probably the reason why Microsoft didn’t release a JD Edwards adapter with the latest WCF based Adapter Pack.

I will post back here or update this post when I get more information on how much is involved to expose JD Edwards objects via Web Services.

August 4, 2008

ACSUG meeting – AS2 and EDI support in BizTalk R2 by David Hall

Filed under: BizTalk — Tags: , , , , , , — Thiago Almeida @ 6:15 pm

The next Auckland Connected Systems User Group meeting has been confirmed.

AS2 and EDI support in BizTalk R2 by David Hall

REGISTRATION CLICK HERE

Abstract: A new feature introduced in BizTalk R2 is native support for EDI data exchange and AS2 data transport. David goes through the basics, demos, the business value, and some tips and tricks picked up while developing with the new features.

About David Hall: David is a consultant for Datacom Systems Limited, with 6 years of experience in the field both with integrations and other Microsoft development.

A prize will be distributed at the end to the first one to answer a question from the presenter.

This is also the first meeting out of three you need to attend to enter the draw for the High sierra 8040 processor computer case customized with “Microsoft BizTalk Server 2006 R2″ embroidered onto the front. Full bag specifications inside this PDF document.
Location: Datacom Systems Limited, 210 Federal Street, Auckland City Centre, Auckland, 1141 Map
Parking on the street outside Datacom or underneath Sky Tower.

Event start: Thursday, 14/08/2008 6:30:00 p.m.

Command line tool to set BizTalk tracking back to defaults

Filed under: BizTalk — Tags: , , — Thiago Almeida @ 5:52 pm

While investigating some BizTalk performance issues at a client I noticed that several of their receive ports, send ports, and orchestrations were tracking the message bodies.

After enquiring around we came to the conclusion that nobody there expects message bodies to be tracked, and that they are getting purged by the DTA SQL Server job. This is just adding a massive amount of unnecessary  processing to their system. This message body tracking settings either crept into Production within MSIs from development and test, something to be very aware of, or the  settings were inadvertently enabled for some reason and never disabled back.

The default tracking options in orchestrations are “Orchestration start and end”, “Message send and receive”, and “Shape start and end”. The default tracking for ports is none (the events for ports is done by the pipelines, which I left out of this on purpose).

So I created a little command line tool to set all ports and orchestrations back to the BizTalk default. You can see that this is a very simple example of how to get and modify tracking settings from ports and orchestrations. From here you can build a very powerful “BizTalk Tracking Manager” application even! Don’t forget to refresh the BizTalk Administration Console if it’s open while you run this.

Note: I made an exception on  the receive port called “BatchControlMessageRecvPort” that gets created  automatically when EDI is installed with BizTalk 2006 R2. Please be very careful when using this and  investigate and test it fully before running it. Only intended for BizTalk 2006 and 2006 R2 versions.

Hope it’s useful to someone!

using System;
using System.Collections.Generic;
using System.Text;
//Add a reference to Microsoft.BizTalk.ExplorerOM.dll
usingMicrosoft.BizTalk.ExplorerOM;
using Microsoft.Win32;
 
namespace RevertBizTalkTracking
{
    class Program
    {
 
        static void Main()
        {
            Console.WriteLine();
 
            try
            {
                BtsCatalogExplorerbtscat = new BtsCatalogExplorer();
 
                Console.WriteLine(DateTime.Now.ToLongTimeString() +
                 " Connecting to local BizTalk server");
 
                string btsConnectionString = GetBTSConnectionString();
                if (btsConnectionString != string.Empty)
                {
                    btscat.ConnectionString = btsConnectionString;
 
                    Console.WriteLine(DateTime.Now.ToLongTimeString() +
                  " Looping through receive ports");
 
                    //Loop through all receive ports
                    foreach (ReceivePortrcvport inbtscat.ReceivePorts)
                    {
                        //skips the EDI port created in 200 6R2 
                        if(rcvport.Tracking != 0 & rcvport.Name
                                != "BatchControlMessageRecvPort")
                        {
                            Console.WriteLine("    " + DateTime.Now.ToLongTimeString()
                                          + " Port "+ rcvport.Name + " with tracking ("
                                          + rcvport.Tracking.ToString()
                                          + ") enabled. Changing port back to default.");
                            //Sets it back to the default value
                            rcvport.Tracking = 0;
                        }
                    }
 
                    //Loop through all send ports
                    Console.WriteLine(DateTime.Now.ToLongTimeString()
                                      + " Looping through send ports");
                    foreach (SendPortsndport inbtscat.SendPorts)
                    {
                        if(sndport.Tracking != 0)
                        {
                            Console.WriteLine("    " + DateTime.Now.ToLongTimeString()
                                            + " Port "+ sndport.Name + " with tracking ("
                                            + sndport.Tracking.ToString()
                                            + ") enabled. Changing port back to default.");
                            //Sets it back to the default value
                            sndport.Tracking = 0;
                        }
                    }
 
                    //Loop through all orchestrations
                    Console.WriteLine(DateTime.Now.ToLongTimeString()
                                   + " Looping through orchestrations");
                    foreach (BtsAssemblybtsasm inbtscat.Assemblies)
                    {
                        foreach (BtsOrchestrationorch inbtsasm.Orchestrations)
                        {
                            if(orch.Tracking != (OrchestrationTrackingTypes.ServiceStartEnd
                                               | OrchestrationTrackingTypes.MessageSendReceive
                                               | OrchestrationTrackingTypes.OrchestrationEvents))
                            {
                                Console.WriteLine("    " + DateTime.Now.ToLongTimeString()
                                    + " Orchestration "+ orch.FullName + " with tracking ("
                                    + orch.Tracking.ToString()
                                    + ") enabled. Changing orchestration back to default.");
                                //Sets it back to the default values
                                orch.Tracking = (OrchestrationTrackingTypes.ServiceStartEnd
                                               | OrchestrationTrackingTypes.MessageSendReceive
                                               | OrchestrationTrackingTypes.OrchestrationEvents);
                            }
                        }
                    }
 
                    //Apply changes
                    btscat.SaveChanges();
                    Console.WriteLine("Finished! Press any key to exit.");
                    Console.Read();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception raised: " + ex.Message);
                Console.WriteLine("Press any key to exit.");
                Console.Read();
            }
        }
 
        //Creates the connection string based on  values in the registry
        //From Carlos Medina's blog - http://blogs.devdeo.com/carlos.medina/PermaLink,guid,981d7ca5-a11a-452b-90d5-a535d04a64bf.aspx
        public static string GetBTSConnectionString()
        {
            string connection = string.Empty;
            string server = string.Empty;
            string database = string.Empty;
            using (RegistryKeykeyBts =
       Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\BizTalk Server\3.0\Administration"))
            {
                server = keyBts.GetValue("MgmtDBServer") as string;
                if (server == null)
                    server = string.Empty;
 
                database = keyBts.GetValue("MgmtDBName") as string;
                if (database == null)
                    database = string.Empty;
            }
 
            if (server == string.Empty || database == string.Empty)
            {
                Console.WriteLine("Error getting connection details from registry:");
                Console.WriteLine(@"SOFTWARE\Microsoft\BizTalk Server\3.0\Administration\MgmtDBServer");
                Console.WriteLine(@"SOFTWARE\Microsoft\BizTalk Server\3.0\Administration\MgmtDBName");
            }
            else
            {
                connection = "server=" + server + ";database=" + database +
                             ";integrated security = true;";
            }
            return connection;
        }
 
    }
}

Blog at WordPress.com.