xjmen ·¢±íÓÚ 2006-8-28 12:06:14

ÔÚMercuryÕÒµ½µÄºÃ¶«Î÷-TD Best Practices

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

walker1020 ·¢±íÓÚ 2006-8-28 13:13:46

²»´í£¡²»´í£¡µÄÈ·ÊǷdz£Ïêϸ£¡ ÏÈÏÂÔØÏÂÀ´»ØÈ¥ºÃºÃÑо¿ÁË¡£

walker1020 ·¢±íÓÚ 2006-8-28 14:57:10

ÎÒÏÂÔØÏÂÀ´¿´ÁË¿´£¬Â¥Ö÷ÔÚ #1 µÄÄÚÈݾÍÊǸ½¼þÖÐÎļþµÄ Ŀ¼¡£

jcgush ·¢±íÓÚ 2006-8-28 17:06:44

лл
ÂýÂýÑо¿Ñо¿£¡

sz_lg ·¢±íÓÚ 2006-8-29 10:18:28

ÒªÊÇÓÐÈË·­ÒëϾÍˬÁË£¬ºÇºÇ

walker1020 ·¢±íÓÚ 2006-9-13 21:58:00

×ÊÁϲ»´í£¬ÖµµÃÊղأ¡

cindyzhao ·¢±íÓÚ 2007-1-21 14:14:16

Êղء£¸Ðл£¡

SueR ·¢±íÓÚ 2007-2-16 04:22:06

ÕýÐèÒª£¬Ð»Ð»£¡

julialove ·¢±íÓÚ 2007-4-3 11:58:01

3q

htot05 ·¢±íÓÚ 2007-4-4 16:25:47

ºÃ¶«Î÷,¶¥~!

ancestor ·¢±íÓÚ 2007-4-18 04:34:40

ÊÕ²ØÏÂÀ´£¬ÓÐʱ¼ä¿´Ï£¬Ð»Ð»ÁË£¡£¡

jacky9947 ·¢±íÓÚ 2007-4-20 17:00:08

ºÃ¶«Î÷°¡,ÖµµÃÊֲذ¡

rox ·¢±íÓÚ 2007-4-29 17:17:47

3q ÏÂÀ´Ñо¿£¡£¡sdlkfj2

whfzy ·¢±íÓÚ 2007-6-21 18:06:59

»Ø¸´ #1 xjmen µÄÌû×Ó

ÏÈ¿´£¬Ð»Ð»

×ÏĽ ·¢±íÓÚ 2007-7-5 10:42:16

¶¥°¡¡£ºÃ

zmf111 ·¢±íÓÚ 2007-7-5 11:41:16

Èí¼þ²âÊÔ¼¼Êõ¾­µä½Ì³Ì

ncxsx ·¢±íÓÚ 2007-7-5 20:00:04

ºÜ¸ßÐËÄÜ·¢ÏÖÕâôºÃµÄ²âÊÔÂÛ̳¡£Ð»Ð»¹²Ïí£¡

xxxx168 ·¢±íÓÚ 2007-7-11 15:36:33

¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥
¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥ £¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿¶¥¶¥£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥

wei_jc ·¢±íÓÚ 2007-7-11 16:51:47

Êղأ¬ºÃºÃÑо¿£¬¸ÐлLZ

·ÉÌìÏÀ ·¢±íÓÚ 2007-8-5 16:45:07

¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥
¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥ £¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥£¿£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿¶¥¶¥£¿£¿¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿¶¥£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿£¿¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿£¿¶¥
¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿£¿¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥¶¥£¿£¿£¿£¿¶¥¶¥
Ò³: [1] 2 3
²é¿´ÍêÕû°æ±¾: ÔÚMercuryÕÒµ½µÄºÃ¶«Î÷-TD Best Practices