From the UI, a resource is set a resource primary role, role_a.
In attempting to set the role from role_A to role_B via XOG with excerpt example:
<ManagementInformation primaryRoleId="role_b"/>
The following error is given in the XML out file:
The Primary Role ID specified role_B is Invalid.
XOG Output :<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/>
<soapenv:Header/>
<soapenv:Body>
<XOGOutput xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
<Object type="resource"/>
<Status elapsedTime="0.106 seconds" state="SUCCESS"/>
<Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="1"/>
<Records>
<Record>
<KeyInformation>
<column name="resourceId">ttexample</column>
<column name="lastName">Last</column>
<column name="externalSource">NIKU</column>
<column name="externalId">222222222</column>
</KeyInformation>
<ErrorInformation>
<Severity>WARNING</Severity>
<Description>The Primary Role ID specified role_B is Invalid. Default back to original value if it exists, to None if not. </Description>
</ErrorInformation>
</Record>
</Records>
</XOGOutput>
</soapenv:Body>
</soapenv:Envelope>
Workaround: Deactivate the role_B and create a new role.