Sometimes there can be a situation when you want to invoke a webservice on Mbo Save or delete or from a WorkFlow action class and do not want to go through building the integration components.
So, you straight away want to call this webservice from your custom code. One of the option in that case would be to use “WSCallClient”.
This class can be found in psdi.iface.webservices package.
OMElement respOME = callClient.invokeWebService(servicename,endPointUrl, omeObject, null, null, null, action, null, soapVersion, null, mxUsername,mxPassword, null);
The omeObject above is the service payload object.
In WebServicesUtil there are some utility methods like “convertToOMElement” where you can pass raw xml and it will give back an OMElement payload object.
Checkout maximo java docs for details on all the methods in WSCallClient and WebServicesUtil classes.
There is a very useful presentation on performance tuning and overall best practices.
Have a look at below:
Event Password = tiv0li (0 is a zero).
Consider the following scenario:
You want to add a new status for Workorder which is a Synonym for an existing one. This status is only visible based on a certain Work Type.
This looks very simple but there is just one small trick we need to achieve this.
First create the condition in Conditional Expression application as below:
:WORKTYPE = ‘ABC’
Go to Domains application and add the new status in WOSTATUS domain. Lets call this as “REVW”.
In View Modify conditions select the condition which checks the worktype as per below screenshot. When you test you will get an error “WorkType” attribute not found. The trick is to add a field WORKTYPE to WOCHANGESTATUS table. Because, when this condition is used on selecting the status ABC it also tries to validate on the dialog table which in this case is a non-persistent table called WOCHANGESTATUS. Let me know if you have any questions.
Lets say you want to change the default behavior of a control used in Maximo UI using conditional UI, how do you identify which property is supported by which control?
Lets say which properties can be controlled for a textbox?
The answer to this question is very simple. Just go to the following xml file:
Find whichever control you want to manage using Conditional UI, search by term name=”textbox” for a textbox and so on and so forth and you will come across all the properties supported by this control and use them on your conditional ui screen like inputmode=readonly.
Thats it, so easy and we do not have to remember anything 🙂 everything’s there in that control-registry.xml file.
Sometimes there is a situation when we want to trigger an outbound interface at certain specific time. Like based on a cron task in Maximo.
There is a very useful in MicService for this.
MicService is the service class for Outbound Integration services.
public void exportData(java.lang.String ifaceName,
- This method will be called from GUI for bulk data loading from MAXIMO to external system
- Specified by:
exportData in interface
ifaceName – Give name of channel.
sender – Give external system name.
where – Give where clause.
userInfo – Give reference to UserInfo object.
MXException – MAXIMO exception
java.rmi.RemoteException – Remote exception
This method you can invoke in a Cron Task Class so when the cron is executed the outbound interface is triggered. The outbound interface will process records it finds in the where clause.
I hope this helps.
I am sure many of us have not used this class.
Its very useful if you have an MboSet. It makes the code very clean and you dont have to do a loop till mboset.count()…..the normal way we access Mbo’s within an MboSet.
public class MboSetEnumeration
- extends java.lang.Object
This class steps through a MboSet using the Enumeration interface. It starts at position 0 of the MboSet and steps through until the end.
It has just one constructor:
Constructor takes the MboSet it will step through.
And, has the usual methods like:
boolean hasMoreElements() Returns true if there is more elements in this enumeration.java.lang.Object nextElement() Returns the next element in the enumeration.
MboRemote nextMbo() A convience method for use in Mbo code, does the same thing as nextElement but returns the element as a MboRemote.
Method nextMbo() is most useful of this lot as I am sure getting an MBO instead of an Object will save some time in terms of casting 🙂
Sometimes you need to do lot of processing or execute some logic during the execution of a workflow.
In that case adding a Custom Action with a Java class may be one of the options.
Go to the Actions application and add a new action with Type as CUSTOM and value as the fully qualified class name for the action class.
Lets assume the class name is com.custom.action.NewCustomProcessiingAction
This class should extend psdi.common.action.ActionCustomClass and we need to override the below method:
public void applyCustomAction(MboRemote mbo, Object arg1)
throws MXException, RemoteException
In this method the MBO is available so we can manipulate that if required or get related MBO’s to manipulate.
We can also get the workflow service:
WorkFlowService wfService = (WorkFlowService)MXServer.getMXServer().lookup(“WORKFLOW”);
And, use that to interact with the workflow.
Once this action class is ready, assign it to any positive or negative action on the workflow and its done.
Just a quick tip.
We can have multi level relationships in Maximo.
Lets say you want to show Route Stop description in Work Order:
Following are the relationships:
Relationship Name: ROUTES
And the second one is:
Relationship Name: ROUTE_STOP
So, the way we can show ROUTE_STOP description in Work Order is:
The way maximo resolves is from left to right, so the first relation output is the inpput for the next one.
Thought it might help if everyone is not already aware of it 🙂
I am going to add lot more content on customising Maximo 7 in the coming days.
If you have any specific question, kindly forward them to admin “at” maximonews.com and I will try to answer them with the best of my ability.
Also, you can post in the forums at maximonews.com/forum.