Posts Tagged ‘Maximo 7’

Consume Web Services with VB.Net 2005

Hello;

Here is an example of consuming web services with VB 2005.. IT creates a new SR with authentication.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Dim maximoSvc As New Maximo.MXSR()
        Dim maximoSRArr(0) As Maximo.MXSR_SRType
        Dim maximoSR As New Maximo.MXSR_SRType()
        Dim changeDate As New Maximo.MXDateTimeType
        Dim DESCRIPTION_LONGDESCRIPTION As New Maximo.MXStringType
        Dim REPORTEDBY As New Maximo.MXStringType
        Dim IMPACT As New Maximo.MXLongType
        Dim reply(0) As Maximo.SRKeyType
        Dim cred As New System.Net.NetworkCredential
 
        Dim actLabCost As New Maximo.MXDoubleType
 
        cred.UserName = "maxadmin"
        cred.Password = "maxadmin"
        maximoSvc.Credentials = cred
 
 
        DESCRIPTION_LONGDESCRIPTION.Value = "longdesc"
        REPORTEDBY.Value = "USER"
        IMPACT.Value = 4
 
 
        maximoSR.DESCRIPTION_LONGDESCRIPTION = DESCRIPTION_LONGDESCRIPTION
        maximoSR.REPORTEDBY = REPORTEDBY
        maximoSR.AFFECTEDPERSON = REPORTEDBY
        maximoSR.IMPACT = IMPACT
        changeDate.Value = System.DateTime.Now
        maximoSR.CHANGEDATE = changeDate
        maximoSR.URGENCY = IMPACT
        actLabCost.Value = 0
        maximoSR.ACTLABCOST = actLabCost
        maximoSRArr(0) = maximoSR
        reply = maximoSvc.CreateMXSR(maximoSRArr, System.DateTime.Now, True, "", "EN", "11111", "7.0")
        Dim MaximoTicketid As String
        MaximoTicketid = reply(0).TICKETID.Value

Have a good day…

read comment here

Flow Action in Workorder

There is a new feature called Flow action in Maximo 7.1
It lets you to change status of activities,workorders and task according to the related records..

Here is the detailed explanation of this feature:
http://www-01.ibm.com/support/docview.wss?uid=swg21327119&myns=swgtiv&mynp=OCSSWK4A&mynp=OCSSLKT6&mync=R

Have a good day..

read comment here

Writing a Custom Condition Class

One of the best improvements in Maximo 7.x is conditional user interfaces. You can create your conditions in Conditional Expression Manager application. But sometimes there are some issues that you can not write sql sentences. For these cases we can write our own condition class. We must extend psdi.common.condition.CustomCondition class to write the new class. And we need to override evaluateCondition(MboRemote mbo, Object arg1) method. Here is an basic example..

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.custom.workorder;
 
import java.rmi.RemoteException;
import psdi.mbo.*;
import psdi.common.condition.CustomCondition;
import psdi.util.*;
 
public class TipCondition implements CustomCondition {
 
    public boolean evaluateCondition(MboRemote mbo, Object arg1) throws MXException, RemoteException {
        newWORemote wo = (newWORemote) mbo;
 if (wo.getString("ISSUETYPE").equalsIgnoreCase("PROBLEM")) {
            psdi.server.MXServer mxs = psdi.server.MXServer.getMXServer();
            MboSetRemote loc_set = mxs.getMboSet("LOCATIONS", wo.getUserInfo());
            loc_set.setWhere("location in('"+wo.getString("CENTER1")+"')");
            loc_set.reset();
            if (loc_set.count() > 0) {
                String kanal = loc_set.getMbo(0).getString("CAPACITY");
                if (kanal.startsWith("4")) {
                    return true;
                }
            }
            return false;
        } else {
            return false;
        }
    }
 
    public String toWhereClause(Object arg0, MboSetRemote arg1) throws MXException, RemoteException {
        return "";
    }
}

Have a good day…

read comments here