|
Working with Workflow
I. Rules of Thumb 2
1. Error Handling 2
2. Code Optimization 3
3. Using TestDirector API (OTA) in Scripts 4
4. Workflow Objects 6
II. Code Templates 8
1. Error Handling 8
1.1 Show the Standard Error to the User 8
1.2 Error Handling in Procedures and Functions 8
2. Working with the Fields 9
2.1 Setting Field Properties 9
2.2 Resetting Properties of All Fields 10
2.3 Setting Field Layout on Form 11
2.4 Setting List Dependencies 12
2.5 Ensuring That User Updates Some Field When Another Field Is Changed 13
2.6 Check That the Object Is Not Yet Submitted to the Project (“new object”) 15
2.7 Revert the Field to the Old Value On Update 16
2.8 Implementing “By Owner Only” by Multiple Fields 17
3. Working with TestDirector API (OTA) 19
3.1 Getting the current connection (current session) 19
3.2 Getting current session properties 19
3.3 Finding to which groups the current user belongs 21
3.4 Keeping last used value in fields 22
3.5 Sending an E-Mail from the Workflow 24
3.6 Obtaining Defect Statistics for the User 26
3.7 Setting the Last Item in List As a Default Value of the Field 27
3.8 Copy Last Run Value to Test in Test Set 28 |
|