Step 1: Declare any BDL simple variable to be used as state variable
For
example:
DEFINE ServiceState STRING # Unique ID to identify the service state in the database
For instance, you can use a unique ID of a database table to manage the web services sessions.