The Service Engine is the BIS component that starts and runs service programs in response to requests. Currently, all BIS service programs are COBOL programs.
The Service Engine is started when a BIS StartService tag is rendered, and runs asynchronously from the BIS web components. BIS and the Service Engine synchronize when:
The simplified flow of control is depicted below.
The BIS Request Handler and the BIS Service Engine synchronize when the Request Handler renders an XMLExchange tag and the Service Engine calls B$ReadRequest. Ideally, the Service Engine will be waiting at a synchronization point when the BIS Request Handler is ready to provide a request. To avoid deadlocks, once BIS begins to process the XMLExchange tag:
Once the Service Engine has accepted the request, it is granted a new ServiceTimeout interval to read the XML request, compute the response, write the XML response, and call B$WriteResponse. Alternatively, the service program can terminate, which causes the BIS Request Handler to redirect if an OnExit parameter was specified in the XMLExchange tag. If the response cannot be provided within this interval, the service program must request more time as described above.
When the BIS Request Handler receives the response, it is placed into the page output stream and processing continues. At this point, the Service Engine may:
If the service program does neither of these, but instead keeps running, the Service Engine eventually terminates it with a Service Timeout.