Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: application/state/ended/error & USER LIMIT EXCEEDED  (Read 14729 times)
Rodrigo V.
Posts: 11


« on: February 20, 2014, 12:19:01 pm »

Hello,

Is it posible to show a 'USER LIMIT EXCEEDED' message in GAS when the application was ended by #user license limit? We try to use application/state/ended/error and some other values at EndingPage Snippet but it looks like no ERROR is raised when the app was ending by license limit.

Thanks!
.
Four Js
Posts: 65


« Reply #1 on: February 24, 2014, 03:52:15 pm »


Hi Rodrigo,

Unfortunately, if your need is to display the FGL error message "user limit exceeded" on browser, there is no solution for the moment.
I invite you to contact your support center if you want us to register a feature request for this.

Regards,
Guney
 
Rodrigo V.
Posts: 11


« Reply #2 on: February 24, 2014, 04:30:35 pm »

Thanks Guney,

I'll do it.

Rodrigo
Andrew B.
Posts: 1


« Reply #3 on: March 17, 2014, 06:30:01 pm »

Hi there,
Reuben provided this get around which works ok for us. It has to run at the very start of the program before there is any user or screen interactions.
 If the function returns true we use "ui.Interface.frontCall" to display a PDF document telling the user the license count had been exceeded and exit the menu system. This works for GAS as well as GDC.


#Name       : license_exceeded()
#Description: function to check 4J's Licence count
#Parameters : -
#Returns    : TRUE if no programs running else FALSE

FUNCTION license_exceeded()
DEFINE ch base.Channel
DEFINE line STRING
DEFINE tok base.StringTokenizer
DEFINE in_use, limit INTEGER

    LET ch = base.Channel.create()
    CALL ch.openPipe("fglWrt -a info users", "rw")

    WHILE TRUE
        LET line = ch.readLine()
        IF ch.isEof() THEN
            EXIT WHILE
        END IF
        IF line.subString(1,5) = "Users" THEN
            LET tok = base.StringTokenizer.createExt(line.subString(16, line.getLength()), "/","", TRUE)
            LET in_use = tok.nextToken()
            LET limit = tok.nextToken()
            IF in_use >= limit THEN
                RETURN TRUE
            ELSE
                RETURN FALSE
            END IF
        END IF

    END WHILE

    -- Shouldn't get there but in case we do
    RETURN FALSE

END FUNCTION    {license_exceeded}

Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines