Thursday, December 03, 2009

FUDs in ITSM 6.1.5/6.1.6

As some of you are probably aware, the FUD process is giving unexpected results for the ITSM 6.1.5 and 6.1.6. Whilst you’re able to create an upgrade set, importing the FUD on the target database results in an object reference error.


It seems that it will only error if my FUD included any field definitions. Anything else (quick actions, expressions, BR’s, triggers, panel defs) would still succeed in being imported.




There is a bit of a work around for this issue but it's not the prettiest solution and is not very customer friendly. I'm going to assume the version is 6.1.6 but it works equally well for 6.1.5


1. Create a FUD in your source system in 6.1.6
2. Open Administrator on a 2nd test version of target database in 6.1.1
3. Import the FUD (from the 6.1.6 system) into the Administrator in 6.1.1
4. Take the Definition set created by the FUD Process Import in the 6.1.1 Administrator and save in another location (provided the commit was successful)
5. Open Administrator on your normal Development Environment in 6.1.6.
6. Open the definition set saved in step 4 in the 6.1.6 Administrator
7. Commit.


This seems to solve the issue but as I said it's not pretty, fast or customer friendly

Monday, September 21, 2009

Prompting for a Confirmation Yes No Message box when completing an assignment

The combination of script expression and button guard allows you to pop a yes/no box to confirm that an assignment is to be completed

First Create a script expression with the code below *obviously you can edit the text of the message box you want to appear.
import System
import Fusion
import Fusion.Api
import System.Reflection

class FusionScriptWrapper implements IScriptWrapper
{
function FusionScriptWrapper()
{
// place constructor logic here
}
function MessageBox(text:System.String, caption:System.String, MessageBoxButtons:System.String, MessageBoxIcon:System.String)
{
try
{
var assembly : System.Reflection.Assembly;
var MessageBox : System.Type;
var Buttons, Icon, result : System.Object

assembly = Assembly.LoadWithPartialName("System.Windows.Forms");
MessageBox = assembly.GetType("System.Windows.Forms.MessageBox");
Buttons = System.Enum.Parse(assembly.GetType("System.Windows.Forms.MessageBoxButtons"), MessageBoxButtons);
Icon = System.Enum.Parse(assembly.GetType("System.Windows.Forms.MessageBoxIcon"), MessageBoxIcon);

var argMSG : System.Object[] = [text,caption,Buttons,Icon];

result = MessageBox.InvokeMember("Show",System.Reflection.BindingFlags.InvokeMethod,null,null,argMSG);

return result.ToString();
}
catch(exc : System.Exception)
{
return null;
}
}
function Process(currentBusinessObject : Fusion.Api.BusinessObject, currentField : Fusion.Api.Field) : Object
{
var objReturn : Object

var userResponse : System.String;
userResponse = MessageBox("Are you sure you want to complete this assignment?","Assignment Completion","YesNo","Question")

if (userResponse=="Yes")
{
objReturn = true
}
else
{
objReturn = false
}


return objReturn
}
}

Then select the properties of the complete button. Select the "Action" tab and select the Guard Tab with in it (shown below)



Add the new expression ( which I called MsgBoxTestPrompt) as the condition. Select the Nothing option in the behaviour drop down.

Now when the user selects the complete button they are prompted if they are sure the want to complete. If they select Yes then the action will fire. If the select No nothing will happen.

The only thing to be careful of is that guards don't prompt in the web (or any prompt for that matter)

Wednesday, September 09, 2009

A helpful tip for troubleshooting IIS

The extended logs for IIS (stored in ..\Windows\System32\Logfiles\W3SVC1\) are stored in GMT time by default which can make finding your issue a little bit harder. Here's a simple way to change it to your local time.

The W3C Extended Logging format spec requires logging in GMT time. You can set the log roll-over to occur at midnight local time if you want. This avoids problems with situations like Daylight Savings, where you log goes "backwards in time" by an hour.

To enable logfile rollover based on local time, not GMT, open the IIS Manager, locate your website, rightclick and choose "Properties". On the "Web Site" tab, click "Properties" next to logging. Then check "Use local time for filename and rollover"

Saturday, September 05, 2009

Updating fields with a Script Expressions

I've found this line of code invaluable when Quick Actions and Business Rules just won't work for you
currentBusinessObject.GetField("FieldName").SetValue(new Fusion.FusionValue(VariableName));
It writes the variable VariableName to the field FieldName in the current business object. You can also replace VariableName variable with a value of any type (obviously in the format "String")

Thursday, September 03, 2009

ITSM: Quick Action Security in Web

In the 6.x systems you now have the ability to secure quick actions (by security group) this means that you can create a quick action that only some users can A. Run B. Edit C. Delete rather than specifying this for All quick actions.

The issues here is that in 6.2 and 6.1.4 and below the security does not work in the web client.
However, restricting Quick Actions does work in ITSM 6.1.5 since ITSM 6.2 is in older code build than ITSM 6.1.5. ITSM 6.2 and ITSM 6.1.5 codes builds will be merged in ITSM 6.3.

ITSM: The Perils of Hiding Tabs

I discovered this in the web 6.2 today and it reminded me of an issue with tabs in the full client.

In some versions of 5.x there was an issue that disabled all of the tabs from working. The issue comes from making the FIRST tab in the layout of an object hidden or conditionally hidden. This issue is fixed in 6.2 (or 6.1.2 or later) in the Full Client but the issue still exists in the web client.

The error is not too easy to spot in the web client, the first indication is that you can't navigate to any tab other than the first displayed tab. Secondly there is an yellow error next to "Done" in the web browser. The error details are "Unterminated String Constant".

The simple (and only fix) is to make the initial tab in the layout always visible. Either swap it with another Tab or change the Visibility rule.

Monday, February 09, 2009

ITSM 6.1.x Tip for the Week : Errors with DTC Setup

"Exception of Type 'Fusion:FusionException' was thrown. The partner transaction manager has disabled its support for remote/network transactions."
Last week I came across this error when setting up a connect (and also using the application). ITSM (or GMEE) will still allow you to create the connection and connect to the application server but will through this error and prevent saving of the object if you have the BPML engine running.
The issue is with the security setup of the Microsoft DTC service on both the ITSM and SQL Servers. There is a very helpful article from technet about 'New functionality in the Distributed Transaction Coordinator service in Windows Server 2003 Service Pack 1 and in Windows XP Service Pack 2'

This outlines the settings that need to be enabled to allow the ITSM and SQL servers to communicate.

Monday, January 19, 2009

ITSM Tip for the week: Opening Self Service to a new Incident not the dashboard

Normally in ITSM  (and in all 5.x versions)  linking to Self Service would involve going to the users dashboard via the http://[itsmserver]/Servicemanagementweb/SelfServiceLogin.aspx where [itsmserver] would be the name of the server (without the []).

In 6.1.x you can now link directly to an object with the following format.

http://[itsmserver]/ServiceManagementWeb/IntegrationInfo.aspx?CommandName=SHOWSINGLEBUSOB&Role=SelfService&Param1=Incident&Param2=[RECID]

where [itsmserver] would be the name of the server and [RECID] is the RecID of the object you would like to open (without the []).

You can use the same formatting to link directly to a new object in SelfService. For example, if you wanted a self service user to go straight to the new incident screen without having to go to the dashboard and then click the "new incident" option. You can use the same format as about but simply leave out the [RECID]

http://[itsmserver]/ServiceManagementWeb/IntegrationInfo.aspx?CommandName=SHOWSINGLEBUSOB&Role=SelfService&Param1=Incident&Param2=


Monday, January 05, 2009

ITSM Tip for the week: Adding a count to the Journal Tab

I’ve had a whole host of customers ask for this so I thought I'd add the details up. The script below counts the number of Journals that are related to the incident. 

How I’ve been using this script is to display the journal tab as “Journals (1)” (like the tabs in a HEAT system does). To do this you will need to add a field to the Incident that stores the Journal count (which I usually call JournalCount). Assign the script to the Field as a Calculation. Finally change the label of the tab to be a Named Expression. That Named expression should be of the Simple Calulation Type and would look something like this -> 'Journals ('+TRIM('{$[FIELD]Incident.JournalCount$}')+')'. 

The same principle will also apply for any other tab.

Journal Count Script 

import System

import Fusion

import Fusion.Api

 

class FusionScriptWrapper implements IScriptWrapper

{

     function FusionScriptWrapper()

     {

           // place constructor logic here

     }

 

     function Process(currentBusinessObject : Fusion.Api.BusinessObject, currentField : Fusion.Api.Field) : Object

     {

           var objReturn : Object

           var numberofjournals : int

          

           // Initialisation

           objReturn = true

          

           // Get all the Journals

           var bizCollectionJournals : Fusion.Api.BusinessObjectCollection

           bizCollectionJournals = currentBusinessObject.GetRelationship("IncidentContainsJournal").BusinessObjects

          

           // Check for Journals from the Relationship

           if(bizCollectionJournals != null)

           {

                     // Count the number of Journals

                     numberofjournals = bizCollectionJournals.Count

                     objReturn = numberofjournals

               

           }

 

          // Return the number of Journals

          return objReturn

     }

}