Tuesday, January 1, 2013

Scripting: Workflow Action

Scripting allows us to replace some of the present Java customization. It reduces system downtime across the environment.

It can be launched on the points as below:
i) Object LP(Launch Point) --> Based on condition and common MBO events [init, add, update or delete].
ii) Attribute LP --> Field validations (Scripting does not support getList() and action() functionality of Field validation class)
iii) Action LP --> Workflow/Escalation actions
iv) Custom Custom LP --> Workflow custom conditions and conditional expressions can be enabled.


Step1:
Create an automation script by clicking on Select Action à Create à Script with Action Launch Point

-----------------------------------------------------------------------------------------------------------
from psdi.server import MXServer
mbo.changeStatus('ACTIVE',True,MXServer.getMXServer().getDate(),'Test script',11L)
-----------------------------------------------------------------------------------------------------------


Note: IN or OUT variables not required for this purpose.



Step 2:
Action of type custom class will get created automatically from Script application.
Value: com.ibm.tivoli.script.ScriptAction
Parameter/Attribute:  SCRIPT Name, Launch Point Name, Action name itself

Don’t change these values, it comes out by default.


Step 3:
A WF with a condition [status <> ‘ACTION’] and action attached in its positive line to change Item status and roll new status to Org/Inventory.




By this scripting action, Status is changed and rolled to Organization & Inventory.



2 comments:

  1. Please correct the line
    Parameter/Attribute: Launch Point Name, SCRIPT Name, Action name itself

    as below

    Parameter/Attribute: SCRIPT Name, Launch Point Name, Action name itself


    ReplyDelete
    Replies
    1. I modified as per your comment. Thanks for your suggestion.

      Delete