The LDAP functions allow you to connect to an LDAP, using anonymous or simple authentication, and modify and delete entries or perform searches based on names, and filters, and explicitly define what attributes to be returned. The LDAP functions use connection pooling for best performance.
Note | ||
---|---|---|
| ||
Due to the nature of LDAP, the following functions are not transaction safe and should therefore be used mainly for realtime workflows. All functions except ldapCreate are asynchronous in nature. The ldapCreate function is recommended to be called from the initialized block and the returned value to be stored in a global variable. |
LDAP Related UDR Type
The UDR type created by default in the LDAP agent can be viewed in the UDR Internal Format Browser. To open the browser open an APL Editor, in the editing area right-click and select UDR Assistance...; the browser opens.
...
The default error handling for the functions ldapCreate
, ldapSearch
, and ldapScopeSearch
is to handle all errors as exceptions, which means that the workflow will abort in the batch case and the request will typically be discarded in the realtime real-time case.
If this is not desired behavior, it is possible to set these LDAP functions to suppress all communication errors and instead return null
in error situations. In this case, the error will be made available through the ldapGetLastError
function.
...
Set the property in the cell.conf
or the relevant Execution Context <pico>.conf
, depending on where where where the workflow is executed.
Idle Connection Timeout
By default, a connection remains within a pool in an idle state for five minutes before it is closed. To set the amount of time in milliseconds, set the property property com.sun.jndi.ldap.connect.pool.timeout
in the cell.conf
or the relevant Execution Context <pico>.conf
, depending on where the workflow is executed.
ldapCreate
Creates a connection towards an LDAP server, using either anonymous or simple authentication. This function is usually invoked in the initialize
block.
...