[DB2] Check HADR status

using db2cmd then type

db2pd -db MAXDB75 -hadr

Remark MAXDB75 is database name.

Read More

[SCCD] Import ticket information when status is ‘CLOSED’

When ticket status is closed. We can’t import to update ticket infomation.

I found a trick to do it by changing historyflag attribute to 0 via sql command.

Then you can import it.

DON’T FORGET TO CHANGE THE HISTORYFLAG BACK TO 1 AFTER you finish importing.

Read More

[SCCD] Changing maximo context root

The context is the web shared location on the server where web files are located. In the case of Maximo the URL often looks a follows:

servername:9081/maximo

In this example:
“http://” defines the protocol
“servername” is the DNS look-up to determine the server address
“:9081” is the port number where the application is listening
“/maximo” is the context

It is sometimes desirable to change the context of the application to something more recognizable for an end user. Examples of this might include systems that have multiple instances of an application on the same server for example Development, Test, and Training. It may be helpful to name the contexts “maxdev”, “maxtest”, and “maxtrain”.

The context is configured in the “deployment-application.xml” file of the V6 Maximo or V7 TPAE application.

The XML file is found in the following path:

<maximo_home>/applications/maximo/META-INF

To change the context locate the web tags section as shown below:

<web>
<web-uri>maximouiweb.war</web-uri>
<context-root>/maximo</context-root>
</web>

Change the word maximo to the context required for the application.
Save the file
Rebuild the EAR file
Re-deploy the application

The new URL will be “protocol//servername:port/new_context”

Reference : http://www-01.ibm.com/support/docview.wss?uid=swg21406013

How to set Maximo/SCCD without context root  /maximo

Here is description how you can make your base web address to http://hostname/ instead of http://hostname/maximo using IBM HTTP server configuration, without restarting Maximo/SCCD.

1. Edit httpd.conf

Remove # in the line: LoadModule rewrite_module modules/mod_rewrite.so

With removing # you enable this rewrite module.
Add the following at the end of the file config file:

RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/$ /maximo/ [R=301,L]

2. Open the WAS console–>Servers–>WebServers –>webserver1 . Click Generate plugin, Propagete plugin and restart webserver.
3. Try now the address: http://hostname/

Thanks   Tamas Kubicsek for this tip.

How to set Maximo/SCCD redirect from / to  /maximo

By default Maximo is deployed to the http://servername/maximo url. When the user types in http://servername they will be presented with a generic IBM page. To enable automatic redirection add the following lines to the httpd.conf in the IBM http server.

RewriteEngine On
RewriteRule ^/$ /maximo

Read More

[SCCD] Push button to change Tab

Some trick to create button to change tab, you can do it via Application Designer.

In push button properties assign Event as “click” and Target ID is <Control ID of destination Tab>

Read More

[SCCD] Adding Workflow Assignment Section

In Ticket application, you can add section of workflow assignment to view current assignment to whom.

By exporting your application definition and add context below.

<section collapsed=”false” id=”sccd_header_row1_col1_sec1″ label=”Current Workflow Assignments” sigoption=”PMSRVISCAT” sigoptiondatasrc=”MAINRECORD”>

<pmguiwfassign height=”54px” id=”sccd_header_row1_col1_sec1_assign1″ viewdatasrc=”pmsrv_wfassign_datasrc” width=”100%”/>

</section>

Read More

[SCCD] Useful Links

SmartCloud Control Desk Support Home

SmartCloud Control Desk Performance Articles

Product support content for Maximo Asset Management

Product support content for Smart Cloud Control Desk

 

Read More

[SCCD] Hide Some Status in Change Status Dialog

In Change/Work Order Application, there are a lots of status. To reduce the list you can filter it out by steps below.

  1. Create Condition in Conditional Expression Manager Application with expression below

    :&USERNAME& in (SELECT USERID FROM GROUPUSER WHERE GROUPNAME = ‘MAXADMIN’)

    above condition is to allow only system admin can see it.

  2. Select WOSTATUS domain in Domain Application.
  3. Select Value you want to hide it. And Click View/Modify Condition
  4. Fill the condition is step 1 and select the application you want to hide the status.

 

Thank this technote for guideline.

Read More

[SCCD] increase size of TICKETID

To change size of TICKETID of TICKET object. You also need to change several object to avoid some error.

which are

RECORDKEY in the WORKVIEW object
RECORDKEY in the WORKLOG object
TICKETID in the TKSTATUS object
ORIGRECORDID in the TICKET object
RELATEDRECKEY in the RELATEDRECORD object
OBJECTKEY in the INBOUNDCOMM object

 

Reference : https://developer.ibm.com/answers/questions/212594/how-do-you-modify-ticketid-when-numbers-run-out/

Read More

[SCCD] Doclink Relationship

ให้ Activity สามารถเห็นไฟล์แนบที่อยู่ใน Ticket เดียวกันได้

(ownertable=’WOACTIVITY’ and ownerid in (select workorderid from woactivity where origrecordid=:origrecordid and istask=0 and siteid=:siteid))

 

ให้ Activity สามารถเห็นไฟล์แนบที่อยู่ใน Parent (Ticket) ได้

(ownertable in (‘SR’,’INCIDENT’,’PROBLEM’) and ownerid in (select ticketuid from ticket,woactivity where woactivity.origrecordid=ticket.ticketid and woactivity.origrecordclass= ticket.class and woclass=’ACTIVITY’ and wonum=:wonum))

 

ให้ Activity สามารถเห็นไฟล์แนบที่อยู่ใน Related Ticket กับ Parent ได้

(ownertable in (‘SR’,’INCIDENT’,’PROBLEM’) and ownerid in (select recordkey from ticket,relatedrecord where ticketid=recordkey and ticket.class = relatedrecord.class and relatedreckey=:origrecordid))

Read More

[SCCD] Automation Script function to check membership of security groups

I got a requirement to validate field when user are in specific security groups.

After googling, I found this entry http://www.learnsccd.com/2015/02/maximo-automation-script-validate-group.html (Thank you) . It explains how to validate group membership of current user login.

So I cut some part of code and make it as jython function for reuse next time.

 

s_secgroupset = “‘MAXADMIN’,”,’MAXREG'”
s_rem = “*****”

def ingroup():
mbosetMaxuser = MXServer.getMXServer().getMboSet(“MAXUSER”, mbo.getUserInfo())
mbosetMaxuser.setWhere(“userid = ‘” + user + “‘”)
mbosetMaxuser.reset()
mboMaxuser = mbosetMaxuser.moveFirst()

if (mboMaxuser is not None):
mbosetGroupUser = mboMaxuser.getMboSet(“GROUPUSER”)
mbosetGroupUser.setWhere(“groupname in (” + s_secgroupset + “)”)
mbosetGroupUser.reset()
print s_rem+”Where Clause: “+str(mbosetGroupUser.getCompleteWhere())
mboMaxGroup = mbosetGroupUser.moveFirst()

if (not mbosetGroupUser.isEmpty()):
print s_rem+”in groups”
return 1

if (mbosetGroupUser.isEmpty()):
print s_rem+”not in groups”
return 0

 

Read More