ASNA WingsRPG™ Reference Manual

Wings Runtime Life Cycle

The lifecycle of a Wings Application begins when the user makes a page request that is handled initially by ASP.NET. ASP.NET uses the Global.asax page to perform the session_start and application_start processes and then the WingsJob application is initiated. WingsJob controls the user logon and calls the program or menu requested by the user via Execute_Startup_Program.

The RPG application, detecting the Handler "ASNAWINGS" keyword, calls upon the ASNAWINGS handler logic that uses the ASNA Wings 5250 emulator when an EXFMT command is encountered. This causes, with the help of DataGate and Telnet packet communications, the modernized display file to be used for the presentation layer both to and from the client.

When the user selects the cancel or exit function key terminating their session, ASP.NET again uses the Global.asax page to pass control to the WingsJob that closes the database files, disposes of the resources, and shuts down the job. This returns the client to the IBM i system.

It can be broken down like this:

  1. User makes a page request (opens a website powered by Wings)
  2. On the Global.asax page, two processes are started:
    • session_start
    • application_start
  3. The application_start process activates the WingsJob application
  4. WingsJob calls the program or menu requested on the IBM i, via the Execute_Startup_Program process, using the DataGate and Telnet utilities
  5. The Wings application detects the ASNAWINGS keyword and calls the handler logic when an EXFMT command is encountered.
  6. The Job continues to run with input and output from the Wings Display File.
  7. The user activates a control that cancels or exits (per the function key)
  8. ASP.NET uses Global.asax which begins the Session_End process, and passes control to the WingsJob.
  9. WingsJob does the following:
    • Closes the Database files
    • Disposes of the resources
    • Shuts down the job

Important: This model presumes that the user does not have Limited Capabilities, see the Limited Capability Users topic for details on how the life cycle works in those scenarios.