A service program is started when BIS processes a 
               		StartService tag on a 
               		.srf page. A service program is considered to be finished when: 
               	 
            
 
            	 
             
               		
               - The program terminates by executing a 
                  		  GOBACK (or equivalent). 
                  		
               
- The program responds to a request by calling 
                  		  B_WriteResponse with an 
                  		  end program or 
                  		  end program and session disposition parameter (described in detail in 
                  		  BIS Return Codes). 
                  		
               
-  A 
                  		  StopService tag is rendered. The service program is disconnected from the session, so a subsequent 
                  		  StartService can be processed on the same page. 
                  		
               
- A 
                  		  SessionComplete tag is rendered. The service program and session both end when the page is complete. Note that a 
                  		  StopService can also be specified if the service program must stop immediately. 
                  		
               
- The number of seconds specified in the 
                  		   
                     			 InactivityTimeout 
                     		   pass without a request. Both the service program and the session are terminated. 
                  		
               
- An 
                  		  XMLExchange tag is rendered and the number of seconds specified in the 
                  		   
                     			 ServiceTimeout 
                     		   interval pass without a response from the service program. If a service program needs a longer amount of time to complete
                  processing, it should lengthen the 
                  		  ServiceTimeout interval by calling 
                  		  B_SetServiceTimeout(), or call this function with a parameter of zero to reset the timer. 
                  		
               
The following general rules apply to service programs: 
               	 
            
 
            	 
             
               		
               - A given BIS session may have only one active service program at any time. 
                  		
               
-  When a service program enters the termination state, it is immediately disconnected from the session but is given 30 seconds
                  to clean up and perform a 
                  		  GOBACK. If the program is still running when the timer expires, BIS requests that the program stop at the next statement boundary
                  and the service program is granted another 30 seconds to terminate. If, at the end of the allotted time the program has still
                  not terminated, the process is forcibly terminated and unloaded from memory. 
                  		
               
 A new service program may be started as soon as the current service program is disconnected from the session. In other words,
               
               		{{StopService}} {{StartService(…)}} is allowed.