Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications

> ## setWebState

> This procedure sets `web-state` for the current Web object. When web-state changes, the appropriate cookie information is also set.

> Location: `web2\admweb.p`

> Parameters:

> `INPUT pdWebTimeout AS DECIMAL`

> The timeout period, in minutes, for the Web object. Specify the time to one decimal place. For example, enter `0.0` for no timeout period or `15.0` to signify fifteen minutes.

> Returns: LOGICAL

> Notes:

> - This function is called from `outputHeader` in a Web object to change the `web-state` and `web-timeout` attributes. In addition, changing these attributes sets the WSEU (WebSpeed Exclusive User) cookie that instructs WebSpeed to lock the agent process (and therefore dedicate the agent to a particular end user).

> - When `timeout-period` is set at a positive value, the `web-state` attribute for that object is set to `state-aware`, and the `web-timeout` attribute is set to the timeout period.

> - A timeout period of 0 or less turns the `web-state` to `state-less` and resets the `web-timeout` attribute to 0.

> - Note that `setWebState` must be called prior to `output-content-type` or it will not affect the header for the current HTML page.

> Examples:

>     PROCEDURE outputHeader:
>     \*---------------------------------------------------------------------
>     Purpose: Output the MIME header, and any "cookie" information
>     ----------------------------------------------------------------------*\
>     \* Check the status of the transaction. If the transaction is
>     complete, turn off state-aware. If the transaction is ongoing
>     set a 15 minute timeout period. *\
>     setWebState(IF state EQ "complete":U THEN 0.0 ELSE 15.0).

>     \* Create a standard HTML page. *\
>     output-content-type("text\html":U).
>     END PROCEDURE.

> ##### See also:

> output-content-type

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095