Table of contents


Official Content

This article explains how to establish a connection using the Workflow API, since an established connection is essential to be able to use most of the API.

To do so, you can execute the following code:

&WorkflowServer.Connect(&UserName,&Password)
commit

Also, you can keep the connection with the WorkflowWebSession domain; otherwise, you will need to use the Connect() method each time you need to use the API. It is necessary to import this domain from the Custom Client KB.

&WebSession.Set(WorkflowWebSession.SessionHandle, &WorkflowServer.Session)
&WebSession.Set(WorkflowWebSession.UserCode, &UserName)

Finally, if you want to create an external login for the Standard Client you need to use the following code:

&WorkflowServer.Connect(&Name, &Password)
commit
&Websession.Set(!'WorkflowUser', &Name)
&Websession.Set(!'WorkflowPassword', &Password)
Link(!"wfautosignin.aspx")

Where the data type variables are as follows:

&WorkflowServer – WorkflowServer
&WebSession – WebSession
&UserName – WorkflowName
&Password – WorkflowPassword

  

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant