Welcome to the IBM Community, a place to collaborate, share knowledge, & support one another in everyday challenges. Connect with your fellow members through forums, blogs, files, & face-to-face networking.
Log in
Search Options
Search Options
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Internet of Things
Topic groups
Maximo
TRIRIGA
Engineering
Weather and Climate
User groups
Events
Upcoming IoT Events
On Demand Webinars
IBM Expert TV
Virtual Community Events
All IBM Community Events
Participate
Gamification Program
Getting Started
Post to Forum
Share a Resource
Share Your Expertise
Blogging on the Community
Connect with Internet of Things Users
All IBM Community Users
Resources
Community Front Porch
IBM Champions
IBM Cloud Support
IBM Documentation
IBM Support
IBM Technology Zone
IBM Training
Marketplace
Marketplace
IBM Internet of Things Community
Your destination for peer and expert insights to help unlock the power of data with AI and IoT to
advance your digital reinvention.
Join / Log in
Skip main navigation (Press Enter).
Toggle navigation
Search Options
Maximo
View Only
Group Home
Discussion
3.8K
Library
166
Blogs
160
Events
0
Members
7.7K
Expand all
|
Collapse all
sort by most recent
sort by thread
Java class that uses an automation script function?
User1971
Sat September 11, 2021 08:22 PM
MAM 7.6.1.2: It's my understanding that automation scripts can use Java classes/methods to get...
User1971
Sat September 11, 2021 08:59 PM
From a colleague: "The short answer is yes. Automation Scripts can be invoked by Java and that'...
1.
Java class that uses an automation script function?
0
Like
User1971
Posted Sat September 11, 2021 08:22 PM
Edited by User1971 Tue September 14, 2021 12:00 AM
Reply
Reply Privately
Options Dropdown
MAM 7.6.1.2:
It's my understanding that automation scripts can use Java classes/methods to get information.
Example: mbo.getString("ASSET.GEOMETRYTYPE")
An uneducated/hypothetical question:
I'm guessing that there are parts of Maximo where we can only use Java classes, not automation scripts.
As a workaround, are there any Java classes that can utilize an automation script function?
Fake example: JavaReturnValFromAutoScript( AutoScriptFunction("ASSETNUM"))
I imagine that might be a bit backwards. And I don't have any concrete examples of where that would be needed. I just wondered if that sort of thing could be done as a last resort in niche scenarios.
It came to mind when thinking about this post:
Use automation script function( ) in relationship where clause
2.
RE: Java class that uses an automation script function?
0
Like
User1971
Posted Sat September 11, 2021 08:59 PM
Edited by User1971 Sun September 12, 2021 02:24 AM
Reply
Reply Privately
Options Dropdown
From a colleague:
"The short answer is yes. Automation Scripts can be invoked by Java and that's really the whole point of the ScriptEngine Java object, and more specifically, Jython and Nashorn. You can create a new instance of javax.script.ScriptEngine and then call the eval method, passing in a context that the script can use and also return values back to the calling Java program."
Original Message
Original Message:
Sent: Sat September 11, 2021 08:21 PM
From: User1971
Subject: Java class that uses an automation script function?
MAM 7.6.1.2:
It's my understanding that automation scripts can use Java classes/methods to get information.
Example: mbo.getString("ASSET.GEOMETRYTYPE")
An uneducated/hypothetical question:
I'm guessing that there are parts of Maximo where we can only use Java classes, not automation scripts.
Are there any Java classes that can use an automation script function?
Fake example: JavaReturnValFromAutoScript( AutoScriptFunction( ASSETNUM ))
I know that's pretty backwards. And I don't have any concrete examples of where that would be needed. I just wondered if that sort of thing could be done, in theory, as a last resort in niche scenarios.
It came to mind when thinking about this post:
Use automation script function( ) in relationship where clause
An RFE that's possibly related (not mine):
New Automation Script Launch Point to Support Roles
https://ibm-ai-apps.ideas.ibm.com/ideas/MASM-I-281
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Internet of Things
Topic groups
Maximo
TRIRIGA
Engineering
Weather and Climate
User groups
Events
Upcoming IoT Events
On Demand Webinars
IBM Expert TV
Virtual Community Events
All IBM Community Events
Participate
Gamification Program
Getting Started
Post to Forum
Share a Resource
Share Your Expertise
Blogging on the Community
Connect with Internet of Things Users
All IBM Community Users
Resources
Community Front Porch
IBM Champions
IBM Cloud Support
IBM Documentation
IBM Support
IBM Technology Zone
IBM Training
Marketplace
Marketplace
Copyright © 2020 IBM IoT Community. All rights reserved.
Powered by Higher Logic