



SupportedLanguagesandScriptingSetup ............................................................................................................................ 3
SupportedLanguages ......................................................................................................................................... 3
JavaScript ................................................................................................................................................ 3
Polarion2304 ........................................................................................................................................... 3
Polarion22R2 .......................................................................................................................................... 3
Polarion21R2andpreviousversions ......................................................................................................................... 3
Documentation .......................................................................................................................................... 3
Groovy .................................................................................................................................................. 3
Polarion22R1 .......................................................................................................................................... 3
Documentation .......................................................................................................................................... 3
Polarion21R2andpreviousversions ......................................................................................................................... 3
PolarionSDK ................................................................................................................................................ 3
Locationofscripts ............................................................................................................................................ 4
WorkflowScripts ................................................................................................................................................ 5
ScriptCondition .............................................................................................................................................. 5
ScriptImplementation ....................................................................................................................................... 5
AvailableObjects ........................................................................................................................................ 5
StartofaScriptCondition .................................................................................................................................. 5
EndofaScriptCondition ................................................................................................................................... 6
ScriptConfiguration ......................................................................................................................................... 6
ScriptDebugging ........................................................................................................................................... 7
ScriptExamples ........................................................................................................................................... 8
CheckDocumentCommentsStatus.js-ReturnsBooleanExample .................................................................................................... 8
CheckDocumentCommentsStatus.js-ReturnsStringExample ...................................................................................................... 8
ScriptFunction ............................................................................................................................................... 9
ScriptImplementation ....................................................................................................................................... 9
AvailableObjects ........................................................................................................................................ 9
StartofaScriptFunction ................................................................................................................................... 10
EndofaScriptFunction .................................................................................................................................... 10
ScriptConfiguration ......................................................................................................................................... 10
ScriptDebugging ........................................................................................................................................... 11
Useofthrow ............................................................................................................................................ 12
ScriptExamples ........................................................................................................................................... 12
IncrementVersion.js-Using2ConfigurationParametersanddebuginformation ......................................................................................... 12
CreateDocumentBaseline.js ................................................................................................................................ 13
JobScripts .................................................................................................................................................... 15
ScriptConfiguration ........................................................................................................................................... 15
ScriptImplementation ......................................................................................................................................... 15
AvailableObjects .......................................................................................................................................... 15
Contentofascript.job ....................................................................................................................................... 16
Howtousethescope ..................................................................................................................................... 16
Howtoreadscriptproperties ................................................................................................................................ 16
HowtousetheworkDirvariable ............................................................................................................................. 17
Howtostartandcommitatransaction ......................................................................................................................... 17
Runningpartsofascript.jobasanotheruserwithdoAsUser ........................................................................................................ 18
ScriptExecution .............................................................................................................................................. 19
Manualscript.jobexecution ................................................................................................................................... 19
Automaticscript.jobexecution ................................................................................................................................. 20
Permissionsofascript.job .................................................................................................................................... 20
ScriptDebugging ............................................................................................................................................. 20
ScriptExamples .............................................................................................................................................. 21
emailDigestJob.js .......................................................................................................................................... 21
DefaultAPISecurity ............................................................................................................................................. 25
JavaScriptScriptscompatibilitywithGraalVM .......................................................................................................................... 26
FAQ ......................................................................................................................................................... 27