Blog for IBM Maximo,SCCD 7.5 ,Automation Script,MBO and TADDM solutions .

ICD 7.6 Software and Hardware Requirements

ICD 7.6 Software and Hardware Requirements


ICD 7.6 (Recommended)
Application Server
IBM WebSphere Application Server Network Deployment
Hardware
• Processor: Intel - Pentium ( recommended) Multi -Server Topology  2+ Cores @ 2 GHz each
• Memory : 16GB RAM
• Hard Disk Space : 100 GB
Software
• Operating System: Windows Server 2012 R2 Standard Edition
Database Server
Microsoft SQL Server Standard Edition 2014
All Applicable OS with Prerequisite Tasks done
Admin Workstation
IBM Control Desk 7.6
Hardware
• 2-6 GHz processor (minimum)
• 8 GB RAM (minimum)
• 10 Mbit/s network connection between administrative workstation and middleware servers (minimum)
• Hard Disk Space : 60 GB
Software
• Operating System: Windows Server 2012 R2 Standard Edition

Maximo/SCCD Start Center Result Set Queries

Maximo/SCCD Start Center Result Set Queries

My SRs
----------
(historyflag = 0) and (PMSCCRID is null)and (status in (select value from synonymdomain where maxvalue in ('NEW','PENDING','QUEUED','INPROG') and domainid in ('SRSTATUS'))) and owner =  :USER  order by internalpriority,targetfinish ASC


My Teams Service Requests
----------------------------------
(owner=:USER or ownergroup in (select persongroup from persongroupteam  where respparty=:USER)) and status not in (select value from synonymdomain where maxvalue in ('RESOLVED','CLOSED') and domainid in ('SRSTATUS'))


My Late Service Requestes
---------------------------------
(owner=:USER) and status not in (select value from synonymdomain where maxvalue in ('RESOLVED','CLOSED') and domainid in ('SRSTATUS') ) and (targetfinish is not null) and (actualfinish is null) and (targetfinish <= current timestamp)


Service Request SLA Breach
-----------------------------------
(historyflag = 0) and (status in (select value from synonymdomain where maxvalue not in ('RESOLVED','CLOSED','SLAHOLD') and domainid in ('INCIDENTSTATUS'))) and
((actualstart is null and coalesce(adjustedtargetresponsetime,targetstart) < current timestamp) or (actualfinish is null and coalesce(adjustedtargetresolutiontime,targetfinish) < current timestamp))


Unassigned SRs
-------------------
(historyflag = 0) and (PMSCCRID is null) and (status in (select value from synonymdomain where maxvalue in ('NEW','PENDING','QUEUED','INPROG') and domainid in ('SRSTATUS'))) and owner is null  order by internalpriority,targetfinish ASC


All Open Service Requests
----------------------------------
status in (:&synonymlist&_srstatus[NEW,QUEUED,INPROG,PENDING,SLAHOLD])


Service Request No SLA Applied
----------------------------------------
(historyflag = 0) and (status in (select value from synonymdomain where maxvalue not in ('RESOLVED','CLOSED') and domainid in ('INCIDENTSTATUS'))) and ticketuid not in (select ownerid from slarecords)


All Late Service Requested
---------------------------------
status not in (select value from synonymdomain where maxvalue in ('RESOLVED','CLOSED') and domainid in ('SRSTATUS') ) and (targetfinish is not null) and (actualfinish is null) and (targetfinish <=  current timestamp) order by targetfinish


Service Request SLA Breach
-----------------------------------
(historyflag = 0) and (status in (select value from synonymdomain where maxvalue not in ('RESOLVED','CLOSED','SLAHOLD') and domainid in ('INCIDENTSTATUS'))) and
((actualstart is null and coalesce(adjustedtargetresponsetime,targetstart) < current timestamp) or (actualfinish is null and coalesce(adjustedtargetresolutiontime,targetfinish) < current timestamp))



Incident Email Interaction Add Work Log

Incident Email Interaction Add Work Log


from psdi.mbo import SqlFormat
from psdi.server import MXServer
from psdi.common.emailstner import LSNRUtil
from psdi.common.emailstner import LSNRHTMLTagRemover

print "INC_MFMAIL_ADDWORKLOG - BEGIN"

objectkey = mbo.getString("OBJECTKEY")
strclass = mbo.getString("OBJECTNAME")
personid = mbo.getString("PERSONID")
subject = mbo.getString("SUBJECT")
tmpbody = mbo.getString("MSGBODY")

tagRemover = LSNRHTMLTagRemover()
msgbody = tagRemover.removeTag(tmpbody)

if (objectkey==''):
    strstart = "[["
    strend = "]]"
    startpos = subject.find(strstart) + len(strstart)
    endpos = subject.find(strend, startpos)
    ticketid = subject[startpos:endpos]
    mbo.setValue("OBJECTKEY", ticketid)
else:
    ticketid = objectkey

if (strclass==''):
    strclass="INCIDENT"

strkey = "WORKLOG_DESCRIPTION="
worklogldesc = ''
inpos = msgbody.find(strkey)
if (int(inpos) > 0):
    strnewline = ";"
    startpos = msgbody.find(strkey) + len(strkey)
    endpos = msgbody.find(strnewline, startpos)
    worklogldesc = msgbody[startpos:endpos]

strkey = "WONUM="
wonum = ''
inpos = msgbody.find(strkey)
if (int(inpos) > 0):
    strnewline = ";"
    startpos = msgbody.find(strkey) + len(strkey)
    endpos = msgbody.find(strnewline, startpos)
    wonum = msgbody[startpos:endpos]

strkey = "WO_DESCRIPTION="
wodesc = ''
inpos = msgbody.find(strkey)
if (int(inpos) > 0):
    strnewline = ";"
    startpos = msgbody.find(strkey) + len(strkey)
    endpos = msgbody.find(strnewline, startpos)
    wodesc = msgbody[startpos:endpos]

#Change Activity Status
strkey = "ACTIVITY_COMPLETED="
activitystatus = ''
inpos = msgbody.find(strkey)
if (int(inpos) > 0):
    strnewline = ";"
    startpos = msgbody.find(strkey) + len(strkey)
    endpos = int(startpos) + 1
    activitystatus = msgbody[startpos:endpos]

if (wonum <> ''):
    tmp = "E-mail Update from activity #" + wonum + " (" + wodesc + ")"
    worklogdesc = tmp[:100]
    sqlf = SqlFormat("ticketid=:1")
    sqlf.setObject(1, "INCIDENT", "TICKETID", ticketid)
    incidentSet = mbo.getMboSet("$incident", "INCIDENT", sqlf.format())
    incidentMbo = incidentSet.getMbo(0)

    if (incidentMbo is not None):
        worklogSet = incidentMbo.getMboSet("WORKLOG")
        worklogMbo = worklogSet.add()
        worklogMbo.setValue("DESCRIPTION", worklogdesc)
        worklogMbo.setValue("DESCRIPTION_LONGDESCRIPTION", worklogldesc)
   
    #Change Activity Status
    sqlf2 = SqlFormat("wonum=:1 and origrecordid=:2")
    sqlf2.setObject(1, "WOACTIVITY", "WONUM", wonum)
    sqlf2.setObject(2, "INCIDENT", "TICKETID", ticketid)
    activitySet = mbo.getMboSet("$woactivity", "WOACTIVITY", sqlf2.format())
    activityMbo = activitySet.getMbo(0)

    if (activityMbo is not None):
        mxServer = MXServer.getMXServer()
        statusmemo = "EMAILUPDATE"
        current_actstatus = activityMbo.getString("STATUS")
        if (str(activitystatus) <> '1' and current_actstatus <> 'INPRG' and current_actstatus <> 'COMP' and current_actstatus <> 'CLOSE'):
            activityMbo.changeStatus("INPRG", mxServer.getDate(), statusmemo)
        elif (str(activitystatus) == '1' and current_actstatus <> 'COMP' and current_actstatus <> 'CLOSE'):
            if (current_actstatus <> 'INPRG'):
                activityMbo.changeStatus("INPRG", mxServer.getDate(), statusmemo)
            activityMbo.changeStatus("COMP", mxServer.getDate(), statusmemo)

#print "Mark Complete"
attrarray = ["status"]
keyarray = ["COMPLETE"]
newmbo = LSNRUtil.updateInboundComm(attrarray, keyarray, mbo)

print "INC_MFMAIL_ADDWORKLOG - END"
 

Incident Activity Reassign Notification

Incident Activity Reassign Notification

Create Object launch point with below Object Event Condition and Script Code.

Object Event Condition:

origrecordclass='INCIDENT' and status in ('WAPPR','QUEUED','INPRG') and (:$old_owner <> :owner or :$old_ownergroup <> :ownergroup)

Script Code:

from psdi.server import MXServer
from psdi.mbo import SqlFormat

print "INCACTREASSIGN - BEGIN"

#print "Set Status to Queued"
strstatus = mbo.getString("STATUS")
if (strstatus <> 'QUEUED'):
    mxServer = MXServer.getMXServer()
    mbo.changeStatus("QUEUED", mxServer.getDate(), "")

#pring "Check Owner or Owner Group"
strowner = mbo.getString("OWNER")
strownergroup = mbo.getString("OWNERGROUP")

if (strowner <> '' or strownergroup <> ''):
    #print "Send Email Notification"
    sqlf = SqlFormat("templateid='INCLVL2ASSIGN' and objectname='WOACTIVITY' and status='ACTIVE'")
    commTemplateSet = mbo.getMboSet("$commtemplate", "COMMTEMPLATE", sqlf.format())
    commTemplateMbo = commTemplateSet.getMbo(0)
    if commTemplateMbo is not None:
        commLogMbo = mbo.createComm()
        commLogMbo.copyFromTemplate(commTemplateMbo)
        commLogMbo.sendMessage()
else:
    errorgroup="ACTIVITY"
    errorkey="NOASSIGNMENT"
#print "End Send Notification"

print "INCACTREASSIGN - END"

Capturing the Hostname on a Ticket

Capturing the Hostname on a Ticket

You can configure the SmartCloud Control Desk to automatically store the hostname/IP of a user's workstation (client machine or machine connection to SmartCloud Control Desk) in a ticket (Service Request, Incident or Problem) when the ticket is created by following these steps.

1. Add new field to TICKET named CREATEDBYHOST
2. Set the default value of CREATEDBYHOST to 127.0.0.1
3. Create a relationship named 'CREATEDBY' on object SR (of INCIDENT, PROBLEM) with                child object: PERSON where clause: personid=:createdby)
4. Create a crossover domain named SESSION2TKT on object MAXSESSION
        from field CLIENTHOST to field CREATEDBYHOST and
       validation where clause:userid=:CREATEDBY.USER.MAXSESSION.userid
       list where clause:userid=:CREATEDBY.USER.MAXSESSION.userid
5. Associate the SESSION2TKT domain with CREATEDBYHOST
6. Save all changes and run configdb

In order to capture the hostname of the user's workstation (client machine) and not just the IP address, your web server must be configured to perform reverse DNS lookups.

To enable reverse DNS lookups in the IBM HTTP Server do the following:

1. Edit the httpd.conf file (located in Program Files\IBM\HTTPServer\conf\httpd.conf on Windows
2. Find the line that says: HostnameLookups off
3. Change the line to say: HostnameLookups on
4. Save the file and restart the web server

Incident Update SLA

Incident Update SLA

print "INCUPDATESLA - BEGIN"

#Get New SLA
#mbo.getThisMboSet().save()
slaSet = mbo.getMboSet("$serviceagreement_SLA", "SLA", "")
result = slaSet.apply(mbo)

print "INCUPDATESLA - END"

Solution Published Notification

Solution Published Notification

Create Object Launch Point on Solution Object with below Object Event Condition and Script.

Update:1
Object Event Condition: status='ACTIVE' and :$old_status <> :status

Automation Script:

from psdi.mbo import SqlFormat

print "SOLPUBNOTIFY - BEGIN"

#print "Send Email Notification"
sqlf = SqlFormat("templateid='SOLPUBL' and objectname='SOLUTION' and status='ACTIVE'")
commTemplateSet = mbo.getMboSet("$commtemplate", "COMMTEMPLATE", sqlf.format())
commTemplateMbo = commTemplateSet.getMbo(0)

if commTemplateMbo is not None:
    commLogMbo = mbo.createComm()
    commLogMbo.copyFromTemplate(commTemplateMbo)
    commLogMbo.sendMessage()

#print "End Send Notification"

print "SOLPUBNOTIFY – END"

Automation Script- Find 16 Digit numbers from long description


Find 16 Digit numbers from long description

Set the escalation to read the script. The script takes input from Long Description of SR, find the 16 digit numbers from that string with mentioned pattern and then set that numbers to summary(in SR application).


1. Created Script with Action Launch Point having two variables (IN, OUT).

      
 
 
Script Code
--------------
# Find 16 Digit numbers from Long Description and Set all 16 Digit Numbers in Summary
from java.lang import Runtime
from java.util.regex import Matcher
from java.util.regex import Pattern
descript=''
longdesc1=''
# Find the patterns of 16 Digit numbers from String and Set that 16 digit numbers into summary

pp1 = Pattern.compile("((\d{4})-(\d{4})-(\d{4})-(\d{4}))|((\d{4}) (\d{4}) (\d{4}) (\d{4}))|(\\b\\d{16}\\b)" )
m1= pp1.matcher(longdesc)
while(m1.find()):
 longdesc1=longdesc1+" "+m1.group()
descript=longdesc1
 
1   2. Created Escalation 1038 with SEPARATE action.










 Validation

Before script triggering (SR Number: 1142)

 
After Script triggering:
Script triggered through escalation. The Summary field set the with 16 digit Numbers.