 < ? x m l   v e r s i o n = " 1 . 0 "   e n c o d i n g = " I S O - 8 8 5 9 - 1 "   s t a n d a l o n e = " y e s " ? > 
 < w o r k f l o w   r o o t - n a m e = " i t e m 2 "   o b j e c t - n a m e = " W o r k f l o w : n a m e = g e n e r i c "   i d = " 8 3 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 E 5 8 B 8 0 8 0 0 1 3 4 5 4 6 4 2 0 7 2 9 8 a e b f 2 a 6 a 5 a 5 "     v e r s i o n = " 0 . 0 . 1 "   a p i - v e r s i o n = " 3 . 1 . 0 "   a l l o w e d - o p e r a t i o n s = " v f e "   r e s t a r t M o d e = " 1 "   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ E x e c u t e   H o s t   M a i n t e n a n c e   a f t e r   t r a p ] ] > < / d i s p l a y - n a m e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ W a i t s   t o   r e c e i v e   a n   S N M P   t r a p   f r o m   a   v C e n t e r   S e r v e r   i n s t a n c e ,   t h e n   s e t   t h e   h o s t   i n   m a i n t e n a n c e   m o d e   o r   e x i s t   t h e   m a i n t e n a n c e   m o d e ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 1 8 0 . 0 '   y = ' 2 0 . 0 ' / > 
 < i n p u t > < p a r a m   n a m e = ' t r a p D a t a '   t y p e = ' A r r a y / P r o p e r t i e s '   > 
 < d e s c r i p t i o n > < ! [ C D A T A [ T h e   T r a p   d a t a ] ] > < / d e s c r i p t i o n > 
 < / p a r a m > 
 < / i n p u t > < a t t r i b   n a m e = ' H o s t O I D '   t y p e = ' s t r i n g '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ 1 . 3 . 6 . 1 . 4 . 1 . 1 9 0 0 4 . 2 . 2 ] ] > < / v a l u e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ T h e   S N M P   H o s t   O I D   ( c a n   b e   f o u n d   i n   t h e   S N M P   M I B   F i l e s   f r o m   V M w a r e ) ] ] > < / d e s c r i p t i o n > 
 < / a t t r i b > 
 < a t t r i b   n a m e = ' H o s t '   t y p e = ' V C : H o s t S y s t e m '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ _ _ N U L L _ _ ] ] > < / v a l u e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ T h e   H o s t   f r o m   w h i c h   t h e   M e s s a g e   i s   g e n e r a t e d ] ] > < / d e s c r i p t i o n > 
 < / a t t r i b > 
 < a t t r i b   n a m e = ' M e s s a g e O I D '   t y p e = ' s t r i n g '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ 1 . 3 . 6 . 1 . 4 . 1 . 1 9 0 0 4 . 2 . 6 ] ] > < / v a l u e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ T h e   O I D   o f   t h e   M e s s a g e ] ] > < / d e s c r i p t i o n > 
 < / a t t r i b > 
 < a t t r i b   n a m e = ' S N M P M e s s a g e '   t y p e = ' s t r i n g '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ ] ] > < / v a l u e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ T h e   S N M P   M e s s a g e ] ] > < / d e s c r i p t i o n > 
 < / a t t r i b > 
 < a t t r i b   n a m e = ' N e w A l e r t '   t y p e = ' b o o l e a n '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ f a l s e ] ] > < / v a l u e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ I s   i t   a   n e w   a l e r t   a r e   t h e   c a n c e l l a t i o n   o f   a   e x i s t i n g   o n e ? ] ] > < / d e s c r i p t i o n > 
 < / a t t r i b > 
 < a t t r i b   n a m e = ' t i m e o u t '   t y p e = ' n u m b e r '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ 0 . 0 ] ] > < / v a l u e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ T h e   t i m e o u t   f o r   t h e   M a i n t e n a n c e   m o d e ] ] > < / d e s c r i p t i o n > 
 < / a t t r i b > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 3 '   t y p e = ' e n d '   e n d - m o d e = ' 0 '   > 
 < p o s i t i o n   x = ' 1 8 0 . 0 '   y = ' 2 7 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 2 '   o u t - n a m e = ' i t e m 1 '   t y p e = ' t a s k '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ R e t r i e v e   H o s t ] ] > < / d i s p l a y - n a m e > 
 < s c r i p t   e n c o d e d = ' f a l s e ' > < ! [ C D A T A [ / /   W e   e x t r a c t   t h e   h o s t   n a m e   o u t   o f   t h e   S N M P   T r a p D a t a 
 v a r   H o s t N a m e ; 
 f o r   ( v a r   x   =   0 ;   x   <   t r a p D a t a . l e n g t h ;   x + + )   { 
         v a r   p r o p   =   t r a p D a t a [ x ] ; 
 	 i f   ( p r o p . g e t ( " o i d " )   = =   H o s t O I D )   { 
 	 	 H o s t N a m e   =   p r o p . g e t ( " v a l u e " ) ; 
 	 	 b r e a k ; 
 	 } 
 } 
 
 / /   W e   c o m p a r e   t h e   e x t r a c t e d   H o s t n a m e   w i t h   t h e   H o s t s   r e g i s t r e d   i n   t h e   v C e n t e r   S e r v e r . 
 / /   w h e n   w e   h a v a   a   m a t c h ,   w e   h a v e   t h e   m a n a g e d   o b j e c t   I D   o f   t h e   H o s t 
 v a r   h o s t s   =   V c P l u g i n . g e t A l l H o s t S y s t e m s ( ) ; 
 f o r   ( v a r   i   =   0 ;   i   <   t r a p D a t a . l e n g t h ;   i + + )   { 
         v a r   t e m p H o s t   =   h o s t s [ i ] ; 
         i f   ( t e m p H o s t . n a m e   = =   H o s t N a m e )   { 
                 H o s t   =   t e m p H o s t ; 
                 b r e a k ; 
         } 
 } 
 
 / /   W e   s e a r c h   f o r   t h e   O I D   i n   t h e   M e s s a g e   t o   g e t   t h e   F i e l d   w i t h   t h e   r e c i e v e d   e r r o r   M e s s a g e 
 v a r   S N M P T r a p ; 
 f o r   ( v a r   y   =   0 ;   y   <   t r a p D a t a . l e n g t h ;   y + + )   { 
         v a r   p r o p   =   t r a p D a t a [ y ] ; 
 	 i f   ( p r o p . g e t ( " o i d " )   = =   M e s s a g e O I D )   { 
 	 	 S N M P T r a p   =   p r o p . g e t ( " v a l u e " ) ; 
 	 	 b r e a k ; 
 	 } 
 } 
 
 / /   O u r   s e a r c h   v a l u e s   i n   t h e   V a l u e   F i e l d   o f   t h e   M e s s a g e 
 / /   W h e n   t h e   F i e l d   c o n t a i n s   t h e   s e a r c h   s t r i n g   w e   b e o m e   t h e   p o s i t i o n .   O t h e r w i s e   b e   b e c o m e   a   - 1   v a l u e   b a c k . 
 v a r   S N M P A l e r t   =   S N M P T r a p . i n d e x O f ( " N e w   a l e r t " ) ; 
 v a r   S N M P C a n c e l   =   S N M P T r a p . i n d e x O f ( " i s   c a n c e l l e d " ) ; 
 
 
 / /   W e   c h e c k   i f   t h e   S N M P   T r a p   h a s   " N e w   A l e r t "   i n   t h e   v a l u e   f i e l d .   I s   s o ,   w e   h a v e   a   n e w   a l e r t . 
 i f   (   S N M P A l e r t   ! =   - 1 )   { 
 N e w A l e r t   =   t r u e } 
 e l s e   { 
 N e w A l e r t   =   f a l s e 
 } ; 
 ] ] > < / s c r i p t > 
 < i n - b i n d i n g > < b i n d   n a m e = ' t r a p D a t a '   t y p e = ' A r r a y / P r o p e r t i e s '   e x p o r t - n a m e = ' t r a p D a t a '   > < / b i n d > 
 < b i n d   n a m e = ' H o s t O I D '   t y p e = ' s t r i n g '   e x p o r t - n a m e = ' H o s t O I D '   > < / b i n d > 
 < b i n d   n a m e = ' M e s s a g e O I D '   t y p e = ' s t r i n g '   e x p o r t - n a m e = ' M e s s a g e O I D '   > < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < b i n d   n a m e = ' H o s t '   t y p e = ' V C : H o s t S y s t e m '   e x p o r t - n a m e = ' H o s t '   > < / b i n d > 
 < b i n d   n a m e = ' S N M P M e s s a g e '   t y p e = ' s t r i n g '   e x p o r t - n a m e = ' S N M P M e s s a g e '   > < / b i n d > 
 < b i n d   n a m e = ' N e w A l e r t '   t y p e = ' b o o l e a n '   e x p o r t - n a m e = ' N e w A l e r t '   > < / b i n d > 
 < / o u t - b i n d i n g > < p o s i t i o n   x = ' 1 4 0 . 0 '   y = ' 1 0 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 1 '   o u t - n a m e = ' i t e m 4 '   t y p e = ' c o n d i t i o n '   a l t - o u t - n a m e = ' i t e m 5 '   c o m p a r a t o r = ' 0 '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ N e w   A l e r t ] ] > < / d i s p l a y - n a m e > 
 < s c r i p t   e n c o d e d = ' f a l s e ' > < ! [ C D A T A [ / / G e n e r a t e d   b y   t h e   s y s t e m ,   c a n n o t   b e   e d i t e d 
 r e t u r n   ( N e w A l e r t   = =   t r u e )   ; ] ] > < / s c r i p t > 
 < i n - b i n d i n g > < b i n d   n a m e = ' N e w A l e r t '   t y p e = ' b o o l e a n '   e x p o r t - n a m e = ' N e w A l e r t '   > < / b i n d > 
 < / i n - b i n d i n g > < c o n d i t i o n   n a m e = ' N e w A l e r t '   t y p e = ' b o o l e a n '   c o m p a r a t o r = ' 0 ' > < ! [ C D A T A [ f a l s e ] ] > < / c o n d i t i o n > 
 < d e s c r i p t i o n > < ! [ C D A T A [ D o   w e   g e t   a   n e w   a l e r t   o r   i s   i t   t h e   c a n c e l l a t i o n   o f   a n   e x i s t i n g   o n e ? ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 1 4 0 . 0 '   y = ' 1 5 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 4 '   o u t - n a m e = ' i t e m 3 '   t y p e = ' l i n k '   l i n k e d - w o r k f l o w - i d = ' B D 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 B 8 C 2 8 0 8 0 0 1 2 2 5 2 8 3 1 3 8 6 9 5 5 2 e 4 1 8 0 5 b b 1 '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ E n t e r   m a i n t e n a n c e   m o d e ] ] > < / d i s p l a y - n a m e > 
 < i n - b i n d i n g > < b i n d   n a m e = ' h o s t '   t y p e = ' V C : H o s t S y s t e m '   e x p o r t - n a m e = ' H o s t '   > < d e s c r i p t i o n > < ! [ C D A T A [ H o s t   t o   p u t   i n   m a i n t e n a n c e   m o d e ] ] > < / d e s c r i p t i o n > 
 < / b i n d > 
 < b i n d   n a m e = ' t i m e o u t '   t y p e = ' n u m b e r '   e x p o r t - n a m e = ' t i m e o u t '   > < d e s c r i p t i o n > < ! [ C D A T A [ T i m e o u t   f o r   t h e   t a s k .   T h e   t i m e o u t   i s   s p e c i f i e d   i n   s e c o n d s   ( i f   < =   0 ,   t h e n   n o   t i m e o u t ) . ] ] > < / d e s c r i p t i o n > 
 < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < / o u t - b i n d i n g > < d e s c r i p t i o n > < ! [ C D A T A [ P u t s   t h e   h o s t   i n   m a i n t e n a n c e   m o d e .   W h i l e   t h i s   t a s k   i s   r u n n i n g   a n d   w h e n   t h e   h o s t   i s   i n   m a i n t e n a n c e   m o d e ,     v i r t u a l   m a c h i n e s   c a n n o t   b e   p o w e r e d   o n   a n d   p r o v i s i o n i n g   o p e r a t i o n s   c a n n o t   b e   p e r f o r m e d   o n   t h e   h o s t .   O n c e   t h e   c a l l   c o m p l e t e s ,   i t   i s   s a f e   t o   t u r n   o f f   a   h o s t   w i t h o u t   d i s r u p t i n g   a n y   v i r t u a l   m a c h i n e s .   
 T h e   t a s k   c o m p l e t e s   o n c e   t h e r e   a r e   n o   p o w e r e d - o n   v i r t u a l   m a c h i n e s   o n   t h e   h o s t   a n d   n o   p r o v i s i o n i n g   o p e r a t i o n s   i n   p r o g r e s s   o n   t h e   h o s t .   T h e   o p e r a t i o n   d o e s   n o t   d i r e c t l y   i n i t i a t e   a n y   o p e r a t i o n s   t o   e v a c u a t e   o r   p o w e r - d o w n   v i r t u a l   m a c h i n e s .   H o w e v e r ,   i f   t h e   h o s t   i s   p a r t   o f   a   c l u s t e r   w i t h   V M w a r e   D R S   e n a b l e d ,   D R S   p r o v i d e s   m i g r a t i o n   r e c o m m e n d a t i o n s   t o   e v a c u a t e   t h e   v i r t u a l   m a c h i n e s .   I f   D R S   i s   i n   f u l l y - a u t o m a t i c   m o d e ,   i t   a u t o m a t i c a l l y   s c h e d u l e s   v i r t u a l   m a c h i n e   e v a c u a t i o n .   
 
 T h e   t a s k   i s   c a n c e l l a b l e . ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 6 0 . 0 '   y = ' 2 2 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 5 '   o u t - n a m e = ' i t e m 3 '   t y p e = ' l i n k '   l i n k e d - w o r k f l o w - i d = ' B D 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 2 5 C 2 8 0 8 0 0 1 2 2 5 2 8 3 1 3 8 6 9 5 5 2 e 4 1 8 0 5 b b 1 '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ E x i t   m a i n t e n a n c e   m o d e ] ] > < / d i s p l a y - n a m e > 
 < i n - b i n d i n g > < b i n d   n a m e = ' h o s t '   t y p e = ' V C : H o s t S y s t e m '   e x p o r t - n a m e = ' H o s t '   > < d e s c r i p t i o n > < ! [ C D A T A [ H o s t   t o   e x i t   f r o m   m a i n t e n a n c e   m o d e ] ] > < / d e s c r i p t i o n > 
 < / b i n d > 
 < b i n d   n a m e = ' t i m e o u t '   t y p e = ' n u m b e r '   e x p o r t - n a m e = ' t i m e o u t '   > < d e s c r i p t i o n > < ! [ C D A T A [ T i m e o u t   f o r   t h e   t a s k .   T h e   t i m e o u t   i s   s p e c i f i e d   i n   s e c o n d s   ( i f   < =   0 ,   t h e n   n o   t i m e o u t ) . ] ] > < / d e s c r i p t i o n > 
 < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < / o u t - b i n d i n g > < d e s c r i p t i o n > < ! [ C D A T A [ E x i t s   m a i n t e n a n c e   m o d e .   
 
 T h e   t a s k   c a n   b e   c a n c e l e d . ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 2 2 0 . 0 '   y = ' 2 2 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < p r e s e n t a t i o n > 
 < p - p a r a m   n a m e = " t r a p D a t a " > < d e s c > < ! [ C D A T A [ T h e   T r a p   d a t a ] ] > < / d e s c > 
 < / p - p a r a m > 
 < / p r e s e n t a t i o n > < / w o r k f l o w >