Saturday, 22 December 2018

Conditionally Attaching and Limiting any Domain through Automation Script | IBM Maximo

sometimes requirements are like we need to redefine a domain; lets say a table domain to any attribute, or we may want to change domain as the condition changes.

 suppose End user is only able to see item as per the storeroom dynamically and only the items with reorder is enabled while planning material in workorder application.



1. create a new Table domain
domain: WPITEM
validation: itemnum = :itemnum
2. Write an Attribute Launch Point
Object: WPMATERIAL
Attribute: ITEMNUM
Events: Retrieve List

we will write the WHERECLAUSE in our script as per the conditions.


Maximo Reorder Formula Redesign | IBM Maximo

Few days ago we had a requirement to alter the default Reordering process used in Maximo. For that we came to a solution which is very simple through Maximo Automation Script but it takes us a lot of research to cater all the impacts and other issues.
In reorder process Maximo uses Reorderpad tables and ReorderMutex to lock other while reordering.



Saturday, 15 December 2018

Part 2. Create Condition Monitoring and Enter Meter Reading Values Using Rest API | IBM Maximo

In the previous post, we created meters and attached meters to asset. Today we will create condition monitoring record and enter meter values using Rest Api.

1. First step is to create object structure MX-MEASUREPOINT1. Add MEASUREPOINT object to it and add a child object of CHARPOINTACTION.
Object Location Path: MEASUREPOINT/CHARPOINTACTION
Relation: CHARPOINTACTION.

2. Create a new HTML file and paste a following code:
<html>
<body>
<form name="input" action="http://maxhostname:9080/maxrest/rest/os/MX-MEASUREPOINT1?_lid=wilson&_lpwd=wilson" method="POST">
    POINTNUM      <input name="POINTNUM" value="1111" type="text"> <p/>
    ASSETNUM                <input name="ASSETNUM" value="11245" type="text"> <p/>
    SITEID          <input name="SITEID" value="BEDFORD" type="text"> <p/>
    DESCRIPTION          <input name="DESCRIPTION" value="Vibration check" type="text"> <p/>
    MEASUREPOINTID     <input name="MEASUREPOINTID" value="" type="number"> <p/>
    METERNAME             <input name="METERNAME" value="VIBRATION1" type="text"> <p/>
    CHARPOINTACTIONID       <input name="CHARPOINTACTION.ID1.CHARPOINTACTIONID" value="" type="number"> <p/>
    VALUE <input name="CHARPOINTACTION.ID1.VALUE" value="High" type="text"> <p/>
    JPNUM      <input name="CHARPOINTACTION.ID1.JPNUM" value="JP-111" type="text"> <p/>
    PRIORITY <input name="CHARPOINTACTION.ID1.PRIORITY" value="" type="text"> <p/>
<input type="submit" value="Submit">
</form>
</body>

Sunday, 9 December 2018

Part 1. Create Meters and Attach Them to Assets in Maximo Using Rest API || IBM Maximo

We will start with create meters using rest API.

1. The first step is to create a new object structure MX-METERS and attach METERS object to it .


2. Create a new html file and copy and paste a code to it.

<html>
<body>
<form name="input" action="http://mxhost:9080/maxrest/rest/os/MX-METERS?_lid=wilson&_lpwd=wilson" method="POST">
    METERNAME                <input name="METERNAME" value="VIBRATION1" type="text"> <p/>
    DESCRIPTION                <input name="DESCRIPTION" value="Temperature" type="text"> <p/>
    METERTYPE          <input name="METERTYPE" value="CHARACTERISTIC" type="text"> <p/>
    DOMAINID               <input name="DOMAINID" value="HLM" type="text"> <p/>
    <input type="submit" value="Submit">
</form>
</body>

Thursday, 18 October 2018

How to Remove Excel VbaProject Password in XLSM file

1. open XLSM file with 7-Zip
export/drag xl/vbaproject.bin file somewhere in your computer

2. edit exported file vbaproject.bin with HEXEditor
find/replace "DPB" with "DPx"
save and import back it into 7zip xl/vbaproject.bin location
close 7zip.

3. open file with excel, it gives error press OK.
press F11 to open vba editor.

4. in Tools Menu > VBAProject Properties > Protection (T)
Uncheck: Lock project for viewing.
ok and save.


We are Done 😊



Friday, 12 October 2018

Database configuration formula | Maximo

Formulas are introduced from Maximo 7606 on ward, which leveraged us to make calculation related things easier as we were already doing it through auto scripts.

Although it is not new after 761 release but still not very common.

There are 2 types of DB formulas; attribute formulas and Object level formulas.

Below mentioned is one example of Attribute formula in database configuration.

In this example we write a simple Excel style IF condition formula.


Wednesday, 10 October 2018

IBM Cognos Contents for BI Report Development


What is Cognos connection
Examine Cognos connection UI elements – create a URL, Login, Logoff
Entry properties: General Properties, Permission, Report, Query, Analysis, Job, Agent and Page Properties
Navigation – Public and Private Folder
Open reports with report name, Go to links, Run reports from a view
Run Reports – Prompt Pages, Printing a report and Open in excel
View the run history of a report and historical reports
Closing and creating quick links to reports – my folder
Shortcut and browser bookmark
Metadata Modelling
Introduction to framework manager
Framework manager basics
User interface, navigation, objects

Wednesday, 5 September 2018

IBM Maximo 7.6.1 Installation Guide & Preview Site | Maximo

Maximo 7.6.1 was released on 27 July 2018 as we already discussed in our previous blog post by Mr. Umer with the title of  Maximo Asset Management 7.6.1 Released | IBM Maximo


Windows Server 2016
WebSphere Application Server 9.0.0.7
Db2 Advanced Workgroup Server Edition 11.1.0.0
Maximo Asset Management 7.6.1


Richard on IBM developer works has posted this detailed step by step installation procedure with screenshots;

Installing Maximo Asset Management 7.6.1 From Start to Finish

Monday, 30 July 2018

Maximo Asset Management 7.6.1 Released | IBM Maximo

IBM released Maximo 7.6.1 on 27 July, 2018. Here is a sneak preview of what users can expect in Maximo 7.6.1.
New features and capabilities will help your organization achieve greater asset management efficiency through improvements in usability, integration, installation, and business intelligence.




What’s New in Maximo 7.6.1?


Monday, 23 July 2018

Failover - Host two will be added in hosts file If Host one is Down | Linux

This bash script we used for our of our client.
to use simple create a file e.g failover.sh and paste the below mentioned script into it.
now configure a cronjob to run this script every after 5 minutes or whatever you like.

#!/bin/bash
HOST1="10.2.4.115"
HOST2="10.2.4.116"
COUNT=4
for myHost in $HOST1
do
  count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }' 2>/dev/null)
  #count=$count"skj"
#  echo $count" ccc"
  if [ $count -gt 0 ]; then
    # 100% failed
    g_count=`grep -c $HOST1 /etc/hosts`
    if [ $g_count -eq 0 ]; then
      echo "change host1 ip"
     `cat /etc/hosts | sed 's/10.2.4.116/10.2.4.115/' > /etc/hosts_tmp`
     `cp /etc/hosts_tmp /etc/hosts --reply=yes`
    fi
    echo "Host : $myHost is UP"
  else
    g_count=`grep -c $HOST2 /etc/hosts`
    echo $g_count
    if [ $g_count -eq 0 ]; then
      echo "change  host2 ip"
     `cat /etc/hosts | sed 's/10.2.4.115/10.2.4.116/' > /etc/hosts_tmp`
     `cp /etc/hosts_tmp /etc/hosts --reply=yes`
    fi
    echo "Host : $myHost is down"
  fi
done

Tuesday, 3 July 2018

Get Application Name in Maximo Automation Script (Python/Jython) | IBM Maximo

Below is the Example to use an application name in automation script. Display certain error message if current application is Work Order Tracking (Oil):

Tuesday, 29 May 2018

Workflow Migration From Source to Target Environment Using Migration Manager | IBM Maximo

Migration Manager migrates configuration content from one product environment to another. You typically migrate configuration content from a development environment to a test environment and then to a production environment.
After you develop and configure your applications, you can migrate the configurations to a test environment. After testing the configurations, you can migrate them to a production environment. By using Migration Manager, you can migrate iterative configuration changes in a planned and controlled manner.
To migrate the configuration content, you organize it into packages. The packages go through a series of steps that make up the migration process. Some steps occur in the originating environment, called the source environment, and some steps occur in the destination environment, called the target environment.

We will take the example of simple workflow migration for basic understanding of migration manager.

Workflow Migration:

Source Server Steps:

  • Goto > System Configuration > Migration > Migration Groups




















  • Create New Migration Group and enter Name, Description
  • Select desired Object Structures to migrate, in this case we are going to migrate a workflow, for that object structure selected here is DMWFPROCESS.

Thursday, 24 May 2018

Reprocessing Interface Table Errors MEA (Maximo Enterprise Adapter for Oracle Applications) | IBM Maximo

When an error occurs in an Maximo outbound transaction, the adapter stops processing the transaction and updates the interface table status columns with information about the error. There is no user interface for correcting errors in the Maximo Asset Management interface tables, so you must update the record directly with a SQL tool.

Interface Table Status:
Every outbound interface table contains the following columns, which contain information about the status of the transaction:
OA_IFACESTATUS: The status of the transaction. It has three types:

1. DONE: The transaction was successful.
2. WARNING: The data was transferred but a problem was encountered.
3. ERROR: Due to a system or data error, the data transfer did not occur. Check OA_IFACEMESSAGE for error messages.

OA_IFACETIMESTAMP: The date and time the transaction completed or failed.

OA_IFACEMESSAGE: A general message about errors.

The triggers, which reside on the outbound interface tables, are of trigger type before insert or update. Therefore, directly updating the interface table transactions ensures that the transaction is processed.
Triggers do not exist for the inbound enterprise services. These processes are asynchronous and the integration framework retrieves the records.
The following steps describe how to update an outbound transaction with an error in the interface table, then send the transaction to the Oracle open interface tables again.

Friday, 4 May 2018

Attached Docs Edit Restriction When Record Is Not In Workflow Assignment Using Automation Script | IBM Maximo

Its a continuation from my last post in which a record is not in certain user's assignment, then it cannot be edited. Only assigned user can edit that record.
But there is one problem, the users cannot edit PR record but they can edit attached docs associated with corresponding record and it doesn't apply on attached documents. Because technically, the attach docs object is different.
We have implemented this requirement with different object event condition (using doclinks, pr and wfassignment objects) using automation script on Purchase Requisitions Application.

Object Launch Point :  DOCLINKS

Script : Jython

Object Event Condition: 

(select count(ownerid) from wfassignment where ownertable='PR' and assignstatus='ACTIVE'
AND ownerid in (select prid from pr where prid =:ownerid) )>0
and
(select count(ownerid) from wfassignment where ownertable='PR' and assignstatus='ACTIVE'
and assigncode IN (:&USERNAME&) AND ownerid in (select prid from pr where prid =:ownerid) )=0

Events: Save, Add, Update, Delete, Before Save

Thursday, 3 May 2018

Deny Users From Editing Application Record if It's Not In Their Workflow Assignment Using Automation Script | IBM Maximo

One of the requirements we get that in a active workflow process, if a record is not in certain user's assignment, then it cannot be edited. Only assigned user can edit that record. We have implemented this requirement using automation script on Purchase Requisitions Application.

Object Launch Point :  PR

Script : Jython

Object Event Condition: 
(select count (ownerid) from wfassignment where ownertable='PR' and assignstatus='ACTIVE'
AND ownerid in (select prid from pr  where prnum=:prnum))>0
and
(select count(ownerid) from wfassignment where ownertable='PR' and assignstatus='ACTIVE'
and assigncode in (:&USERNAME&) and ownerid in (select prid from pr  where prnum=:prnum))=0

Events: Save, Add, Update, Before Save

Wednesday, 2 May 2018

Alternative way of generating reports in IBM Maximo using JavaScript | Maximo

Today I found a nice article in which the we can generate simple reports directly from Maximo using JS in you own provided excel template.

No doubt JavaScript is in the top of the list these days. After Google's framework v8; now people use the old JavaScript as back-end called Node.js instead of just front-end 'JavaScript'.

Alternative way of generating reports in IBM Maximo using JavaScript

Wednesday, 14 March 2018

Dynamic NAT Overload or PAT | Cisco

4 simple steps to configure PAT/ NAT Overloading in Cisco IOS

1. create list for local network
2. create pool of puchassd SINGLE IP
3. merge/attach both above to nat inside

4. set inside and outside interfaces

access-list 1 permit 192.168.1.0 0.0.0.255
ip nat pool pool1 1.1.1.50 1.1.1.50 netmask 255.0.0.0
ip nat inside source list 1 pool pool1 overload
int fa0/0
ip nat inside
int fa0/1
ip nat outside
show ip nat translation


Friday, 9 March 2018

Administrative Distance of different Routing Protocols | Networks

Route Source
Default Distance Values
Connected interface
0
Static route
1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route
5
External Border Gateway Protocol (BGP)
20
Internal EIGRP
90
OSPF
110
Intermediate System-to-Intermediate System (IS-IS)
115
Routing Information Protocol (RIP)
120
Exterior Gateway Protocol (EGP)
140
Unknown*
255

Low administrative distance takes precedence in route distribution.

Suppose we have 2 routing protocols RIP and EIGRP; 120 and 100 respectively. EIGRP will be preferred over the RIP because of the administrative distance is 100.

However, Administrative distance can be changed to take precedence

For instance, lets enable RIP route by using distance command to modify distance

Router1#show ip route
Router1(config)#router rip
Router1(config-router)#distance 90

Now check again with show ip route command
You will see that RIP has taken precedence over EIGRP.



IGP vs EGP and ASN | Network

Interial Gateway Protocol (IGP):

IGP is a routing protocol that handles routing within a SINGLE autonomous system(AS).
RIP, RIPv2, IGRP, EIGRP and OSPF are the examples of IGP.

Exterior Gateway Protocol (EGP):
EGP handles routing betweeen difference AUTONOMOUS SYSTEMS (ASs).
BGP is the example of EGP.

What is Autonomous system number (ASN)?

An ASN is globally unique number which enables the system to exchange EXTERIOR routing information with  other neighboring ASs.

reference: https://www.cisco.com/c/en/us/about/press/internet-protocol-journal/back-issues/table-contents-12/autonomous-system-numbers.html

Wednesday, 7 March 2018

Find and kill a process which is listening on port 8080 | Windows


netstat –aon | find "<port number>"
Example:
netstat -ano -t  | findstr LISTENING | findstr :8080


now kill using taskkill command

taskkill /F /pid xxx

or kill by name for example.
taskkill /im notepad.exe

Tip: to find a string in a file using findstr:
findstr /i "helloworld" abc.txt
or
findstr /i "^hell*rld" abc.txt


------------------------------

Linux:
my best command:
netstat -tulpen

example:
netstat -tulpn | grep LISTEN | grep '(8080 |8081 |8082 | xxx)'

or

$ lsof -i tcp:1555

Wednesday, 28 February 2018

Schedule this Batch to Download via FTP | Windows

We can use Linux-based utilities which are more secure and available for windows, like "wget" and "WinSCP" which is also a good option, but I preferred to stay in windows using the default old FTP command. Or we also can use Powershell instead of the old command-prompt-based batch file.


Anyhow, below is just one windows command using echo to redirect the text in a file and then the file will be called by FTP.

Just Run or you can write this command in a batch file to schedule.

cd /d "C:\Users\AQ\INTEGRATION\download"

echo open 10.152.30.229 >> ftp.txt & echo user myuser mypassword >> ftp.txt & echo binary >> ftp.txt & echo get "filename.dat" >> ftp.txt & echo bye >> ftp.txt & ftp -n -v -s:ftp.txt & del ftp.txt


1. 1st line is the path, where you want to download. 

2. Replace myuser and mypassword with the real FTP user credentials.

3. This script will create a file ftp.txt, and at the end of the line: this file is called by FTP before deletion. 


Note: Security concerns: username and password are written here. 

We also can use power sh


Tuesday, 13 February 2018

Stop Workflow in BULK by Escallation | IBM Maximo

Lets say we want to stop the workflow for multiple PRs at once. We can achieve this creating a new escalation and schedule it perform this action automatically.

for instance, we want to stop PR-123 from backend, for that we are going to create a escalation and once action which will be attached with this escalation.


STOPWF_PR    Stop PR Workflow
Applies to: WFINSTANCE
Condition:
active = 1 and ownertable = 'PR' and exists (select 1 from PR where PR.PRID = wfinstance.ownerid and prnum in ('PR-123')
)
Schedule: Your desired time and date. suppose every 1 minute

Escalation point: Add a row only, no need to enter anything
 
Action : STOPWF
Create a new action and attached to this escalation
 
Action: STOPWF Stopwork
Type: Custom Class
Custom Class: psdi.workflow.StopWorkflowAction (auto populated)
Accessible from:
ESCALATION

Saturday, 27 January 2018

Keyboard Shortcuts | IBM Maximo

You can use a combination of keys to perform an action without using a mouse. 

Standard keyboard shortcuts

You can navigate among and within the applications by using a combination of keys. You can use the following keyboard shortcuts to navigate the application screens.
ActionKeyboard shortcut
Move from one interface element to the next.Tab key
Select buttons, links, and menu options.Enter key
Select or clear a check box.Spacebar
Display field help for field in focus.Alt+F1
Keyboard shortcuts for global navigation
Link nameKeyboard shortcut
BulletinsAlt+B
Go ToAlt+G
ReportsAlt+R
Start CenterAlt+C
ProfileAlt+P
Sign OutAlt+S
HelpAlt+H
ReturnAlt+R
Return with ValueAlt+W

Open Specific Record Through URL Link In Email Using Relationship in Communication Template | IBM Maximo

There is user requirement of opening specific application record in maximo when users clicks the url link on email.

Let us take an example of email notification for condition monitoring app. We have communication template which is setup on MEASUREMENT object. But we want to open the specific record of condition monitoring app which has object MEASUREPOINT. We will use it using relationship substitution variable to get the unique id of application record (:MEASUREPOINT.measurepointid).

OBJECT: MEASUREMENT

RELATIONSHIP: MEASUREPOINT

UNIQUE ID: MEASUREPOINTID

SUBSTITUTION VARIABLE: :MEASUREPOINT.measurepointid

Monday, 22 January 2018

How to Make The Hover Info Boxes Stay Up Longer In Scheduler And Graphical Assignment | IBM Maximo

The information/tool tip only displays for a short period of time and goes away too fast. You could use  the Maximo System Properties application to change the duration of the tool tips on Scheduler and Graphical Assignment

  • Go To System Properties
  • Change the parameter of following properties given below:

Saturday, 20 January 2018

Adding Custom Hovers On Field Using Relationships | IBM Maximo

IBM Maximo has provided default Hover windows for some fields. We will explain how to add custom hover window in maximo using custom relationship.

If you want to display the PR Line Item record hovering. The custom relationship can be used with PRLINE object relationship to INVENTORY to retrieve storeroom item information.

  • Go to Database Configuration
  • Object: PRLINE 
  • Create Relationship: PRL_INVENTORY
  • Child Object: INVENTORY.
  • Where Clause: itemnum=:itemnum and itemsetid=:itemsetid and location=:storeloc and siteid=:siteid