How to activate and inactivate user in batch in JAVA Client
Hello , I want to know how to inactivate and activate user in agile plm in batch . I want keep 4-5 user active and other users inactive Please tell me how can i achieve.
Easiest way is to use an SQL script. No need to stop/start the Agile application server, as user info is not cached. The SQL would be as follows :
update agileuser set enabled = 0 where loginid = ‘<user login>’; — this will disable the user
update agileuser set enabled = 1 where loginid = ‘<user login>’; — this will enable the user
Login into the Agile database, run the script to change those users who need to be modified, commit those changes and log out, You should then be good.
While Kevin is most certainly correct, it has been my experience that most end users, even those who are admins of Agile, do not have direct access to run UPDATE scripts against the database if you are not a DBA. Sure, you can create scripts and, with appropriate approval, get your DBA to run them, but that’s not convenient especially if you need to do this repeatedly.
Another way to do this is via SOAP request in SOAPUI by Smartbear. (http://www.soapui.org | http://www.smartbear.com)
You can use the updateObject request under the BusinessObject_Binding wsdl. Here’s a sample. In this sample, assume you have two users with logins of user.one and user.two
<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/”>
<soapenv:Body xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<updateObject xmlns=”http://xmlns.oracle.com/AgileObjects/Core/Business/V1″>
<request xmlns=””>
<requests><classIdentifier>User</classIdentifier><objectNumber>user.one</objectNumber><data><AGILEUSER.ENABLED xsi:type=”AgileListEntryType” attributeId=”12643″ xmlns:xsi=”http://xmlns.oracle.com/AgileObjects/Core/Common/V1″><selection><value>Inactive</value></selection></AGILEUSER.ENABLED></data></requests>
<requests><classIdentifier>User</classIdentifier><objectNumber>user.two</objectNumber><data><AGILEUSER.ENABLED xsi:type=”AgileListEntryType” attributeId=”12643″ xmlns:xsi=”http://xmlns.oracle.com/AgileObjects/Core/Common/V1″><selection><value>Active</value></selection></AGILEUSER.ENABLED></data></requests>
</request>
</updateObject>
</soapenv:Body>
</soapenv:Envelope>
Hi Dhananjay,
Alternatively we can use Import Functionality to update the User Status(Active/Inactive).
Export the Users data into excel sheet , update the Status Flag as required and do import to update the status field.
If this is the regular activity which will be done in Test Instance, post Refresh , you may save the mapping file and reuse it.
Thanks,
Karthik