Setting a password in workflow


Word of WARNING you are going to be making some under the cover changes in XML in Entity definitions. So do this in a LAB, have BACKUP copies of the files being changed.

This was tried with 3.5.1, but should work with earlier and later releases.

  1. Create a new entity in the DAL called Password Change (or call it anything you want) based on the User class. It should add the surname attribute for you by default. Leave it with just that attribute.

    1. Change the surname attribute to not required and not multi value in the access properties

  • Deploy these changes to the User Application driver.

  • In iManager find your User Application driver, by using View Objects.

    1. Under the container AppConfig.DirectoryModel.EntityDefs find the object that represents your entity, this is the key name you gave it.

  • Open in, find the xmlData attribute and edit it

  • Copy the XML into a text editor

    1. Find the surname attribute, change the key, nds-name, and ldap-name to userPassword (note case is important)

  • Change the display label also

  • Copy this changed XML and paste it to replace the current attribute data

  • Save your changes to the attribute in iManager

  • In Designer run a Compare of your entity to what is in Designer, it should be out of sync. Go ahead and update the Designer entity

  • Create a workflow that uses this new entity in an Entity activity, use it to create/modify the entity

    1. The workflow should change the recipients password, have them enter a new password

  • Deploy your workflow

  • Log in as the User Application admin and flush the cache, so that your DAL changes are picked up

  • Test the workflow with a test user after they complete the request and if it completes successfully

  • Logoff and try to login with the old password, should fail

  • Try the new password should work

The attached zip file contains a sample workflow and entity that demonstrates this solution.



How To-Best Practice
Comment List
Related Discussions