返回顶部
返回首页 会员充值 我的足迹 返回上一页

1173 - 高级自动化脚本技术.pdf

2025-11-29
文档编号:982323
文档页数:18
文档大小:2.08MB
下载积分:VIP专享
文档格式:PDF

1、Advanced Automation Script TechniquesJason VenHuizenCPO-Naviam1173Automation Scripts are Customizations2 General conventions and techniques Defining custom objects in JavaScript and Python Passing functions as arguments Importing scripts and reusing libraries Implementing custom Java classes Demonst

2、ration:Implementing server sent events.3IntroductionGeneral Conventions and Techniques Use a main()function to enter the script.Provides a clear execution path Allows global runtime checks Allows code to return Avoids extensive if-then-else logic JavaScript Python5Use a main()Function Do not assume

3、the script was called from an expected event Ensure expected implicit variables are present mbo is not present in all contexts Use present variables to inform context,for example runAsUserInfo is only available for script CrontTasks Check that implicit variables are as expected Validate the mbo type

4、 Validate args are correct Attribute name available for attribute launch points,e.g.wonum6Validate Context and InputsValidate Context and Input Example7JavaScriptPython Configure format on save Ensures clean diffs Consistent formatting between developers Define and enforce corporate linters to avoid

5、 common mistakes Recommended VS Code formatters Prettier for JavaScript Black Formatter from Microsoft for Python8Format on Save File header change logs are for when you dont have source control and arent using VS Code Developer Tools This is pointless:9Stop Using File Header Change LogsDefining Obj

6、ects in JavaScript and PythonServer Sent Event Object11Java ScriptPythonPassing Functions as ArgumentsPass Function as Argument13Java ScriptPythonImporting Scripts and Reusing LibrariesInline a Library Script Source15Java ScriptPythonImplem

1173 - 高级自动化脚本技术.pdf_第1页
1173 - 高级自动化脚本技术.pdf_第2页
1173 - 高级自动化脚本技术.pdf_第3页
1173 - 高级自动化脚本技术.pdf_第4页
1173 - 高级自动化脚本技术.pdf_第5页

点击查看更多