Using YUI and JSON with Vignette Collaboration

I’ve been doing some integrations of some of the YUI widgets with Collaboration and I really like it. They have so many useful widgets that are easy to snap in once you get some basic fundamentals down. (YUI2 Examples , YUI3 Examples) I decided to share some of the important things I learned here to give back a little to the blogosphere (I sure get a lot of help from it when I’m doing development work).

For the purposes of this post I’ll walk through some of how I integrated the YUI3 Drag and Drop Portal example with Collaboration. I created an ability to create portlets and page grids that one can drag and drop desired portlets onto very much like one can do with the RSS feeds in that example.

The YUI ( and many of the newer web APIs like JQuery) requires knowledge of working with the JSON format. For those that don’t know it’s a nice way of wrapping lists of objects with key attributes described that can be easily parsed. For example if I wanted to describe a collection of 3 lists of RSS feeds it might look like this:

{"list1":[{"id":"ajaxian","min":false},{"id":"ynews","min":false}],
"list2":[{"id":"slashdot","min":false}],
"list3":[{"id":"daringfireball","min":false}]}

Each list in the collection has a name (list1, list2 etc), an id, and a minimized state.

My integration required that these JSON formatted text strings get set and read as custom attribute values on objects in Collaboration.

Here are a few key things I learned about working with JSON strings:

1) The JSON object names cannot start with a number NOR contain periods

Because I was associating objects to grid sections, the natural thing that I wanted to use as a name for each item was the OID or object ID which looks like ‘1.11.7862’ . I painfully discovered that I could not work with the JSON strings until I replaced the periods with underscores and prefixed the whole thing with non-numeric characters (I used ‘id’)

So I ended up building my ‘feeds’ variable like so:

var feeds = {
<ISPECT>while(portletsIt.hasNext())
	<ISPECT>TagObject portletObj=(TagObject) portletsIt.next()</ISPECT>
	<ISPECT>String oid=getOID(portletObj)</ISPECT>
	<ISPECT>String oidNoDots=oid.replace(".","_")</ISPECT>
	        'id<ISPECT>showText(oidNoDots)</ISPECT>': {
	            id: 'id<ISPECT>showText(oidNoDots)</ISPECT>',
	            title: '<ISPECT>showName(portletObj)</ISPECT>'
	      }<ISPECT>if(portletsIt.hasNext()),</ISPECT>
</ISPECT>

2) You need to URL encode the string before you can set it as a custom attribute value:
I grabbed a handy JavaScript URL encoder/decoder to do this from www.webtoolkit.info

So after my javascript code builds the proper JSON string  I set it as an attribute value like so :

var modifyObjUrl="ModifyObject?object=<ISPECT>showOID()</ISPECT>
&attrvalue_of_Grid+Mapping="+UrlCoder.encode(feeds);

3) Use the tag method ‘getStringLiteralQuotes()’  to present the string value properly in Javascript code:

var cookie= new String("<ISPECT>showText(getStringLiteralQuotes(
getAttributeValue("Grid Mapping")))</ISPECT>");

Iterating over objects defined by JSON on the server side

Yesterday I realized that I wanted to be able to iterate over the objects defined by JSON text in a custom attribute value on the server side. There are no out-of-the-box tag methods for working with JSON so I decided to write a custom one by adding a custom method to the CustomerReport.class extension hook.

The first thing I did was look for a good open source Java utility for working with JSON and I quickly found this nice library at www.json.org . I downloaded it, compiled to a .jar and tried to import it in CustomerReport.java but it kept  saying that package org.json did not exist. After a lot of headache I discovered that the real reason it wouldn’t compile is because that same package is already part of the base installation, and it was colliding because my classpath pointed to both. So after getting past that fun,  I made a  method called ‘getJSONIteratorByKey’ that takes the JSON text and the key as inputs. It looks like this:

    public Iterator getJSONIteratorByKey(String JSONText, String key){
    	 Vector v = new Vector();
    	 try{
	    	JSONArray a = new JSONArray(JSONText);
	    	JSONObject jo = null;
	    	String s = "";
	    	int len = a.length();
	    	 for (int i = 0; i < len; i += 1) {
	            if (i > 0) {
	            	jo = a.getJSONObject(i);
	            	s = jo.getString(key);
	                v.add(s);
	            }
	    	 }
    	 }
    	catch (JSONException e){
    		 v.add(e.toString());
    	}

    	return v.iterator();
    }

So now from a template I can grab a JSON formatted string from a custom attribute value and if one of the object keys is the object id or logical name, I can easily get an iterator for those object ids:

<ISPECT>String jsonText = getAttributeValue("Grid Mapping")</ISPECT>
<ISPECT>Iterator it = getJSONIteratorByKey(jsonText,"id")</ISPECT>
<ISPECT>while(it.hasNext())
	<ISPECT>String s = (String) it.next()</ISPECT>
	<ISPECT>showText(s)</ISPECT><br>
</ISPECT>

I hope someone out there finds this helpful!

Audit Optimization and the Importance of Proper Granularity

I love the ‘consulting’ part of consulting. What I mean by this is, the up front discovery and design phases of the project. Actually building and implementing the solution can be enjoyable at times too, but I definitely prefer the more consultative bits more. I love learning about how a customer currently does their process and seeing what ideas I can come up with to make it more efficient. A common theme that can be easily solved with the right technology and approach is that many companies have processes in which the users are not dealing with the right amount of information at the right time. Too often users are interacting with entire documents when they only really need to touch a small portion of it. At worst, there is no document management system and these documents are simply emailed from one person to another where versions and changes continually get lost. When many people have to contribute to the same document, one really needs a system that can at least lock and version the document. Better yet, the system can build compound documents from smaller documents or parts of documents that can be assigned to different individuals.

A system like that which can surface and then roll up just the needed information to and from the specific users brings with it many advantages. But the actual interface for capturing that information has to be optimized as well. In many cases allowing the user to simply write whatever they want in a Word doc or rich-text editor may be perfect. In more cases some sort of template in which they just fill in fields is more appropriate. But in many situations the kind of information that should be on that small part of the whole document is very structured in nature and much better served by filling out a simple web form with form controls like constrained-choice drop-downs and check-boxes presenting the user with predefined choices to predefined questions.

I once learned about a customer’s auditing process and it basically went like this:

  • Auditor informs company they will be doing an audit at a certain date
  • Auditor comes in and audits those areas
  • Auditor issues a findings document indicating they have x number of issues they need to deal with
  • Responder from company creates an ‘issues document’ from this and emails it around to all people that might have input on any of the issues
  • Issues document gets edited by several users simultaneously and they all email them to the responder
  • Each issue needs to be responded to in basically one of three ways
    • “has been remediated” (referencing document number that shows this)
    • “will be remediated” (and date of expected remediation plus any notes)
    • “will remain non-compliant” (along with notes)
  • Responder receives emails from users, repeatedly bugging them for responses as needed and creates response document
  • Responder sends response document to Auditor

They were constantly losing information and repeating work due to this process.

It became obvious that what they should have been doing is creating and working with individual “issue” objects. I prototyped a solution for them on the Vignette (now Open Text) Collaboration platform that allowed them to create secure online audit workspaces for each audit. They were created by cloning a predefined templated workspace that had things like

  • a common discussion thread around the audit
  • a shared calendar with audit dates on it
  • placeholders for the auditor’s findings document and the official response document (which  had its own approval workflow)
  • an issues folder that lets one create specific issues from the auditor’s findings document

The issue object was based on a folder (the platform lets you extend the base object types like folders, documents, and discussions ) so that it could contain important reference materials, be subscribed to, be emailed into, and all the other things one can do with a base folder type in the platform. But I also gave it the custom attributes that it needed like ‘Due date’, ‘Assigned To’ ,’Response’ (with choices like ‘Has been remediated, Will be remediated, etc.),  ‘Notes’, ‘Reference #’, and ‘Expected Remediation Date’.

So someone would go through the auditor’s findings and then create an issue out of every issue on it. Each one would be assigned to the person that was best to answer it. That user would receive an email with a link to that online issue workspace that indicated its due date. The user would receive a preconfigured amount of email reminders until it was completed, as each issue object has a process defined around it.  The response document was then automatically created by a display template that rolled up the information that each user responded to into one nicely-formatted text document.

One of the more advanced and important features of the Open Text platform which we used here is that the workspace templates allow one to pre-map access rights so that the content in the cloned workspace  automatically has the correct permissions set on each of the cloned sub-folders and items.

With this solution in place the customer could respond much more quickly and accurately and with much less time spent by its valuable employees. Every audit has its own secure workspace with a full audit history of every response to every issue. This is also, I think,  a perfect example of optimizing a collaborative business process.

What we’ve been up to

It’s been a great first 16 months for Full Leverage Inc. We’ve had a half-dozen paying customers keeping us tremendously busy. Not surprisingly, most of our work to date has been for customers of the Vignette Collaboration and Portal platforms.

So far among other projects, we have worked on the following:

  • Helped build some public-facing websites and their content management system for a division of the World Bank called CGAP (Consultative Group to Assist the Poor)
  • Created a digital asset management system for a large hospital chain
  • Enhanced a hospital policy management system that Mike Letulle originally designed while with Vignette
  • Optimized the ability for users to comment on articles on a highly trafficked public website and the ability for the content managers to moderate those comments (which often go over 1000 comments/article)
  • Added multimedia capabilities to the main CGAP website (videos, slideshows, and podcasts)
  • Enhanced the implementation of a large consultancy’s intranet and extranet which provides online client engagment workspaces as well as helped transition the maintenance of the implementation from one company to another by training an offshore team

I’ll add more about some of these projects in subsequent posts.

Full Leverage is Open for Business

Full Leverage is now actively looking for companies who wish to be more competitive through process efficiency, innovation, and knowledge sharing.  Full Leverage has expertise in designing and implementing solutions based on the following software platforms: (Vignette) Collaboration, Portal, and Application Builder, (Global 360) Case360, and Insight360.

If you own these platforms and wish to leverage them better, or are simply looking around at technology options for improving competetiveness, please feel free to email Mike.Letulle@Full-Leverage.com .

Stay tuned for much more about specific solutions and offerings.

Business Intelligence on your iPhone

If you are a non-iPhone owner, then you probably don’t understand us. I’m one of those people who loves his new iPhone. I’m even one of the suckers who paid top dollar when it first came out.

I’ll decline to list all the reasons why. There are enough blog posts out there that rant about how cool iPhones are. But what I think a lot of people underestimate is the storm of change they are bringing to the business world. Apple’s new iPhone Apps rolled out last Friday. I was just checking the available business applications and saw that Oracle has a free iPhone application that extends its business intelligence dashboards, KPIs, and alerts to the iPhone.

 

Salesforce.com has something similar. Now that is vision! I mean when most software companies are finally starting to grasp that they should probably consider a decent format option for mobile devices accessing content over the web, these guys offer rich interactive client apps on the world’s most popular new mobile platform.  Sure a lot of BI solutions can already send alerts to people via email and even SMS if certain thresholds are hit, but nice graphs and charts on your iPhone? Now that’s slick!

I seriously think iPhone’s use by the business user is going to start to snowball now. They took a lesson from the facebook apps and put it on the iPhone. The interface is ideal for a small-size device to view varying amounts of content, and the easy upgradeability of the firmware makes it easy for Apple to keep it up-to-date and competitive. And now it’s inexpensive and faster! What is their stock trading at now???…

Optimize New Account Openings

Finally! There’s something so blogworthy going on that I had to stop working for a few a minutes and make a (sadly) rare post to this thing. Global360 has posted my recent demonstration of our New Account Opening solution. The really short story is that the processes that many financial institutions have around opening a new customer account are laden with issues. A lot of this is due to increased regulatory requirements that can be burdensome, complex, and costly. 

 The idea of properly using technology to not only get around the isssues and enhance the process, but also to make customer relationships more profitable while you are at it has been somewhat of a devoted cause of my manager at Global360, Phil Ayres. He has a Blog dedicated to these concepts. He and I have been hard at work over the last several months building a blueprint (or solution template – call it what you want) on top of our Case360 product which is what I currently specialize in.

Global360 just posted the recent 1 hour webinar we held in which Phil presents the business value and architecture followed by my delivering a 20 minute demonstration of the solution.

You can’t manage what you can’t measure!

This is quickly becoming the new mantra here at Global 360. I’m not sure where it originated exactly, but some of our sales guys in London are taking credit for it. It’s a simple statement that seems like common sense. How can one possibly manage something well if one can’t make the right kind of measurements against it at different times and compare performance? I’m sure it is this exact sentiment that causes many companies to rush to fill their portals with executive balanced score cards and dashboards with traffic lights and gauges. And come on who doesn’t like gauges? High-level managers and executives want to look at a simple dashboard and instantly know how all the different aspects of the business they are responsible for are doing. And they want to know this in as close to real time as possible. In an ideal world, if something important that I am responsible for even starts to look like it may be going off track, I should be proactively alerted via email or text message or whatever channel of my choosing. Companies are, in general, starting to get the importance of measuring the different aspects of their business. BI vendors have been making out pretty well in recent years because of this.

Many business processes require a special kind of business intelligence applied to it for it to be really meaningful. We at Global 360 call this BI that is specialized for process “Process Intelligence”, and we have a product called Insight360 that is ideally suited for it. It has two components to it that are both crucial to this whole measurement concept, simulation and analytics. The simulator allows one to model a high level business process made up of both human and system activities. One can setup participants who can work varying roles, be assigned costs, and even be assigned performance factors such as Mary works 30% faster than Bill. One can set up arrival patterns that describe how work enters the process, and these are so configurable that for example one can assign any one of about fifteen kinds of statistical distributions to it.

Bruce Silver, an independent analyst who focuses on BPM, wrote a pretty interesting post about simulators back in March of this year called Is Simulation Fake? .

Continue reading “You can’t manage what you can’t measure!”

Have I mentioned how much I love living in Austin?

 

 

I went to the Austin City Limits music festival this past Friday. I’ve been fortunate to have gone for the past three years straight as it is always one of my wife and my favorite weekends of the year. They have something like 130 bands in the course of 3 days spread over 8 stages in the huge fields of Zilker park. And they always get tons of great bands. I recommend to everyone that will listen to me that if you don’t live here, make plans early in the year to get a nice hotel room here for that weekend, you’ll be glad you did (unless you don’t like hanging in crowds of really cool people listening to really great music for some reason).

Anyway we were unfortunately only able to go to Friday night this year partly because it has gotten so popular that all the babysitters go to it too! But still, we caught some of Crowded House (one of my all-time favorite bands that I’d already seen several times) LCD Soundsystem, who I’d never heard of but rocked, Spoon who were great as expected, and finished the night off about 30 yards away from The Killers who were simply amazing.

Now in my defense, I don’t drive a lot. I work from my home office when not traveling, and when I do travel, I drive to the airport and back, which luckily for me is only a 20 minute drive each way. Therefore I’m missing out on what is most people’s source for learning about new music – the car stereo.

Back when I was a senior in college, I was a college marketing representative for Sony Music (which had just changed its name from CBS Records because of the buy-out). Back then I knew all the new music. I was your go-to guy. It was my job to give out promotional CDs, schmooze with college radio and press people and club owners, and take people back stage to concerts. I miss WZLY (radio station at Wellesley College ) most of all for some reason. But no longer. I’m sorry to say my awareness of hip new music has fallen to quite pathetic levels. So it was a great surprise when watching the Killers when they played just about every song that I ever caught on the radio and loved and wondered who it was. In hindsight that seems pretty dumb as the lead singer, Brandon Flowers, has such a distinct Robert Smith-like voice.  They closed with All These Things I’ve done which was amazing, but the best tune and what I am definitely calling my favorite current song was Mr. Brightside. Unbelievable!!!

 But honestly it isn’t just the bands that make ACL great. It’s the people. Everyone is so chill and easy to get along with. You’ve got about 70,000 people and very little security, and I don’t think I’ve ever seen anything that resembled a fight there. You gotta love Austinites!

We just decided to go.

I was watching Apollo 13 the other night, which I tend to do almost once a year because I love that movie so much.  One of my favorite lines is when Tom Hanks’ character and his wife are outside after watching the first moon landing and he says “From now on we live in a world where man has walked on the moon. And it’s not a miracle. We just decided to go.”

 I love that line! I love the simple truth of it. It underlines some of what is best about us. I think it is hard for us to comprehend these days just how far we were from being able to do it when Kennedy made his promise that we would send a man to the moon that decade back in 1961. We hadn’t even achieved orbit yet. The cajones it took for him to stand up there and say that when he did.

JFK commiting to moon landing

We need another JFK. That’s the only way we will ever lose our dependence on foreign oil. Someone needs to just stand up there and commit to it. Then we will achieve it. And when it comes to George W, I can’t believe it when people are surprised that his best suggestion is that car manufactures build cars with slightly better gas mileage and a longer daylight savings time. Never elect an oil man to get rid of oil. I’m not sure if anyone in the current running has that kind of moxie. I’m actually excited about the idea of Bloomberg throwing his hat in – he may have it.  And a self-funded independent not beholding to any party or PAC contributions just seems like the kind of thing this country needs. Anything else is just broken from the start if you ask me.

I think one of the main problems with political issues that take more than a couple terms to fix is that few presidents want to work on and spend money on things that they won’t even be in office for if they work out. That’s why social security and health insurance stay broken. And when is the last time a presidential candidate has even mentioned the welfare state problem our country is still plagued with? But that’s a whole nother conversation. But even if it took a comparative expense to the space program, inventing a cheap clean energy source would be more than worth it. Just think of all the hundreds of billions we spend on wars in the Middle East that we wouldn’t need to spend if they were sitting on top of fields of stuff we just don’t need.