Plan for migration before creating the escalation.
Go to MM and create a change package and include BPM group , approve and activate.
Make sure its capturing the records by using Selection action and event tracking records.
Lets talk about escalations now, hope your mm package is active and listening to changes.
Escalation is an action or a group of actions on the escalation points which can be triggered on predefined conditions.
You use Escalation condition to filter records out of the table.
Write a name and object it applies to (WO) and a condition to do filter records.
status in (select value from synonymdomain where domainid = 'WOSTATUS' and maxvalue not IN ('COMP','CLOSE') ) and pmnum is not null
This is first level of filtering.
Now we can have multiple escalation points,different conditions basically on those records filtered above.
If you have a field which of of type date and you want to make different alerts according to the time interval, elapsed time interval is of a lot of use.
Your date attribute X -7 days
So elapsed time interval negative means in future. So this will fire 7 days before the date attribute. lets say your date attribute X has value( 9 June) and system date of Maximo server is 2nd june, this condition is satisfied and it will evaluate the escalation point condition. You can also give escalation point condition as an add on filter at this level.
If elapsed time interval is positive its in past, so if it would have been +7 days, so it will fire if X is 2nd June and sys date is 9th june.
First thing you need to create is roles, which are attached to communication templates and those are attached to the Notifications sub tab of the escalations application.
Roles can be of multiple types:
Custom
Custom class where you extend the
CustomRoleAdapter and implement the CustomRoleInterface
Sample Code
////////////////////
package xx.common.role;
import java.rmi.RemoteException;
import psdi.common.role.CustomRoleAdapter;
import psdi.common.role.CustomRoleInterface;
import psdi.common.role.MaxRole;
import psdi.mbo.MboRemote;
import psdi.mbo.MboSetRemote;
import psdi.server.MXServer;
import psdi.util.MXApplicationException;
import psdi.util.MXException;
public class xx extends CustomRoleAdapter implements CustomRoleInterface
{
public MboRemote evaluateCustomRole(MaxRole roleMbo, MboRemote currentMbo)
throws MXException, RemoteException
{
// play with currentMbo – the object specified on the Role creation panel in application
}
}
A Set of Data related to the record
If you want to get value of any related object via a relationship you can use this role.
You can get the gui for fetching the relationship and the required field, just click the arrow.
Email Address
Direct Email address punch
Person
Person id value(e.g maxadmin)
Person Group
Persongroup value (e.g admin)
A set of data related to login user
Any data from the logged in user.
Ok once roles are ready, check if they are getting tracked in the MM package.
Now create the communication templates and punch in roles.
Please note you can use the variables from the main object like :wonum in our case
make sure to check
Subject can be
Work Order :wonum is not approved
I think relationships also work, try it out.
Now our communication templates ready, punch them in the notification tab of the escalation.
Please note different escalations will have different notifications and different actions.
If you want to check if the escalation running make sure the master condition is attained, if not use sql developer and update records to bring some records in that condition.
If you want to debug your custom role, make sure you put the breakpoint on the evaluateCustomRole method and check the repeat option in the escalation point to true. That way you will be able to hit the breakpoint multiple times and test your custom role class.
*If you dont know how to debug, try putting system out in role class and check systemout logs.
I think that is it for the escalations part, you can also check the cron history for your escalation in the history tab of your escalation crontab.
If you want to see who all received emails, you can go to workorder log tab and check the communication log tab ,it will mention which all communication was triggered out of the work order.
No comments:
Post a Comment