Archive for May, 2007

Better than a napkin: Track your BM changes

May 28, 2007

As Pivotal Customizers, we all love the feature of Transporter that allows us to easily transport changes at the element level from one BM to another. Even for some of us, building a transporter file is part of their day to day life.

When creating a transporter file, first, we need to know which elements to be included to the transporter file and make sure we are not missing anything. Some people keep track their changes on a napkin or their journal, just use their memory to remember, or run the script below to get all the changes automatically. The choice is yours.

Here is the script to keep track the changes since certain date – it’s not not complete, however I found it is good enough for Active Access Development.


Using client script to host xml configuration

May 16, 2007

To make an appserver rule configurable, we often need to store some parameters as a separate xml file. The only problem with this approach is that we have to remember to copy the xml file to the (production) server.

In Pivotal, the more practical way to store the configuration is to host the xml string inside a client script. Since the client script is part of the BM, it will always be available and there is no special deployment required.

Below is the example on how to retrieve xml configuration from a client script.

<?xml version="1.0" encoding="utf-8"?>
  <logging logFile = "D:\PivotalLog.txt" logLevel = "2">

Fig. Sample of XML Configuration hosted as a client script

string ClientScriptMapping = "CMS_Config";
string mapping = 
string logSettingString = 
    XmlDocument xd = new XmlDocument();
    string xPathString = "/config/logging";
    XmlNode xNode = xd.SelectSingleNode(xPathString);
    logFile = xNode.Attributes["logFile"].Value;
    logSettingString = xNode.Attributes["logLevel"].Value;
    logSetting = (LogLevel)Convert.ToUInt16(logSettingString);

Fig. .NET ASR to retrieve xml string a client script