You are viewing limited content. For full access, please sign in.

Question

Question

RASession workflow

asked on March 18, 2019

I have an SDK script that creates new repository users, but when running 20 instances at the same time it gives the error: ([9030] The user account has reached its session limit).


I used a C # script declaring the Login but it gives the error.

protected override void Execute()
        {
            String LFusuario = this.GetTokenValue("Usuario").ToString();
            String LFclave = this.GetTokenValue("Contrasena").ToString();
            String LFserver = this.GetTokenValue("Server").ToString();
            String LFrepositorio = this.GetTokenValue("Repositorio").ToString();
            String userName = this.GetTokenValue("Socio").ToString();
            String password = "123";

            RepositoryRegistration myRepoReg = new RepositoryRegistration(LFserver, LFrepositorio);
            Session mySess = new Session();
            mySess.LogIn(LFusuario, LFclave, myRepoReg);
            UserInfo UI = new UserInfo();
            UI.Session = mySess;
            UI.Name = userName;
            UI.Password = password;
            UI.MustChangePassword = true;
            UI.FeatureRights = FeatureRights.Search;
            UI.ReadonlyAccess = true;
            UI.Save();
                try
                    {

                     UI.Save();
                    }
                catch (Exception e)
                        {  }
            mySess.LogOut();
            mySess.Close();
            mySess.Discard();
        }


I used a VB script using RASessions, but it gives the same error.

 

Protected Overrides Sub Execute()
     Try
        Dim ui As UserInfo = New UserInfo()
        ui.Session = RASession
        ui.IsDisabled = False
        ui.CanUsePassword = True
        ui.Name = GetTokenValue("Socio")
        ui.Password = ("123")
        ui.ReadonlyAccess = True
        ui.Save()
    Catch ex As Exception
        WorkflowApi .TrackError(ex.Message)
    End Try
End Sub

 

 

Some way that Workflow Script does not stop for maximum number of LF Sessions with the same user?

 

Thanks

0 0

Replies

replied on March 20, 2019

Estimado Luis,

 

Que usuario utilizas en el perfil de conexión para ejecutar el workflow?

 

 

en este caso el usario workflow no deberia ser usuario designado, esto aplica para LFWorkflow

y debe tener como privilegio asignado "administrar elementos de confianza" , con ello no debe limitarse a las conexiones (que si se tiene en un nombrado), y tu ejemplo de VBNet se ejecuta perfectamente.

saludos,

Marco.

1 0
replied on March 18, 2019

Each time you call Session.Login() you'll end up creating a new licensed connection. You need to create a single Session instance and then loop through your user creation code. 

It sounds like you are attempting to create one user per workflow instance. Is there a reason why you can't batch them up into a single run?

0 0
replied on March 18, 2019

Hello. 

The documents (they have the data of the new user) that start the workflow are created by the import agent. That is why each user is created by workflow instance.

 

0 0
replied on March 18, 2019

Do you need the user accounts created immediately? You can schedule a workflow to run periodically throughout the day. That workflow could then grab all of the documents that were brought in since the last run. At that point, you could extract all of the relevant information and feed it to an SDK Script activity in a single shot.

0 0
replied on March 25, 2019

This is expected behavior. If you create your own connections in scripts, you are subject to the limitations of normal users (must have a license and can only have 4-8 concurrent connections at a time, depending on your Avante/Rio edition). 

As Marco mentions, if you use the built-in connection for scripts, then you are not subject to the limitations. However, your workflow user needs sufficient rights and privileges to perform the actions in the script.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.