首先在 Maximo 的 Automation Scripts 应用中创建一个自动化脚本,内容如下: Script: countofwoandsr Script Language: javascript Allow Invoking Script Functions: true load("nashorn:mozilla_compat.js");importPackage(Packages.psdi.server);varresp={};varsite=request.getQueryParam("site");varwoset=MXServer...
Maximo 中 Automation Script 之间调用可以通过下面几种方式实现 invokeScript(script_name: String, context: Map<String, String>): void invokeScript(script_name: String): Map<String, Object> invokeScript(script_name: String, function_name: String, function_arguments: Object[]): Object 方法一 MYLIB 库...
Maximo 在 Automation Script 中访问数据库 在Automation Script 中我们通常使用 mbo 对象来操作数据,但有时候当数据量较大时,使用 mbo 对象来操作数据会比较慢。这时候,我们可以使用 JDBC 的方式来直接访问数据库,从而提高操作数据的效率。 下面看看使用 JavaScript 脚本怎么实现在 Automation Script 中访问数据库: 首...
使用一个Map来保存传递给被调用 Automation Script 的参数,这里就是pageNum和pageSize; 使用service.invokeScript(scriptName, context) 调用其它 Automation Script; 最后从context中获取执行结果; 验证 代码语言:javascript 复制 curl--requestGET--url'<base_url>/maximo/api/script/test?apikey=<api_key>&lean=1...
The examples consist of simple scripts that can be used for test purposes. You can use the data import and data export features in the External Systems application to start transactions to test scripts. Example: Script that changes the description of operating assets on ...
Front cover Smart Cloud Enterprise Tivoli Service Automation Manager Security Guide Tivoli Service Automation Manager Server security setup Maximo ID management General security procedures in a cloud environment ibm.com/redbooks Ira Chavis Redpaper International Technical Support Organization SmartCloud Enterprise...
使用service.invokeScript(scriptName, context) 调用其它 Automation Script; 最后从context中获取执行结果; 验证 curl --request GET --url '<base_url>/maximo/api/script/test?apikey=<api_key>&lean=1' --header 'content-type: application/json' --header 'user-agent: vscode-restclient' ...
在Automation Script 中我们通常使用 mbo 对象来操作数据,但有时候当数据量较大时,使用 mbo 对象来操作数据会比较慢。这时候,我们可以使用 JDBC 的方式来直接访问数据库,从而提高操作数据的效率。 下面看看使用 JavaScript 脚本怎么实现在 Automation Script 中访问数据库: ...
上面Automation Script库中定义了一个 User 对象,以及一个模块 module,其中 module.exports 对象中导出了 User 对象。 下面是 MYLIB 库的测试代码 MYTEST,代码首先调用 MYLIB 库,然后调用 MYLIB 库中导出的对象。 varmylib=service.invokeScript('MYLIB');varuser=newmylib.User('kongxx','nopassword');var...