IBM Support

Referencing the name of the user who routes a Maximo record into the Workflow Inbox

Question & Answer


Question

How can you reference the name of the user who routes a Maximo record into the Workflow Inbox using an Automation Script?

Answer

1. Go to the Automation Scripts application

2. Select Action - Create Script with Object Launch Point

- Launch Point : TESTLPZ1

- Object : WFASSIGNMENT

- Object Event Condition : WFID <> 0

- Event : Check 'Add?'




Click on the Next button.
- Script Name : TESTSCZ1
- Script Language : jython



Click on the Next button.
- Put Source code like below.

from psdi.server import MXServer
maximo = MXServer.getMXServer()
currentUser=maximo.getUserInfo(user)

mbo.setValue("DESCRIPTION", mbo.getString("Description") + " routed by " + currentUser.getDisplayName() )



Click on the 'Create' button.

3. Change the status for the TESTSCZ1 script to Active.

4. Now log into Maximo as wilson ( Mike Wilson)
- Go to the Work Order Tracking application - Open a WO (in this example, 1703)
- Route the WO into Workflow (Process: TESTWO) to get that WO approved. The WO will then be assigned to the 'maxadmin' user for approval.

5. Log into Maximo as the 'maxadmin' user.

You can then see the Workflow assignment and more specifically the name of who routed that Workflow record to you in the Start Center/ Workflow Inbox.

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21671546