Adapt Existent Users table to WorkWithPlus Security

It is very common that applications have already got a table of users but have not implemented security yet.
 
In this cases, WorkWithPlus provides a mechanism that makes possible to adapt WorkWithPlus security with an existent Users table from an application.
 
In order to do this, you should follow the steps below:
 
Lets explain it with an example. We have the following Users table:

AdaptExistentUserTablesImg01

Step 1 - Create a new Association transaction between the existent Users table and the transaction SecRole, and set this transaction as Business Component:

AdaptExistentUserTablesImg02

Step 2 - Create a WWP Association object from ExistentUsers WorkWithPlus's instance, selecting SecRole as the target:

AdaptExistentUserTablesImg03

AdaptExistentUserTablesImg04

AdaptExistentUserTablesImg05

Step 3 - Add a UserAction in Selection object of ExistentUsers WorkWithPlus's instance that invokes Association object:

AdaptExistentUserTablesImg06

Step 4 -  Repeat the Step 3 but inserting the UserAction in TabGeneral and GridTab ExistentUsersSecRole (this tab will appear after executing "Update Instance" in this instance) of View object:

AdaptExistentUserTablesImg07

Step 5 -  Delete GridAssociation object from SecRole's WorkWithPlus's instance, and the GridTab correspondent within View object:

AdaptExistentUserTablesImg08

Step 6 -  From WorkWithObjects delete WorkWithPlus instance of SecUser transaction, then delete SecUser transaction and finally SecUserRole transaction:

AdaptExistentUserTablesImg09

 

Step 7 -  Modify SecLogin WebPanel, so that the domain of the variables assigned to UserName and Password be based on attributes ExistentUsersName, ExistentUsersPassword. Also modify behaviour of 'DoLogIn' Event, so that navigates to existent Users table.
 
Step 8 -  Change navigation of SecGrantAllAccessToAdminRole procedure in order to take into account our users (from ExistentUsers table) and not the generated by the pattern ones. Verify that the navigations are correct.
 
Step 9 -  Then open SecGetRolesFromLoggedUser procedure and modify navigation in order to take into account our users (from ExistentUsers table) and not the generated by the pattern ones. Verify that the navigations are correct.
 
Step 10 - Finally open SecUpdateAdvancedSecurityObjects WebPanel and modify SecUserName variable for the userName of our transaction (ExistentUsersName)
 
Step 11 - Do 'Update Instance' to SecRole WorkWithPlus's instance.
 
Step 12 -Execute program and verify that works properly.