在Automation Script 中我们通常使用 mbo 对象来操作数据,但有时候当数据量较大时,使用 mbo 对象来操作数据会比较慢。这时候,我们可以使用 JDBC 的方式来直接访问数据库,从而提高操作数据的效率。 下面看看使用 JavaScript 脚本怎么实现在 Automation Script 中访问数据库: 首先需要倒入必要的包 代码语言:javascript 代...
Maximo 中 Automation Script 之间调用的几种方式 代码语言:javascript 代码运行次数:0 invokeScript(script_name:String,context:Map<String,String>):voidinvokeScript(script_name:String):Map<String,Object>invokeScript(script_name:String,function_name:String,function_arguments:Object[]):Object 方法一 MYLIB 库脚...
An automation script inserts a script on the external exit class of the enterprise service. The script checks the status of the asset in the erData element. If the asset is in operating status, the script inserts a value in the description field and prints a messa...
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 库...
在Automation Script 中我们通常使用 mbo 对象来操作数据,但有时候当数据量较大时,使用 mbo 对象来操作数据会比较慢。这时候,我们可以使用 JDBC 的方式来直接访问数据库,从而提高操作数据的效率。 下面看看使用 JavaScript 脚本怎么实现在 Automation Script 中访问数据库: ...
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...
接前面几篇 Automation Script 文章,今天看看 Automation Script 之间怎么互相调用。 这里创建两个 Automation Script,第一个使用 Automation Script 查询数据库获取workorder 列表,同时使用两个参数pageNum和pageSize来实现翻页,第二个 Automation Script 通过 service.invokeScript 调用第一个 Automation Script。 第一个Aut...
使用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库中定义了一个 User 对象,以及一个模块 module,其中 module.exports 对象中导出了 User 对象。 下面是 MYLIB 库的测试代码 MYTEST,代码首先调用 MYLIB 库,然后调用 MYLIB 库中导出的对象。 var mylib = service.invokeScript('MYLIB'); var user = new mylib.User('kongxx', 'nopa...