Micro Focus Service Manager – Tips And Tricks

Micro Focus Service Manager is the first software solution for IT Service Management and Enterprise Service Management built on machine learning and analytics. It is a proven service desk solution with support for thousands of users, easy-to-use self-service, and powerful extensibility, which makes it the perfect fit for large-scale enterprises.

This post will have the monthly Micro Focus Service Manager Tips and Tricks which will be a consolidation of various common issues in Micro Focus Service Manager. Do check out this article for troubleshooting tips and tricks for other tools.

Table of Contents

1. Micro Focus Service Manager – Tips And Tricks – Dec 2020

1. Instructions to obtain the SSL transactions with the application of Java Virtual Machine (JVM)

Usually Djavax.net.debug is utilized to trace the Secure Socket Layer (SSL) communication between clients and the server. User’s ultimate query is about SSL is about which debug parameter to use to isolate SSL communication between the Service Manager Client and Service Manager Server. It is quite simple to obtain Service Manager debug information on the SSL transactions. You can do that by adding the Java Virtual Machine (JVM) option in the Service Manager sm.ini configuration file, or to the singular processes that are in the sm.cfg configuration file on on the Command Prompt:

JVMOptionN:-Djavax.net.debug=ssl

You must remember that this parameter is an Oracle Java Parameter and not particular to the Service Manager. It also provides SSL debug information on any of the JVM handling SSL connections that you need.

2. Instructions to send an email that is specific about user option value from a request from Catalog

It is quite necessary to follow a set of rules to send an email that is specific about the user option value from a catalog item request. 

  1. You need to create a ruleset to send the email.
  2. Then you must add a rule to the ruleset type HTML email notification.
  3. Then you need to select a particular template and then elaborate on the condition.
  4. Then you need to carefully add the following Javascript code to send the email.
var users = "";
var fsvcCartItem = new SCFile("svcCartItem",SCFILE_READONLY);
var fRlt = fsvcCartItem.doSelect("cartItemId="+record.svcCartId);
var xml = new XML();
xml.setContent( fsvcCartItem.options );
var node = lib.xmlHelpers.getElement( xml, "XXXXX", "id" );
users = node.getValue()

You need to note that > Replace XXXXX by the name of the user option that has the email address that is used to receive email.

  1. Now you need to add a ruleset at the right moment where the email is essential to send in the workflow phase or the transition.

3. Steps to solve SM 9.52 P5 web tier showing a blank index page on the Internet Explorer

It often happens that the SM 9.52 P5 webtier shows a vacant index page on the Internet explorer(IE). After the upgrade of SM 9.52 webtier to P5, when the user logs into the SM with Internet explorer it shows a black page. Even after being executed properly, the error may occur. The console displays the error given below:

Syntax Errorcwc-Extjs-All.js (9,85261)

According to the users explanations, this error happens after upgrading the Web Tier Patch 5. It is also observed that it occurs only in Internet Explorer 11. You can solve this error with the following steps:

  1. You need to end/force stop Apache Tomcat service.
  2. Then you need to go to the Web Client folder and then to WEB-INF.
  3. Then classes and after that to application-context.xml.
  4. Then you need to change the value IE10 to the one of IE11 in the next line, that goes: IE=11.
  5. Do not forget to save the changes in the document. Then you need to clear all of the Tomcat and Internet Explorer cache.
  6. After the junk is cleared you need to start the Apache Tomcat services.

You need to remember that the newer versions that start from 9.61 P5 already set Internet Explorer=Edge for the specific supporting screenshot pasting features.

4.  Instructions to help users print variables on Workflow/ RuleSet for the troubleshooting

Users have faced problems while printing variables on Workflow and they come across an error. You must remember that modifying Microfocus Proprietary workflows is not possible. Users may need to “Tailoring- Process Designer- Copy Existing Workflow” to their own workflow and modify the previous one. Then they could also modify the particular category to utilize their own previous workflow to initiate it.

  1. First, you need to make a new Ruleset
  1. Tailoring – Process Designer – RuleSets
  1. Then you need to make a new ID
ID: custom.print.variables
Name: custom.print.variables
  1. Then you need to save the changes.
  1. Now you need to Rule

Then you need to type: Run JavaScript

  1. Then you must add print statements. Then you will be able to print the field contents: 

If you want to print values of a particular “request” in Phase “Fulfillment” utilize the term in the string to find the print statement’s location.

Code specifically for On-Screen-Messages : (on-screen latest messages appear on the very top)
print ("Phase Fulfillment after successful update record.assigned_group : "+record.assigned_group);
print ("Phase Fulfillment after successful update oldRecord.assigned_group : "+oldRecord.assigned_group);
Output for the on-screen-Messages for this could be like:
Phase Fulfillment after successful update oldRecord.assigned_group : SYSTEMS ADMIN
Phase Fulfillment after successful update record.assigned_group : FACILITIES
Specific Code for the Log-Messages:
// Get a logger for name "Phase Fulfillment after successful update"
var mylog = getLog("Phase Fulfillment after successful update");
// Set the log level
// mylog.setLevel('info');
mylog.setLevel('trace');
// Log a message for log level "trace"
mylog.trace('trace message: record.assigned_group : '+record.assigned_group);
mylog.trace('trace message: oldRecord.assigned_group : '+oldRecord.assigned_group);
Output in the sm.log for could be like: 
JS T Phase Fulfillment after successful update trace message: record.assigned_group : FACILITIES
JS T Phase Fulfillment after successful update trace message: oldRecord.assigned_group : SYSTEMS ADMIN

Users need to note that the field names that have a dot (.) in dbdict need particularly unique handling while they are used in the JavaScript. You can always use the syntax:

record.<field name with dot replaced by underscore>

or

record["<field name>"]
  1. Then you must save the changes by selecting ‘OK’

2. You have to use the RuleSet to print the values in the Workflow

  1. Tailoring – Process Designer – Workflows
  2. Then you need to select the particular workflow you want to add in the print statement.
  3. You need to choose the Phase where you need to print the value, like it could be like: Fulfillment in ‘request’ workflow.
  4. Then add the Ruleset that you made recently.
  5. Do not forget to save the Workflow

3. You need to perform Test Scenario

  1. You need to follow your steps to produce again. 
  2. Then keep a notice on the on-screen-messages / sm.log for your message printing the values of the different variables.

5. When Rabbitmq pods don’t start and it remains on pending stage

It often happens that Rabbitmq pods do not start and stay on pending stage. Then the kubectl elaborates this error message given below:

Warning  FailedScheduling  46s (x12 over 16m)  default-scheduler  0/2 nodes are available: 1 node(s) didn’t match node selector, 1 node(s) were unschedulable.

This error could occur due to the Worker not having the ‘Worker’ label on them. Due to that rabbitmq pod is not able to find a node to start it accurately.

  • You need to Run command given below:

kubectl label nodes <node_name> Worker=label

This should assign the Worker label to the particular node, and then rabbitmq will be able to recognize the node so it works.

6. Support of the ServiceManager for Simultaneous Multithreading (SMT)

It is often the user’s biggest query that the ServiceManager application can support Simultaneous Multithreading (SMT) or not. The recent configuration for SMT on the RHEL servers is: BIOS which has Hyper Threading (SMT). It is a well known fact that EnabledRHEL inherits BIO SMT setting Oracle 12c default, that has SMT set to off. 

SMT comes under the most known ‘transparent technology’, it means that it remains totally unnoticeable to SM, like invisible. SMT is specifically a technology at the Operating System and Kernel level that allows devices to run more threads simultaneously. SM is a threaded application since the beginning, which enables it to execute many threads simultaneously at the same time. SMT barely permits the Operating System to run multiple threads simultaneously.

7. Solution for SM DevOps Support 1.10 to work on Unix after a failure

It often happens that the Script Library RunRestfulApplyPatch does not work or return ‘true’ for unix. It can happen because ‘Feature Tracker’ is malfunctioning and does not work on a unix based SM installation. 

The ScriptLibrary RunRestfulApplyPatch will have to adapt to function in Unix:

For that you need to replace the line

        __isUnix = system.functions.version()[0].toLowerCase().indexOf( ‘unix’ ) > 0;

with this line

        __isUnix = system.functions.version()[0].toLowerCase().indexOf( ‘unix’ ) >= 0;

If you have SM version 6.x you can simply download ‘Feature Tracker’ from the original Marketplace: SM DevOps Support 1.10

This specific characteristic has been merged into the 970 OOB, so it becomes part of the 970 OOB system and it will be released with SM970 together.

8. Instructions to figure out which action/ruleset results Open-Idle status to load automatically

It is quite easy to find which of the background action/ Ruleset lets Open-Idle status to automatically load. It keeps loading each and every time an update is done from the extaccess user. It happens that the user comes across the interaction status filed with the existing RTM 4 trace and they find 3 rulesets – removed all but still open – Idle status is getting loaded automatically.

  • Whenever the user updates the status that is filed of the interaction, a Rest-API user is used. The exact status of the interaction will simultaneously change ‘Open’ to ‘Idle’
  • Then you need to check if the Rest-API user will update any other fields in Interaction, if that is the case then it would perform well. 
  • The issue will arise when it is about the Status (open) field.
  • The user needs to check the RTM3 log and if there is no log that is related to the issue then they need to check webService.
  • In the WebService Configuration user need to find expression tab
  • There should be a customized line present there that says:

if ($L.bg.action=”save” and current.phase in $L.file=”Work In Progress”) then (open in $L.file=”Open – Idle”)

  • After this being typed in and the user has commented out this line, the problem will be solved.

9. When the SM upgrade has failed to accomplish its duty

The issue is that SM upgrade is often unable to produce properly. This error could happen due to:

DEV: upgraded from 9.30 classic to 9.64 HYBRID in the DEV and generated the customUpgrade package.

Prod: 9.30 classic, application version 9.30.

The production error mainly looks like this:

Process panel fix.pd.data in RAD apm.upgrade.convert.preSM940 encountered error in line 1 (apm.upgrade.convert.preSM940,fix.pd.data)
Cannot evaluate expression (apm.upgrade.convert.preSM940,fix.pd.data)
Bad arg(2) oper = (apm.upgrade.convert.preSM940,fix.pd.data)
Cannot evaluate expression jscall("upgradeConvert.fixPdData") (apm.upgrade.convert.preSM940,fix.pd.data)
Script 'SecurityProfileCopy' line 254: ERROR Cannot store a boolean into an object of type string at char 1

To solve this issue, you basically need to utilize the troubleshooter. You also need to follow this document to upgrade the application: 

In the beginning you need to utilize the custom upgrade to the test environment.

At item#8 The Upgrade Utility will respectively display the status while the upgrade is being done, users come across this error.

The solution would be:

  • You need to write “datadict” in the SM command Promptline
  • Then you need to Search “ocmprofile” on it.
  • You need to find “Update” in the list
  • Then you need to change the type to “Character” one.

It could happen that the field has a “Character”. Then the problem was a data issue in the SM environment record. And the update value must have been “True” for any one of them. Then that was creating the error and the users have found the root cause of the problem.

10. When the schedule script does not work accurately

It often happens while we are working with the scripts, the schedule script does not respond or work properly. You can solve this issue in an easy way by following the steps given below: You need to create a script that will select all the SDs that are related to IM in the time period of the last 10 days. When the problem related to the IM is solved, SD will work fine as well.

The script would be:

var ret = RC_SUCCESS;
system.functions.rtecall("log",ret,"MFSD02745038 - schedule truong_update_lockedSD_IMsync is called");
var today = new XMLDate( new Date() );
today.addDuration('-P10D');
//print(today.getSCDateTimeString());
var screlate = new SCFile("screlation");
//var query = "source.filename=\"problem\" and depend.filename=\"incidents\" and source=\""+"IM10374"+"\"";
var query = "source.filename=\"problem\" and depend.filename=\"incidents\" and sysmodtime>'"+today.getSCDateTimeString()+"'";
if(screlate.doSelect(query) == RC_SUCCESS)
{
print("found relation records to update");
do{
var sd_record = new SCFile("incidents");
var sd_ID = screlate.depend;
print(sd_ID);
var IM_record = new SCFile("probsummary");
var IMquery = "number=\""+screlate.source+"\"";
if(IM_record.doSelect(IMquery)== RC_SUCCESS)
{
//print("result "+IM_record.current_phase);
}
var qry = "incident.id=\""+sd_ID+"\"";
if(sd_record.doSelect(qry) == RC_SUCCESS)
{
if(sd_record.open!=IM_record.problem_status)
{
sd_record.resolution = IM_record.resolution;
sd_record.open=IM_record.problem_status;
//system.vars.$update_action = system.vars.$pmc_actions;
var ret=sd_record.doAction("save");
}
}
print("updated "+sd_ID);
system.functions.rtecall("log",ret,"MFSD02745038 SD Status After doAction save = "+sd_record.open);
}while(screlate.getNext()==RC_SUCCESS);
}
else
{
print("there is no relation SD IM records in last 10 days");
}
system.functions.rtecall("log",ret,"MFSD02745038 - schedule truong_update_lockedSD_IMsync is END");