IBM Maximo Asset Management Multitenancy 7.6

Script with an action launch point

An action launch point associates a script with an action and executes when the specified action occurs. Use the Actions application to configure the associated action.

You can create actions to perform the following tasks:

To create a script with an action launch point, in the Automation Scripts application, select the Create > Script with Action Launch Point action. When you specify a value in the Name field, this value is automatically duplicated in the Action field. You can change the value in the Action field to the precise name of an existing action that you intend to use. You can accept the duplicated value and create an appropriate action in the Actions application, by using the precise name specified in the launch point.

Example of an action launch point

You can use an action launch point to automate tasks that are part of a workflow. When a service request record is worked on as part of a workflow process, the target contact and target start dates must be calculated. A work log entry must also be created for the service request.
To implement this requirement, you complete the following steps:
  1. Define an action launch point on the service request object process.
  2. Define the script that calculates the target contact and start dates, and generates the work log:
    from java.util import Calendar
    
    if status=='NEW' and reportedpriority==1 and assetnum is not None:
            cal=Calendar.getInstance()
            cal.add(Calendar.DATE, +1)
            targetcontactdate =  cal.getTime()
            cal.add(Calendar.DATE,+1)
            targetstartdate=cal.getTime()
       
        worklogset = mbo.getMboSet ('WORKLOG')
        worklogentry = worklogset.add()
        worklogentry.setValue('clientviewable',1)
        worklogentry.setValue('logtype','WORK')
        worklogentry.setValue('description','System initiated processing')
  3. Define the workflow process and associate the action that executes the action launch point with the workflow process. Validate, enable, and activate the workflow.
  4. Test the workflow process, action launch point, and script and activate or de-activate the launch point as required.


Feedback