There are several good practice conventions in the scripting world, and Groovy within IJC is no exception. Here we have are collecting tips and suggestions for good coding practices, to help out with your code development. This page will continue to grow as we collect more suggestions.
1 2 3 4 5 6 7 8 9 | def lock = edp.lockable.obtainLock( 'working' ) def envRW = EnvUtils.createDefaultEnvironmentRW(lock, 'working' , true) try { // code code code } finally { lock?.release() envRW?.feedback.finish() } |
withLock
for locking items safely:
1 2 3 | edp.lockable.withLock( 'working' ){ envRW -> // code code code } |
1 | assert etyStructureField != null |