IBM Support

Automation Script : How to create a WO from a SR when some condition is satisfied

Technical Blog Post


Abstract

Automation Script : How to create a WO from a SR when some condition is satisfied

Body

You may want to create a Work Order(WO) automatically when saving a SR record if a condition for a field is satisfied.

Please reference below automation script example.

 

The case:  If  WOREQUIRED is true when saving a SR record whose assetnum is 11230 ,  create a WO from that SR.

Please follow the steps.

1. Go to the Database Configuration - Open TICKET object

  - Create the attribute "WOREQUIRED" with  YORN type.  The default value is set as 0.  Apply DB Changes in Admin Mode.

2. Go to the Application Designer - Open SR application.

  - Add a checkbox control for the "WOREQUIRED" attribute.

image

  - Save

3. Go to the Automation Scripts application.

-  Create Script with Object Launch Point

image

- Next
image- Next,

image

- Create

- When saving an existing SR record whose assetnum is 11230,  if WOREQUIRED field is checked,  a followup WO will be created.

 

4. Now, go to the Service Requests application.

- Open a SR

- Set assetnum as 11230, set siteid as BEDFORD and  have WOREQUIRED field checked.

image

- Save

Then,  you can see that a follow up WO is created.

image

 

This is a simple test case.  You may need to add more logic in script based on your requirement.

 

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11131753