Autoscript for sigoption condition setup:
1.Go to Automation Scripts app, Create a script
Select Action Create Script with Custom Condition Lunch Point, enter Lunch point,
Object : WORKORDER.
Click Next, enter script name
Click Next, add the source code:
example for Change status APPR sigoption:
condition query for check status ‘WAPPR’ of current work order and usergroup:
(exists (select 1 from groupuser where userid =:&USERNAME& and groupname
in('MAXADMIN','ITEMMGR') )) and ((:status='WAPPR' ) or (exists (select 1 from
groupuser where userid=:&USERNAME& and groupname in ('MAXADMIN' )) ) )
condition query for check status ‘WAPPR’ of current work order and workorders down
the hierarchy and usergroup:
exists (select 1 from groupuser where userid =:&USERNAME& and groupname
in('MAXADMIN','ITEMMGR') )) and (( not exists (select 1 from workorder w,
woancestor a where w.status = 'WAPPR' and w.siteid = a.siteid and w.wonum = a.wonum
and a.ancestor = :wonum and a.siteid = :siteid)) or (exists (select 1 from groupuser where
userid=:&USERNAME& and groupname in ('MAXADMIN' )) ) )
Jython Source code:
woset = mbo.getMboSet("$WO","WORKORDER","(exists (select 1 from groupuser
where userid =:&USERNAME& and groupname in('MAXADMIN','ITEMMGR') )) and
(( not exists (select 1 from workorder w, woancestor a where w.status = 'WAPPR' and
w.siteid = a.siteid and w.wonum = a.wonum and a.ancestor = :wonum and a.siteid
= :siteid)) or (exists (select 1 from groupuser where userid=:&USERNAME& and
groupname in ('MAXADMIN' )) ) )")
wo = woset.getMbo(0)
if wo is None:
evalresult = False
else:
evalresult = True
Click Create, it will create the script:
2.Go to Conditional Expression Manager
Create New Conditon by click new row, select Type class, give Condition name, enter
Class(com.ibm.tivoli.maximo.script.ScriptCustomCondition):
3. Go to Security Groups, bring up the Group, and set Condition of the action ( APPR) of
the application (Wotrack) with the condition created in Step2.
© Copyright 2026 Paperzz