Syed Umar AnisMaximo EAMMaximo: Initiate workflow from Automation Script
Syed Umar AnisMaximo EAMMaximo: Initiate workflow from Automation Script
Maximo EAM

Maximo: Initiate workflow from Automation Script

Workflows can be programmatically initiated in Maximo using WorkFlowService class. Here is a sample Automation Script for a new record:

from psdi.util import MXException
from psdi.server import MXServer

try:
    # only initiate workflow for new records
    if(mbo.isNew()):
        mxs = MXServer.getMXServer()
        wfstart = mxs.lookup('WORKFLOW')
        # replace the 'processName' with the workflow process you want to initiate
        wfstart.initiateWorkflow("processName",mbo) 
    
except Exception, e:
    print(e)

In the above script, we need to replace the processName with the workflow process we want to initiate.

The launch point for the Automation Script should be ‘After Save'. Please note that ‘Before Save' may not work in certain situations for initiating the workflow.

Hi, I’m Umar

Leave a Reply

Your email address will not be published. Required fields are marked *