This entry is part of the Maximo Java Development
Sometimes you have to implement some complex logic in workflows or escalation and you feel limited by the out-of-the-box Maximo actions. In these cases you can unleash the Java power and code your algorithm in a custom action class.
In order to create a custom action class, you must extend the psdi.common.action.ActionCustomClass class.
To call this action from a workflow or escalation you have to register the new Maximo action. Go in System Configuration - Platform Configuration - Actions and create a new action. Choose Custom Class as Type, select the object for which the custom applies and provide the full class name (cust.actions.SampleAction) in the value field.
Here is how the new Action should look.
Sometimes you have to implement some complex logic in workflows or escalation and you feel limited by the out-of-the-box Maximo actions. In these cases you can unleash the Java power and code your algorithm in a custom action class.
In order to create a custom action class, you must extend the psdi.common.action.ActionCustomClass class.
package cust.actions;
import java.rmi.RemoteException;
import java.rmi.RemoteException;
import psdi.common.action.ActionCustomClass;
import psdi.mbo.MboRemote;
import psdi.util.MXException;
public class SampleAction implements ActionCustomClass
{
public SampleAction()
{
super();
}
public void applyCustomAction(MboRemote mbo, Object[] params)
{
// Write custom code here
}
}
As usual... compile, rebuild EAR and redeploy. import java.rmi.RemoteException;
import java.rmi.RemoteException;
import psdi.common.action.ActionCustomClass;
import psdi.mbo.MboRemote;
import psdi.util.MXException;
public class SampleAction implements ActionCustomClass
{
public SampleAction()
{
super();
}
public void applyCustomAction(MboRemote mbo, Object[] params)
{
// Write custom code here
}
}
To call this action from a workflow or escalation you have to register the new Maximo action. Go in System Configuration - Platform Configuration - Actions and create a new action. Choose Custom Class as Type, select the object for which the custom applies and provide the full class name (cust.actions.SampleAction) in the value field.
Here is how the new Action should look.
No comments:
Post a Comment