11/03/2015
ASimpleAutomationScript(AssetManagement)
IBM
Signin | Register
Technicaltopics
Evaluationsoftware
Community
Events
SearchdeveloperWorks
Myhome Forums Blogs Communities Profiles Podcasts Wikis Activities IBMChampionprogram
ThisBlog
MyBlogs
PublicBlogs
Search
MyUpdates
anywhere asset bi
management maxim
maximo7.5 performance
Login
toparticipate
Aboutthisblog
WelcometotheAsset
ASimpleAutomationScript
PNolan | Jan10 | Visits(667)
ManagementBlog,whereyou
canreadtheperspectivesfrom
AssetManagementexperts.This
Blogprovidestechnicalinsightsintothe
Therearetimeswhenyoumaywishtosetadefaultvalueforanewattributeonanapplication,but
crossoverdomaindoesnotworktosetthisdefaultvalue.Ifyouwishtoautomaticallycopyavalue
fromoneattributetoanother
asyouareenteringtherecord,thensometimesthebestwaytodothisiswithanAutomation
Script.AnAutomationScriptmay
Maximoproductsolutions.
usingadefaultcontrolora
Like
Share
Tweet
sounddauntingbutyoucancreateasimplescriptwithonlyasinglelineofcodethatwillcopythevaluefromoneattribute
toanother.
Onceyouaredonesubmittingyourscriptitgetsexecutedimmediatelyandthereisnoneedtorestartyourserveror
rebuild/redeploy
Links
Manuallyinstallandconfigure...
Recenttweets
themaximo.earfile.
InthefollowingexampleinthePersonapplication,wehaveaddedauserdefinedattributecalledCURRENTPHONE,and
Follow@ServMgmtConnect
wewishto
automaticallycopythevaluefromPRIMARYPHONEtoCURRENTPHONEwhenthenewPersonrecordisbeingentered.
Wewilluse
anAttributeLaunchPointscriptthatcanbeusedtocustomizefieldvalidationsandactions.
1)GoToSystemConfigurationPlatformConfigurationAutomationScriptingclickonSelectActionCreate
ScriptingwithAttributeLaunchPoint:
https://www.ibm.com/developerworks/community/blogs/a9ba1efeb73143179724a181d6155e3a/entry/a_simple_automation_script?lang=en
1/6
11/03/2015
ASimpleAutomationScript(AssetManagement)
2)Thenenterthefollowingvalues:
LaunchPoint:PHONE
Description:SettingCURRENTPHONEfromPRIMARYPHONE
Active:CHECKED
Object:PERSON
Attribute:PRIMARYPHONE
Clickonthe'Next'button.
3)Withinthe'CreateScriptwithAttributeLaunchPoint:Step2of3'addthefollowing:
Script:PHONE
Description:SettingCurrentPhonefromPrimaryPhone
ScriptLanguage:jython
https://www.ibm.com/developerworks/community/blogs/a9ba1efeb73143179724a181d6155e3a/entry/a_simple_automation_script?lang=en
2/6
11/03/2015
ASimpleAutomationScript(AssetManagement)
4)WithintheVariablespane,clickonNewRow.Addthefollowing:
Variable:PRIMARYPHONE
VariableType:INOUT
Override?CHECKED
BindingType:ATTRIBUTE
LaunchPointAttribute:PRIMARYPHONE
5)WithintheVariablespane,clickonNewRow.Addthefollowing:
Variable:CURRENTPHONE
VariableType:INOUT
Override?CHECKED
BindingType:ATTRIBUTE
LaunchPointAttribute:CURRENTPHONE
https://www.ibm.com/developerworks/community/blogs/a9ba1efeb73143179724a181d6155e3a/entry/a_simple_automation_script?lang=en
3/6
11/03/2015
ASimpleAutomationScript(AssetManagement)
Wedon'tactuallyneedtoexplicitlydefinethePRIMARYPHONEvariablesinceitisalreadyavailableimplicitlyinsidethe
script
astheattributeonwhichthescriptislisteningasdefinedinstep2.Howeversometimesitmakesscriptseasiertofollowif
all
variablesareexplicitlydefined.
6)ClickonNextbutton.Withinthe'CreateScriptwithAttributeLaunchPoint:Step3of3'addthefollowingscript:
CURRENTPHONE=PRIMARYPHONE
ClickontheCreatebuttonandyourscriptshouldbecompleted.PleasenotethattheStatusvalueonthemain
(AutomationScript)
https://www.ibm.com/developerworks/community/blogs/a9ba1efeb73143179724a181d6155e3a/entry/a_simple_automation_script?lang=en
4/6
11/03/2015
ASimpleAutomationScript(AssetManagement)
tabwillbesettoDraftbutthisdoesnotcurrentlyhaveanyfunctionalityonthescript.Thescriptwillstillrunwiththisstatus
valueset
toDraft.WithintheLaunchPointstabtheActive?checkboxcontrolsthelogiciftheLaunchPointisexecuted,andisset
tochecked
(active)bydefault.TodisabletheLaunchPoint,unchecktheActive?checkboxandclickonSave.
7)YoucantestyourscriptbyeitheraddingormodifyinganexistingPrimaryPhonevalueinthePerson(People)
application.
CreateanewpersonrecordandenteraPrimaryPhonevalue.
OnceyoutaboutofthePrimaryPhoneattributeorsavetherecord,thephonenumbervaluewillbecopiedautomatically
fromthe
PrimaryPhoneattributetotheCurrentPhoneattribute.
Thisisasimpleexampleofascriptbutshowshowyoucancreateascriptusingonlyafewlinesofcodeandthatyou
don'tneedtobe
anexperiencedscriptwritertodothis.
AddaComment
MoreActions
AddaComment MoreActions
Comments(0)
PreviousEntry
Main
NextEntry
About
Feeds
Reportabuse
Faculty
Selectalanguage:
Help
Newsletters
Termsofuse
Students
English
Thirdpartynotice
BusinessPartners
Contactus
Follow
https://www.ibm.com/developerworks/community/blogs/a9ba1efeb73143179724a181d6155e3a/entry/a_simple_automation_script?lang=en
5/6
11/03/2015
Submitcontent
ASimpleAutomationScript(AssetManagement)
Like
IBMprivacy
IBMaccessibility
Portugus(Brasil)
Espaol
Vit
https://www.ibm.com/developerworks/community/blogs/a9ba1efeb73143179724a181d6155e3a/entry/a_simple_automation_script?lang=en
6/6