Friday, July 25, 2008

BRM & BRE: Let the Business Manage the Rules

Total cost of ownership (TCO) plays a large part in the consideration of developing, purchasing and building of enterprise software applications. Not only does one need to consider how much effort and cost it will take to gather requirements, analyse, design and implement the system, but also what will the ongoing costs be.

One of the key factors to understanding in the costs of supporting and maintaining a system is how often the underlying requirements are expected to change. This would include the data structure (adding and/or removing required fields), process and work flow adjustments, user interface updates and changes to business rules.

When changes to arise, they are generally driven by the 'business'. This would normally mean that a business analyst(s) would work with the project sponsors and define and document the new requirements at great length and in great detail.

Then (historically) all of the above items would need to be reviewed, understood, managed and re-worked by the software developers in a build and test cycle. Once the unit tests were complete, full regression testing across the entire system would ensue, then the business would be required to test everything again during the user acceptance testing (UAT) phase. This of course would include other members of the tech team including Project Managers and Testers.

The things that usually change most often, and are the most expensive to update, are the business rules. A business rule can be anything from a simple statement such as:

IF AnnualSalary IS GREATER THAN $100,000 THEN Approved=True

... to a much more complex set of variables and logic that would result in a series of actions:

IF AnnualSalary x RiskScore IS LESS THAN 45 THEN EXECUTE
   Approved = Tentative
   Action = Forward to Telephone Representative
   Action = Print Tentative Acceptance Letter
   Action = Notify Manager of Possible Override
   END

Of course real-world examples would likely be even more complex (imagine the business rules associated with emergency services dispatch).

New tools have been created to give business users the ability to manage, test and implement business rules without the use of the software development team.

A Business Rules Engine (BRE) is the part of the system that allows for execution of the business rules against the data of your system. A Business Rules Manager (BRM) is the set of tools that allows you to create and update rules which are then stored in some sort of repository to be consumed by the BRE.

What this means is that the business analyst can be trained up to use a BRM to create, update and test business rules, and deploy them enterprise wide completely independently. Any business process oriented organisation (which is pretty much all of them!) can take advantage of moving the rules from the developers to the business analysts and save a great deal of time and money and reduce risk.

There are quite a few BRE/BRM systems out there. MS Biztalk ships with a BRE, however it is not nearly as flexible as some of the others (you can only do IF...THEN, which is VERY limited).

My favourite is from a group in Chicago called InRule (www.InRule.com). Very slick interface, great interoperability with Microsoft .NET (it was written in .NET) and very good linkage to Biztalk. They are also a great crew of people to interact with - excellent customer service. Other contenders include Drools, JRule, iLog, Visual Rules, Hayley, NXBRE and QuickRule.

Anyhow I could write dozens of pages about this topic but that would be a bit overwhelming for the readership. If you want to know more let me know via comment and I will set up a conversation with you.

.

Friday, July 18, 2008

HOWTO: MS CRM 4.0 Show Phone Number on Phone Call Form

I have recently started working with Microsoft CRM 4.0 and have been smitten a bit by its capabilities. However I do find that out of the box there are some simple things missing that would have been nice to provide.

One of the main items is this: if you open a new Phone Call form and select the Recipient, you need to manually enter the phone number into the Phone Number textbox.

After lots of hair pulling I have put together the solution. Much of the 'customization' done effectively for CRM can be accomplished by reading from CRM web services. Below is a sample set of code in Javascript that I put behind the OnChange event of the Recipient field on the Phone Call form, to get this to work.

(Note: it displays only the first telephone number on record - I will add more functionality later that will allow the selection from a list of numbers allocated against the contact
. Also you may need to replace the &lt and &gt with <> respectively as this is html encoded.).


var lookupItem = new Array;

// Get the lookup for the primarycontactid attribute on the account form.
lookupItem = crmForm.all.to.DataValue;


if (lookupItem && lookupItem[0]!=null) {

var contactGUID = lookupItem[0].id;

//Prepare variables for a contact to retrieve.
var contactid = contactGUID;
var authenticationHeader = GenerateAuthenticationHeader();


//Prepare the SOAP message.
var xml = "&lt?xml version='1.0' encoding='utf-8'?&gt"+
"&ltsoap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"+
" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'&gt"+
authenticationHeader+
"&ltsoap:Body&gt"+
"&ltRetrieve xmlns='http://schemas.microsoft.com/crm/2007/WebServices'&gt"+
"&ltentityName&gtcontact&lt/entityName&gt"+
"&ltid&gt"+contactid+"&lt/id&gt"+
"&ltcolumnSet xmlns:q1='http://schemas.microsoft.com/crm/2006/Query' xsi:type='q1:ColumnSet'&gt"+
"&ltq1:Attributes&gt"+
"&ltq1:Attribute&gtfullname&lt/q1:Attribute&gt"+
"&ltq1:Attribute&gttelephone1&lt/q1:Attribute&gt"+
"&ltq1:Attribute&gtparentcustomerid&lt/q1:Attribute&gt"+
"&lt/q1:Attributes&gt"+
"&lt/columnSet&gt"+
"&lt/Retrieve&gt"+
"&lt/soap:Body&gt"+
"&lt/soap:Envelope&gt";

//Prepare the xmlHttpObject and send the request.
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Retrieve");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Content-Length", xml.length);

xHReq.send(xml);

//Capture the result.
var resultXml = xHReq.responseXML;

//Check for errors.
var errorCount = resultXml.selectNodes('//error').length;
if (errorCount != 0)
{
var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
alert(msg);
}
//Display the retrieved value.
else
{
crmForm.all.phonenumber.value = resultXml.selectSingleNode("//q1:telephone1").nodeTypedValue;
crmForm.all.subject.focus();
}

}


Seems to work like a charm, now I don't need to open multiple windows to do my job.

Thursday, June 26, 2008

Tesla Motors - High Performance Electric Sports Car

Recently I came across what I would consider a huge leap forward for the planet - proof that our addiction to petroleum-based fuels has a rehab program: the resurgence of the electric car. Now this is not anything new by any stretch - electric vehicles have been around for quite some time now. However, a very smart, very well funded startup has emerged from Silicon Valley that will change the way we look at small, low performance, short ranged electric vehicles of days past.

Tesla Motors have invented and developed The Tesla. This battery-powered sex-on-wheels not only looks fantastic, it apparently outperforms similar petrol-powered counterparts. And if you charge this thing using solar power - your running fuel costs are exactly ZERO!



Here are some quick specs:
  • 0-100 km/h (60 mph) in 3.9 seconds!!
  • 350 km (220 miles) per charge (4-8 hours depending on 110 or 240v source - standard in homes)
  • Instant torque - 13 000 RPM red line
  • Approx 1 cent per kilometre operating cost (unless you use solar)
  • No toxic outputs (batteries can be recycled), no oil to change, 1 moving part in the engine
  • Circa $109k purchase price (USD - available only in US at the moment)
THIS is the future of short haul travel in style. There are plans to get 999 of these beauties out into the marketplace then begin the development of an SUV-style vehicle for more family oriented consumers.

The only downside I can see at the moment is that you can't have this serviced at any old garage: only Tesla certified engineers can work on it without voiding any sort of warranty. Plus, being only currently available in the US sadly means I won't be getting one any time soon. Hopefully the auto industry will see this as a wake up call and get the fully electric cars out of the production line by 2010.

Opinion:
------------
Uniqueness: 5/5
Interest Factor: 5/5
Stability: 5/5
User Experience: 4/5
Longevity: 5/5

Monday, June 23, 2008

QIK ... Stream Live to the Web via Your Mobile

This was bound to happen sooner or later, and I am actually very interested to see where this service goes. qik.com is a streaming video live-to-web service that uses the video camera on your mobile phone (limited to certain, but many models) via your mobile internet connection.

qik is yet another service in the plethora of those available in the ever-growing social media/web 2.0 space. It is based around a community of users that choose to follow or be followed (similar to Twitter in my previous post) but instead of text or pre-cut video, live video(or once-live but now captured) is the medium. You of course set up a user profile and if people find you or your videos interesting, they will 'follow' you and receive updates via the web, mobile, im and other social sites. qik will even push your video directly to YouTube, can link to your video in your Twitter update feeds, or even post updates here to Blogger.com. This is all achieved via a small bit of software you download to your mobile by sending an SMS (very straightforward.

Sounds a bit scary, since you cannot edit before airtime, but the applications to this are seemingly endless. Plus, if you live in Australia under antiquated mobile data charge schemes (its painful and expensive), your video updates can cost you a fortune. If you are stuck in a scheme like this, best to reserve your video push via a WiFi connection. (update: Optus is changing their mobile data plans to be linked to wireless broadband - $29 for 1 gig per month!)

I am willing to bet everyone's first video looks pretty much the same (a shot of the first test to prove that it works, usually involving a few seconds of looking at a keyboard, then the screen showing your video, then some random chatter)... yawn .... But once you dig through these you can find some fairly interesting content, if not mildly entertaining. Its surprisingly fast, efficient and very easy to use, so the barriers to entry are quite low.

There is a big community push by early adopters at the moment, which always puts an idea/company/infrastructure thorough its paces. So far things are remaining stable and robust which really does continue to impress me, even though the idea is fairly simple. I am willing to bet that qik will be around for some time and probably bought out by a big player like YouTube before too long.

Anyhow I recommend giving it a try, for no other reason that the novelty factor and showing off your keyboard to the world. What you do with it beyond that ... well, it certainly does add a dimension to vlogging, live news reports, showing your new dog tricks online or keeping your overseas family up to date.

Opinion:
------------
Uniqueness: 3/5
Interest Factor: 4/5
Stability: 4/5
User Experience: 4/5
Longevity: 3/5

Thursday, June 19, 2008

Twitter - Ready for Prime Time?





There's something abuzz in the social media space lately that you may have heard of. www.twitter.com is a new-ish 'micro-blogging' service that allows you keep tabs on those people you are 'following' and to allow your followers to keep tabs on you.

Make sense yet? Didn't think so.

If you are a user of Facebook or LinkedIn, you have already seen something similar in action. Close to your profile picture (to the right in FB or underneath in LI) you can fill in the blank as to what you are doing e.g. [Brett is .... doing the dishes] . Simple enough, and generally used for inane, humorous or philosophical statements about your being.

Twitter takes this to the next level, and the users (called 'Tweets') are much, much more imaginative at what they post on their updates. It can be as simple as what you had for lunch, or there can be even more interesting tidbits such as links to interesting websites, stories, images and so on. People will also usually give their opinion on things, quick one-off reviews, quotes, news etc. but within a concise and quippy single sentence.

When you sign up to Twitter, you create a basic profile (like every other social media site) with simple personal details and a photo of yourself. Then you can invite other people from your various email lists by providing Twitter with user account info to say Hotmail, Gmail and the like.

I opted against this as I already bombard my current contact list with initiations to LinkedIn, Plaxo, Xing, FastPitch, e-cademy etc. and judging by the types of users on Twitter (early-adopters, formerly known as lovable geeks) corporate contacts wouldn't be ready to start using this, yet. But spreading the word virally is the lifeblood of social networking startups, so at some point I will, when the time is right.

If you get into Twitter (I am still a newbie .. or n00b as they say) you can see how it can become addictive. It can also work via mobile (web or sms and now even instant messenger) and allow you to update your 'happenings' wherever you are, or receive updates from those you have chosen to follow as they come through. I have yet to turn on the 'receive updates on your mobile' option, as I suspect even getting updates from following a mere 6 people would drive me crazy with constant text message beeping on my Nokia.

I think there is a good future for Twitter in many circles. Its obviously catchy and for the early adopters a great conversation starter. I can see loads of applications already in the marketplace to allow you to interact with Twitter and I am willing to bet there are dozens and dozens of ideas spinning off this new communication methodology (think flirting, networking, tracking etc.).

The only downside to Twitter at the moment is its server reliability. With the hundreds of thousands (if not millions) of users updating all over the place, I am not surprised there would be challenges. Also I am of the understanding that Twitter was built using Ruby on Rails, a rapid application development language and framework that wasn't initially meant to scale to 'enterprise' heights. I could be wrong, but maybe the Twitgineers might want to rethink the platform before getting a globe of Tweets hammering away at the service.

Overall I think its a cool little trendy tool that people will flock to and use for a while - but will it have legs or will it be just another pet rock? Time, they say, will surely tell.

Opinion:
------------
Uniqueness: 3/5
Interest Factor: 3/5
Stability: 2/5
User Experience: 4/5
Longevity: 3/5