You are on page 1of 9

Understanding Action Types

http://publib.boulder.ibm.com/tividd/td/ITMax/621_mx_wkfl_imp/en_US/PDF/621_mx
_wkfl_imp.pdf

APPACTION : Used to specify that Maximo should initiate an application action.
Maximo requires a value in the Object and Value field for this type of action. When
creating an APPACTION type action, you can specify one of the following actions if it
is available for the specified object:









Apply SLA : Apply the specified service level agreement. ! Create Change :
Create a change work order.
Create Incident : Create an incident ticket.
Create Problem : Create a problem ticket.
Create Release : Create a release work order.
Create SR : Create a service request ticket.
Create WO : Create a work order.
WF Accept : Workflow auto-accept. Accepts the record and routes it to the
positive path in the Workflow process.
WF Escalate : Escalate the record in the Workflow process and reassigns the
assignment to its escalation role.
WF Initiate : Initiate a Workflow process. This option requires a value in the
Parameter/Attribute field.
WF Reject : Workflow auto-reject. Rejects the record and routes it to the
negative path in the Workflow process.

} setLookupKeyMapInOrder(new String[] { "dispvalue" }. "value=:dispvalue"). MboRemote zombie = ms. MboRemote mbo = value.getMboSet(objectName.getUserInfo()).getString("OBJECTNAME"). setListCriteria("domainid='APPACTION'"). mbo. } .getZombie(). setListCriteria(null). new String[] { "value" }). MboSetRemote ms = MXServer. } else if (type.getMbo(). null).getMXServer().protected void setup() throws MXException.equalsIgnoreCase("changestatus")) { setRelationship("SYNONYMDOMAIN". String objectName = mbo.getType(). if (type.equalsIgnoreCase("appaction")) { setRelationship("SYNONYMDOMAIN". } else { setRelationship(null. "value=:dispvalue"). String type = ((ActionRemote)mbo).getStatusListName() + "'"). setListCriteria("domainid='" + ((StatefulMbo)zombie). RemoteException { MboValue value = getMboValue().

"createRelease" }.equalsIgnoreCase("WFINITIATE")) { executeWFInitiate(mbo. { "COPYDOCLINKTOWO".public class Action extends Mbo implements ActionRemote { static String[][] appActionMethods = { { "CREATECHANGE". "createChange" }. mbo). } if (value. "copyDoclinksToWO" } }. { "GENERATEFORECAST". "createProblem" }. String value. { "CREATERELEASE".lookup("PARSER").getString(parameter. { "CREATEPROBLEM". { "CREATEWORKORDER".equalsIgnoreCase("WFESCALATE")) { executeWFEscalate(mbo. } catch (Throwable t) { } if (resolvedParam == null) { resolvedParam = parameter. value). . "createReverseInvoice" }. resolvedParam = parserService. { "CREATEINCIDENT". "reforecastSubsequentDates" }. RemoteException { try { String resolvedParam = null. "createWorkorder" }. parameter). } else if (value. { "DELETEFORECAST". { "REFORECAST". { "GENERATEWORKORDER". "generateForecast" }. try { ParserServiceRemote parserService = (ParserServiceRemote)MXServer. protected void executeAppAction(MboRemote mbo. "createServiceRequest" }. { "CREATESR". "deleteForecast" }. "createIncident" }. "generateWork" }.getMXServer(). String parameter) throws MXException. { "REVERSEINVOICE".

value). "AppActionError".equalsIgnoreCase("WFACCEPT")) { executeWFAccept(mbo. value). new Object[0]).equals("COPYDOCLINKTOWO")) { Method m = mbo. "AppActionError". mbo. e). } throw new MXApplicationException("action".getMethod(methodName.equalsIgnoreCase("ApplySLA")) { executeApplySLA(mbo). new Object[] { value }.getClass(). t). String param) throws Throwable { if (appActionMethodMap == null) return. } else if (!(value. try { if (appAction. new Object[] { value }. m. } } } catch (InvocationTargetException e) { Throwable t = e. if ((t != null) && (t instanceof MXException)) { throw ((MXException)t). MboRemote mbo. } else { executeWOTktAppAction(value.get(appAction). String methodName = (String)appActionMethodMap.} else if (value.invoke(mbo. resolvedParam). new Class[0]). } .equalsIgnoreCase("WFREJECT")) { executeWFReject(mbo. } else if (value.getTargetException(). if (methodName == null) return. } catch (Throwable t) { throw new MXApplicationException("action".equalsIgnoreCase("UpdateCommLog"))) { if (value. } } protected void executeWOTktAppAction(String appAction.

} return. click on Go To > System Configuration > Platform Configuration > Application Designer (you must have permissions to do the next actions). new Class[] { String.getClass(). e). At this point a editable version of the application shows up.else { Method m = mbo. "notAppActionInterface". Ok.getMethod(methodName. Search for WOTRACK and enter the Work Order Tracking.invoke(mbo. and edit the as follows (don't forget to expand the Advanced Signature Options. Open your TPAE based system.class }). } https://www. but we want to click on the Select Actionand select Add/Modify Signature Options.ibm.com/developerworks/community/blogs/e25892f0-20f7-46ff-bbe9c7c03fb3036f/entry/useful_tiny_little_things_adding_an_action_to_an_application59? lang=en This week I'll explain how to create your own entry on a select action menu and apply an action to it. ready to go. m. Next step is to click on new row. } } catch (NoSuchMethodException e) { throw new MXApplicationException("action". new Object[] { param }). As usual lets use the Work Order Tracking application as a sample. there are changes there as well): .

but this time select Add/Modify Select Action Menu.Of course you can use another name and description for your Signature Option. Once again. menu options. Click Ok. Notice that the Advanced Signature Options has "This is an action that must be invoked by user in the UI" which is essential for this tip to work. Signature options specify privileges for using applications. click on Select Action. It is time to create your entry on the Application (on this example Work Order Tracking) Select Action menu. so don't forget selecting the right option here. and toolbar items. .

I used the Position 1 and Subposition 1 to put our Select Action option as the first entry. If you want the menu item to appear under a header menu. Create a new Action. to indicate its position within the header menu.Notice that I'm using the Element Type OPTION. the position and subposition are responsible for the order and subitem definition. Now the most interesting piece of this post: The action! Move to Go To > System Configuration > Platform Configuration > Actions. in the Tabs field define where you want your entry to be available (to be visible). . enter a numerical value in the Subposition field. and MAIN in this scenario is the right one. Last but not least. The Key Value field relates to the signature option ID that is associated with this menu item. This means it is an option on the Select Action menu. which we just created. But feel free to play around with this. Very good! We are all done with the Application Designer. Also the Key Value is CALLACTION.

As soon as your MXServer is back. And here it is: . but there are other options you can use. In my case I'm selecting the Type as Application Action. a new related Change record is created. I selected CREATECHANGE.Name your new Action CALLACTION (otherwise TPAE won't be able to find it when you select the item on the Select Action). Refer to the Infocenter for more on that right here. And check the Related Records tab (Depending on the action you set. click on new. also choose the WORKORDER Object in this scenario because we did changes for the Work Order Track application. now save the action and restart the MXServer (restart only the MAXIMO application works fine as well) to apply the changes. Go To > Work Orders > Work Order Tracking. you might need to save the record again to refresh the MBO and see the changes made). All set. but you can select whatever is useful for you. which means every time I click on the Select Action created. confirm you have your new entry there and click on Call Custom Action. if yours differ select the appropriate Object. which means I'm going to call an existing action from the Work Order Application. Now click on the Select Action. Save the record. Since I chose Application Action. The screenshot here shows what I selected to sample this feature. the Values are restricted to the application actions.

blogspot.html .http://maximodev.com/2012/06/sample-action-class-java-maximo.