Sample Procedure Showing the Use of %LDAPSearch() With Microsoft Active Directory

 

The information in this article applies to:

Product: Metastorm BPM (e-Work)
Version: 7.x

Discussion

  • The attached file contains a procedure and library. This sample demonstrates the use of %LDAPSearch in a dynamic role, in a server-side script, and in a 'When button pressed' server operation with no script.

    Changes to the library (LDAP alias) and procedure (dynamic role, script, and Do this code for the No script Search button) will need to be made to reflect your own environment.

  • Note that both the syntax checker for the dynamic role and the Designer when publishing will generate the warning The function "LDAPSearch" has the wrong number of parameters. Expected - 4. Found - 7. This is a known issue and should be ignored.

    Also note that the formula for %LDAPSearch in the dynamic role requires that the LDAP connection be specified in full as it will fail if an alias is used.

  • The role for the blank form is set to everybody. In order to test the dynamic role, select LDAPUser from the roles list and republish. Remember that the dynamic role as configured in the sample procedure will check the name of the user logged in to Metastorm BPM against a comma-separated list of user names returned from Active Directory by %LDAPSearch. If the logged-in user name is found in the list, then the blank form will be available.

Tagged: