11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 16
0
8Like
Tweet 5
A Simple Automation ScriptPNolan | Jan 10 | Visits (667)
There are times when you may wish to set a default value for a new attribute on an application butusing a default control or a
crossover domain does not work to set this default value If you wish to automatically copy a valuefrom one attribute to another
as you are entering the record then sometimes the best way to do this is with an AutomationScript An Automation Script may
sound daunting but you can create a simple script with only a single line of code that will copy the value from one attributeto another
Once you are done submitting your script it gets executed immediately and there is no need to restart your server orrebuildredeploy
the maximoear file
In the following example in the Person application we have added a user defined attribute called CURRENTPHONE andwe wish to
automatically copy the value from PRIMARYPHONE to CURRENTPHONE when the new Person record is being entered We will use
an Attribute Launch Point script that can be used to customize field validations and actions
1) Go To ndash System Configuration ndash Platform Configuration ndash Automation Scripting ndash click on Select Action ndash Create ndash
Scripting with Attribute Launch Point
My Blogs Public Blogs My UpdatesSearchThis Blog
anywhere asset bi
management maximomaximo75 performance
Log in
to participate
About this blogWelcome to the AssetManagement Blog where youcan read the perspectives fromAsset Management experts This
Blog provides technical insights into theMaximo product solutions
Links
Manually install and configure
Recent tweets
Follow ServMgmtConnect
Share
Sign in | RegisterIBM
Technical topics Evaluation software Community Events Search developerWorks
My home Forums Blogs Communities Profiles Podcasts Wikis Activities IBM Champion program
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 26
2) Then enter the following values
Launch Point PHONEDescription Setting CURRENTPHONE from PRIMARYPHONEActive CHECKEDObject PERSONAttribute PRIMARYPHONE
Click on the Next button
3) Within the Create Script with Attribute Launch Point Step 2 of 3 add the following
Script PHONEDescription Setting Current Phone from Primary PhoneScript Language jython
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 36
4) Within the Variables pane click on New Row Add the followingVariable PRIMARYPHONEVariable Type INOUTOverride CHECKEDBinding Type ATTRIBUTELaunch Point Attribute PRIMARYPHONE
5) Within the Variables pane click on New Row Add the following
Variable CURRENTPHONEVariable Type INOUTOverride CHECKEDBinding Type ATTRIBUTELaunch Point Attribute CURRENTPHONE
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 46
We dont actually need to explicitly define the PRIMARYPHONE variable since it is already available implicitly inside thescript
as the attribute on which the script is listening as defined in step 2 However sometimes it makes scripts easier to follow ifall
variables are explicitly defined
6) Click on Next button Within the Create Script with Attribute Launch Point Step 3 of 3 add the following script
CURRENTPHONE = PRIMARYPHONE
Click on the Create button and your script should be completed Please note that the Status value on the main(Automation Script)
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 56
Add a Comment More Actions Comments (0)
About
Help
Contact us
Feeds
Newsletters
Report abuse
Terms of use
Third party notice
Faculty
Students
Business Partners
Select a language
English
中文
tab will be set to Draft but this does not currently have any functionality on the script The script will still run with this statusvalue set
to Draft Within the Launch Points tab ndash the Active checkbox controls the logic if the Launch Point is executed and is setto checked
(active) by default To disable the Launch Point uncheck the Active checkbox and click on Save
7) You can test your script by either adding or modifying an existing Primary Phone value in the Person (People)application
Create a new person record and enter a Primary Phone value
Once you tab out of the Primary Phone attribute or save the record the phone number value will be copied automaticallyfrom the
Primary Phone attribute to the Current Phone attribute
This is a simple example of a script but shows how you can create a script using only a few lines of code and that youdont need to be
an experienced script writer to do this
Add a Comment More Actions
Previous Entry Main Next Entry
Follow
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 66
Submit content IBM privacy
IBM accessibility
日本語
Русский
Portuguecircs (Brasil)
Espantildeol
Việt
Like
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 26
2) Then enter the following values
Launch Point PHONEDescription Setting CURRENTPHONE from PRIMARYPHONEActive CHECKEDObject PERSONAttribute PRIMARYPHONE
Click on the Next button
3) Within the Create Script with Attribute Launch Point Step 2 of 3 add the following
Script PHONEDescription Setting Current Phone from Primary PhoneScript Language jython
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 36
4) Within the Variables pane click on New Row Add the followingVariable PRIMARYPHONEVariable Type INOUTOverride CHECKEDBinding Type ATTRIBUTELaunch Point Attribute PRIMARYPHONE
5) Within the Variables pane click on New Row Add the following
Variable CURRENTPHONEVariable Type INOUTOverride CHECKEDBinding Type ATTRIBUTELaunch Point Attribute CURRENTPHONE
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 46
We dont actually need to explicitly define the PRIMARYPHONE variable since it is already available implicitly inside thescript
as the attribute on which the script is listening as defined in step 2 However sometimes it makes scripts easier to follow ifall
variables are explicitly defined
6) Click on Next button Within the Create Script with Attribute Launch Point Step 3 of 3 add the following script
CURRENTPHONE = PRIMARYPHONE
Click on the Create button and your script should be completed Please note that the Status value on the main(Automation Script)
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 56
Add a Comment More Actions Comments (0)
About
Help
Contact us
Feeds
Newsletters
Report abuse
Terms of use
Third party notice
Faculty
Students
Business Partners
Select a language
English
中文
tab will be set to Draft but this does not currently have any functionality on the script The script will still run with this statusvalue set
to Draft Within the Launch Points tab ndash the Active checkbox controls the logic if the Launch Point is executed and is setto checked
(active) by default To disable the Launch Point uncheck the Active checkbox and click on Save
7) You can test your script by either adding or modifying an existing Primary Phone value in the Person (People)application
Create a new person record and enter a Primary Phone value
Once you tab out of the Primary Phone attribute or save the record the phone number value will be copied automaticallyfrom the
Primary Phone attribute to the Current Phone attribute
This is a simple example of a script but shows how you can create a script using only a few lines of code and that youdont need to be
an experienced script writer to do this
Add a Comment More Actions
Previous Entry Main Next Entry
Follow
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 66
Submit content IBM privacy
IBM accessibility
日本語
Русский
Portuguecircs (Brasil)
Espantildeol
Việt
Like
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 36
4) Within the Variables pane click on New Row Add the followingVariable PRIMARYPHONEVariable Type INOUTOverride CHECKEDBinding Type ATTRIBUTELaunch Point Attribute PRIMARYPHONE
5) Within the Variables pane click on New Row Add the following
Variable CURRENTPHONEVariable Type INOUTOverride CHECKEDBinding Type ATTRIBUTELaunch Point Attribute CURRENTPHONE
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 46
We dont actually need to explicitly define the PRIMARYPHONE variable since it is already available implicitly inside thescript
as the attribute on which the script is listening as defined in step 2 However sometimes it makes scripts easier to follow ifall
variables are explicitly defined
6) Click on Next button Within the Create Script with Attribute Launch Point Step 3 of 3 add the following script
CURRENTPHONE = PRIMARYPHONE
Click on the Create button and your script should be completed Please note that the Status value on the main(Automation Script)
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 56
Add a Comment More Actions Comments (0)
About
Help
Contact us
Feeds
Newsletters
Report abuse
Terms of use
Third party notice
Faculty
Students
Business Partners
Select a language
English
中文
tab will be set to Draft but this does not currently have any functionality on the script The script will still run with this statusvalue set
to Draft Within the Launch Points tab ndash the Active checkbox controls the logic if the Launch Point is executed and is setto checked
(active) by default To disable the Launch Point uncheck the Active checkbox and click on Save
7) You can test your script by either adding or modifying an existing Primary Phone value in the Person (People)application
Create a new person record and enter a Primary Phone value
Once you tab out of the Primary Phone attribute or save the record the phone number value will be copied automaticallyfrom the
Primary Phone attribute to the Current Phone attribute
This is a simple example of a script but shows how you can create a script using only a few lines of code and that youdont need to be
an experienced script writer to do this
Add a Comment More Actions
Previous Entry Main Next Entry
Follow
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 66
Submit content IBM privacy
IBM accessibility
日本語
Русский
Portuguecircs (Brasil)
Espantildeol
Việt
Like
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 46
We dont actually need to explicitly define the PRIMARYPHONE variable since it is already available implicitly inside thescript
as the attribute on which the script is listening as defined in step 2 However sometimes it makes scripts easier to follow ifall
variables are explicitly defined
6) Click on Next button Within the Create Script with Attribute Launch Point Step 3 of 3 add the following script
CURRENTPHONE = PRIMARYPHONE
Click on the Create button and your script should be completed Please note that the Status value on the main(Automation Script)
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 56
Add a Comment More Actions Comments (0)
About
Help
Contact us
Feeds
Newsletters
Report abuse
Terms of use
Third party notice
Faculty
Students
Business Partners
Select a language
English
中文
tab will be set to Draft but this does not currently have any functionality on the script The script will still run with this statusvalue set
to Draft Within the Launch Points tab ndash the Active checkbox controls the logic if the Launch Point is executed and is setto checked
(active) by default To disable the Launch Point uncheck the Active checkbox and click on Save
7) You can test your script by either adding or modifying an existing Primary Phone value in the Person (People)application
Create a new person record and enter a Primary Phone value
Once you tab out of the Primary Phone attribute or save the record the phone number value will be copied automaticallyfrom the
Primary Phone attribute to the Current Phone attribute
This is a simple example of a script but shows how you can create a script using only a few lines of code and that youdont need to be
an experienced script writer to do this
Add a Comment More Actions
Previous Entry Main Next Entry
Follow
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 66
Submit content IBM privacy
IBM accessibility
日本語
Русский
Portuguecircs (Brasil)
Espantildeol
Việt
Like
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 56
Add a Comment More Actions Comments (0)
About
Help
Contact us
Feeds
Newsletters
Report abuse
Terms of use
Third party notice
Faculty
Students
Business Partners
Select a language
English
中文
tab will be set to Draft but this does not currently have any functionality on the script The script will still run with this statusvalue set
to Draft Within the Launch Points tab ndash the Active checkbox controls the logic if the Launch Point is executed and is setto checked
(active) by default To disable the Launch Point uncheck the Active checkbox and click on Save
7) You can test your script by either adding or modifying an existing Primary Phone value in the Person (People)application
Create a new person record and enter a Primary Phone value
Once you tab out of the Primary Phone attribute or save the record the phone number value will be copied automaticallyfrom the
Primary Phone attribute to the Current Phone attribute
This is a simple example of a script but shows how you can create a script using only a few lines of code and that youdont need to be
an experienced script writer to do this
Add a Comment More Actions
Previous Entry Main Next Entry
Follow
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 66
Submit content IBM privacy
IBM accessibility
日本語
Русский
Portuguecircs (Brasil)
Espantildeol
Việt
Like
11032015 A Simple Automation Script (Asset Management)
httpswwwibmcomdeveloperworkscommunityblogsa9ba1efeshyb731shy4317shy9724shya181d6155e3aentrya_simple_automation_scriptlang=en 66
Submit content IBM privacy
IBM accessibility
日本語
Русский
Portuguecircs (Brasil)
Espantildeol
Việt
Like