GXflow Custom Client with GAM

Unofficial Content

When using GXflow Custom Client with GeneXus Access Manager you must modify the following object: WorkflowCheckGAMSession removing comments of the source and adding the undefined variables.

Object source code must be like this:

If GAMSession.IsValid(&GAMSession, &GAMErrors)
  If Not &GAMSession.IsAnonymous
    &userCod = &GAMSession.User.Name.Trim().ToUpper()
    &error = WorkflowGenerateSession(&userCod, '')
    If &error.Code = 0
      &check = True
    Endif
  Endif
Endif

And the following variables must be created:

  • GAMErrors: Data type GAMError (Collection)
  • GAMSession: Data type GAMSession

WorkFlowGenerateSession code is as follows (you can download the code from here):

parm(in: &userCod, out: &error);
&server.Connect(&userCod, '')
Commit

&error = &server.Error

If &server.Error.Code = 0
    &session.Set(WorkflowWebSession.SessionHandle, &server.Session)
    &session.Set(WorkflowWebSession.UserCode, &userCod)
Endif

Note: At execution time, the standard client application will automatically redirect to the object configured in Login Object for Web property, and you must link to wfmain object.