HP Delivers Patch 1 Hot Fix 1 for Service Manager 9.20 Update…
December 14, 2010
Patch 1 HF 1 did fix our horizontal scaling issue. We are now happily running on SM 9.20.065 with very few issues. HP SM 9.21 is supposed to fix a few of the minor web client issues we are currently having, but they’re not severe enough to stop us from using the app. They ar very minor annoyances, actually…
How to make Advanced Search work better in Service Manager 7.10, 7.11 and 9.20
December 6, 2010
If you’ve ever used the ‘Advanced Filter’ capablities in Service Manager, you know by now that it’s a pretty good tool. Developed after the Service Desk flavor of Advanced Filter, it is still in it’s infancy stage, however.
One of the most irritating defects in the Advanced Filter capabilities is the fact that it does not use the information in the underlying link record to perform the queries.
For example, if you have 100,000 contacts and you want to look up a contact by email address in ‘Advanced Filter’ to find out how many Interaction records have been opened by that contact, you would have to open a new tab, open the contact search form and search for the contact from there. Then copy/paste that contacts unique ID into the Advanced Filter box for contacts. Clicking the ‘Fill’ box here does nothing more than bring back the entire list of contacts, useless if you do not know their unique id.
I have discovered a way to make the Advanced Filter functionality use the link information from the base link record. Simply it works like this:
- The Advanced Filter functionality for links uses the Filter.edit.addFilter display screen to control the actions on the screen. Therefore, it uses the ‘Fill’ display option to perform the processing on the link.
- Unfortunately, the RAD app only looks in the base link to get the name of the table to go to and the name of the field to fill. It does not use any of the logic from the $query variable or anything else in there.
- Therefore, we must make our own ‘Fill’ button for use on this display screen.
- We will use the fill.fc RAD application to replace the fill button that is currently being used.
- Because the same comm/fill box is used for every field in every table, we must make the code generic enough that it will work for all tables and all fields.
Here are the steps to make this happen:
- Find the Filter.edit.addFilter_fill display option
- Change the ‘Action’ drop-down from ‘fill’ to ‘redraw’
- In the ‘Pre Rad Expressions’ tab, enter this code: $L.void=rtecall(“rinit”, $L.code, $L.record, tablename in $L.filed)
- In the RAD tab enter fill.fc in the RAD application box
- Still on RAD tab, enter record and text in the ‘Names’ array
- Still on RAD tab, enter $L.record and aFieldName in $L.filed in the ‘Values’ array
- Then, on the Post Javascript tab, enter this code:
Now try it out! I did the last panel in javascript because it of the ‘eval’ funtion. It allowed me to create a variable name out of a string easily.
What still does’t work, even with this magic code? Well, if you are using any references to $file in your $query variable code (i.e. “if assignment in $file~=NULL”) it won’t work. You must use cursor.field.value() or other non $file statements to pull data from the field.
I think the most usefull thing that happens is that you can present the user with a search screen. Then, if they are searching for contacts, they can enter any search criterea they want in the search screen and are not limited to just entering the contact’s unique ID.
Try it out! It will work for any field that have a record in the base link for that table.
Part Three: Using Javascript to identify additional recipients
November 30, 2010
Using Javascript to identify additional recipients
In parts one and two, we learned how to create custom output messages with Javascript and how to create custom conditions that enabled us to use external criteria to send messages. In this last part, we will be able to see how to dynamically change the recipients of our message as appropriate.
The key to creating dynamic recipients of our messages is to use Javascript in order to return the list of people.
1. Your recipient list is constructed using the recipient field. Since the recipient field needs to return an arrayed list, you’ll need to return the created array from the Javascript. Since you will be returning an array, your jscall should NOT be enclosed in {}
2. You’ll need to pass the current record(s) to the Javascript.
Replacing the condition: You want to replace the argument with:
jscall(“CustomNotificationHelpers.ReturnNotifyUsers”, $L.file, $L.file.save)
The ScriptLibrary Function should look something like this:
function NotifyUsers(record, oldrecord)
{
var list = new SCDatum();
list.setType(8);
var fAssignment = new SCFile("cm3groups")
if (record.assign_dept != null)
{
fAssignment.doSelect("name=""+record.assign_dept+""")
list.push(fAssignment.manager)
}
if (record.assign_dept != null)
{
fAssignment.doSelect("name=""+record.request_dept+""")
list.push(fAssignment.manager)
}
if (record.assign_dept != null)
{
fAssignment.doSelect("name=""+record.coord_dept+""")
list.push(fAssignment.manager)
}
return list;
}
The preceding example shows how you can pull the assignment group manager for each of the groups within a change. This same type of functionality is used in Service Manager 7 to send messages to Change Delegates.
Conclusion
Over the last three parts, you’ve seen how we can control each of the pieces of the Notification engine using Javascript. The Service Manager notification engine is a very powerful tool to process and send notifications. The engine is embedded into many of the out of the box RAD applications. There are also hooks into the notification engine from the Document Engine, allowing you to create custom hooks. Lastly, where none of the other options are available, the notification engine can be called directly using the RAD application us.notify.
Historically the notification engine was limited in its ability to pull data from other records. Javascript has completely changed and has made notifications practically unlimitless.
Part Two: Using Javascript to identify when to send a message
November 30, 2010
Using Javascript to identify when to send a message
In part one, we learned how to create custom output messages with Javascript. In part two, we will see how to create custom conditions that enable us to accurately determine when to send a message.
As in part one, we will incorporate a jscall into our condition field in order to be able to query fields and conditions that are not in our $L.file (current record). Many times, we have a necessity to base our notifications on more than simply the contents of the current record. An excellent example of this is based on whether any of the approvals for the current record have been denied. This example is the condition we will evaluate today.
1. Your condition will be constructed using the condition field. Since the condition field should evaluate to either a true or a false value, this means that any call to Javascript here must return a value of true or false
2. You’ll need to pass the current record(s) to the Javascript.
Replacing the condition: You want to replace the argument with:
jscall(“CustomNotificationHelpers.NotifyifDenied”, $L.file, $L.file.save)
The ScriptLibrary Function should look something like this:
function NotifyifDenied(record, oldrecord)
{
var fApprovalLog = new SCFile("ApprovalLog")
var filename = system.functions.filename(record)
var anyDenied = fApprovalLog.doSelect("file.name=""+filename+" and unique.key=""+record.number+" and current.phase=""+record.current_phase+"" and status="Denied"")
if (anyDenied == RC_SUCCESS)
{
return true
} else {
return false
}
}
This example showed how your notification line is no longer bound to the contents of the current record.
The sky is the limit in your ability to finely tune and control when to notify customers for records.
This is continued in Part 3.
Notifications: How to extend the Out of the Box Notifications with Javascript (part 1)
November 30, 2010
Extending Notifications in ServiceCenter/Service Manager
Notifications in ServiceCenter/Service Manager have always been a mixed bag. Previously, it was always a challenge getting exactly what you wanted out of the notification engine. If your needs were more complex, the notification engine became more of an enemy than a trusted friend. Implementers were drawn to macros and scripting in order to deliver needed notifications.
Using Javascript, the Notification Engine has direct hooks in many of the modules and offers performance increase over the use of macros. When Javascript was first introduced to ServiceCenter/Service Manager, everything changed. Javascript may be used to build dynamic messages, evaluate complex expressions and return custom recipients.
Over the next few minutes, we are going to see how Javascript can quickly create custom notifications to implement complex expressions and output.
For the purpose of this article, we are going to assume that all of the functions here are contained in a Javascript Library entitled, “CustomNotificationHelpers”.
Part One: Creating Message Output
One common complaint of the notification engine is that fact that the output from the notification engine gets cut off and is hard to work with when using data from multiple sources.
Javascript in Service Manager was made for this type of problem.
1. You want to remove any formats you have for this exercise. We will not be using them here.
2. An scmessage record is required. This message should contain only %S. This means that our entire message is being returned as our argument.
3. Your message will be built using the arguments field. Any call to Javascript here must follow the convention of being enclosed within curly braces {}
4. Any normal “arguments” to your message will instead be passed to the Javascript. It’s possible that you would only need to pass $L.file since it will have access to all of the other fields.
Replacing the arguments: You want to replace the argument with:
{jscall(“CustomNotificationHelpers.OurMessageOutput”, $L.file, $L.file.save)
Note the scmessage used here of Class STRA and message.id = 999. This is defined in the scmessage file similar to the example below.
The ScriptLibrary Function should look something like this:
function OurMessageOutput (record, oldrecord)
{
var strMessage=""
var longmsg=0;
var tData=""
strMessage+="This is line one of our message output"
strMessage+="\n -- A backslash followed by an n indicates a line feed"
strMessage+="\n\n Record Number:"+record.number;
// An example of returning arrayed output in our message
for (longmsg=0;longmsg < system.functions.lng(record.description); longmsg++)
{
tData = tData +tDataTemp[longmsg];
}
tData = tData + "\n";
strMessage+="\n\n Record Description:\n "+tData
return strMessage
}
Using Javascript to create your message assures that your output will be delivered in your desired format. Long globs of text will be presented without being “truncated”. The loop for the description field takes the arrayed description field and turns it into a contiguous string. This will print the field in a single output stream on your message resulting in clear and clean output.
Additionally, your message may also pull information from other files.
function OurMessageOutput (record, oldrecord)
{
var strMessage=""
var longmsg=0;
var tData=""
strMessage+="This is line one of our message output"
strMessage+="\n -- A backslash followed by an n indicates a line feed"
strMessage+="\n\n Record Number:"+record.number;
// An example of returning additional information from another record
var fContact = new SCFile("contacts")
fContact.doSelect("contact.name=""+record.contact_name+""")
strMessage+="Contact Full Name:\t"+fContact.full_name;
return strMessage;
}
(continued in Part 2)
HP Delivers Patch 1 Hot Fix 1 for Service Manager 9.20
November 9, 2010
Just got the download links from support for the HP Service Manager 9.20 patch 1 hot fix 1 that should fix our licensing issue in horizontal scaling mode. I’ll report back the results. Hopefully this will complete our upgrade from HP Service Manager 7.11 to 9.20
HP Service Manager and MySql
November 1, 2010
HP Service Manager is a database driven application and currently supports IBM DB2, Oracle and Microsoft SQL Server. I prefer SQL Server because of the myriad of fixes that come out for Oracle every release of Service Manager and the ‘late-to-the-game’ support of IBM DB2.
HP should seriously consider including binary drivers for MySQL. MySQL is a perfectly good platform for the enterprise and HP Service Manager is uniquely positioned to use it, even the older versions. Two simple reasons…
- HP Service Manager does not use stored procedures, triggers, views or any of the other database specific programming techniques that would add a lot of development time or complexity to subsequent HP Service Manager releases.
- Many customers are already looking at running on Linux because of the low cost to purchase and support it, MySQL is the perfect compliment. Runs on Linux, free and easy to support.
For these two reasons alone HP should build drivers into Service Manager for MySQL. In fact, any MySQL only customers or even customers who may only run Linux may exclude HP Service Manager from their lists of possible software specifically because it does not support MySQL. Because of the current un-ease between HP and Oracle, HP really needs to consider another database platform. Please HP, consider MySQL.
Upgrading to HP Service Manager 9.20 from HP Service Manager 7.11 Part 3
October 29, 2010
HP has determined that Patch 1 for HP Service Manager 9.20 does have a defect regarding licensing in horizontal scaling mode and is releasing a hot fix to remediate that. When it comes out, I’ll post the results.
Upgrading to HP Service Manager 9.20 from HP Service Manager 7.11 Part 2
October 26, 2010
Well, we moved our upgrade to HP Service Manager 9.20 from HP Service Manager 7.11 into our Test environment.
I decided that we would not use the custom upgrade, but rather, would build our own upgrade unload package that contains only the objects that we touched post-upgrade. The list was rather short and revolved mostly around the changes we made when we cleaned up the datadict records. I felt that building the custom upgrade would:
- Be too complex and take too long to run.
- Not get all the objects that we modified anyway and we’d end up building our own unload script.
- Be unneccessary as we are already tracking all of our changes on our ‘build documentation’ and it is very easy to build an unload script from that.
- Possibly be a waste of time as we may find things that we need to move into Test from Dev that we missed and would have to end up re-building the entire thing over again.
We did build a purge script to get rid of NEW920xxx triggers and display options, because those fire or show up no matter what the name. All of the triggers that were renamed NEW920 were triggers that we had tailored using JavaScript to set some of the updated by, closed by, etc fields to store both the name and id of the specific user.
So far, we haven’t run into too many issues, other than the ones that are fixed by HP SM 9.20 patch 1.
However, we did find a problem with HP SM 9.20 patch 1 in a horizontally scaled environment. The application servers are validating their licenses against the local machine’s IP address instead of the load balancer’s IP address. Because we are on a *.*.42.* IP address license and our app servers run on a *.*.47.* license, the license was failing on the app servers. HP did notifiy us that it is a defect in Patch 1 and will be fixed with Patch 1 Hot Fix 1. We probably have a very unique environment and I’m guessing most customers would not have this issue. But if you are Horizontally scaled and thinking about going to Service Manager 9.20, I would hold off until this Hot Fix is released.
Upgrading to HP Service Manager 9.20
October 20, 2010
Since one of our clients decided to be an early adopter of HP Service Manger 9.20, I decided it would be interesting to track our upgrade process. We are mostly completed with the upgrade and it went suprisingly well. We hit a snag early on, but it was due to moving the upgrade files to the linux server accidently in ASCII mode, instead of Binary mode. The load transfer produced some strange errors which lead us down the path of Oracle issues (which are another story entirely).
I am happy to relate that the upgrade from HP Service Manager 7.11 to HP Service Manager 9.20 is much easier and smoother than previous upgrades, at least for this client. No messing around with old SCDB files, no major architectural changes, a much improved web experience, etc, etc, etc.
Did we have any issues? One major one, but it is fixed by HF 1 (we’re on Oracle, which I don’t normally recommend, but it is really up to the client’s overall architecture team what the enterprise is standardizing on). Other than that, because we planned well when we implemented our tailoring, we had very little code-merging to do. The biggest issues have been the extra display options and triggers that were added as NEW920*, but we just created a purge script to rid ourselves of those. We have about 3 weeks of work so far invested in this upgrade x 3 full time developers, but to be honest, 75% of what we’re doing is clean-up of datadicts for the advanced search capability which was needed pre-upgrade and we used this opportunity to clean them up.
This week we’ll be upgrading our Test system and next Tuesday, the testing team will hammer away at our relase for two full weeks of regression testing.
Our biggest question right now is: “Do we build a custom upgrade?”
I’m leaning towards no. I’ve had issues building custom upgrades in the past. Two reasons:
1. Sometimes it just crashes building it for no apparent reason (older versions).
2. The custom upgrade doesn’t always include everything you change in the system and there’s no good way to know what it included until you test it, which necessitates making a note of every object you changed during the upgrade and re-checking that they all made it anyway!
So, the plan is (for right now anyway) to build a custom unload containing our merged/updated objects, and loading that into the Test system once we’ve run the standard upgrade. We’ll see how that goes. It’s how we’ve pretty much had to do most of our upgrades in the past for our clients, and we’ve done dozens of them! We seem to have the best luck doing it this way and I don’t believe 9.20 has enough changes for it to change our strategy.
We have tried to install SM 9.20 patch 1 and have run into a problem with licensing in our Horizontal scaling environment. We’re working with support to try to resolve, so we’re stuck with a couple known issues that may plague us until we get that installed:
1. Random oracle errors. HF1 resolves them, but we decided to wait around for patch 1 to apply it all at once. They only show up in the log, but really make themselves apparent when you try to select records out of Views that are grouped. Yuck.
2. Checkboxes and DVD conditions in the web client. They simply don’t work in 9.2 web client. If you have any checkboxes with DVD, the web client doesn’t apply the logic properly. We’ve verified patch 1 fixes this issue in a sandbox environment.
Stuff we’re happy that HP Service Manager 9.20 fixes:
1. Choose Selected. When selecting multiple records in HP Service Manager 7.11 or earlier versions, you are stuck with their terrible ‘multiple selection’ off/on switch. This works, but it’s very cludgy and you can’t really tell what you’ve already selected. This really hurts us in places like our tailord screlation functionality, that allows the user to select multiple records at the same time to relate to a single record (i.e. selecting 25 incidents to relate to a problem record all in one action). Thank goodness this is finally fixed! Now, you can just select all the records in your result set, then choose ‘Choose Selected’ and it copies them all to your array of combo box. It is a great improvement and one of the main reasons we upgraded to 9.20
2. The web client. It’s much improved. Faster, nicer looking, compressed javascript, no more inset scrolling! If you look at the code base on the web server, it’s much larger now, which is a very good thing. Service Manager 9.20, meet Web 2.0! Finally!
3. Views and inboxes. There were some strange inconsistencies when using this, especially for power users. Most of those issues seem to be cleared up.




