pp108 : UpdateAssignmentsWithForcePrincipal

UpdateAssignmentsWithForcePrincipal

This method updates the user assignments. In this method you can mention whether the unit is a principal unit of user or not. Automatically, the assignment will be published as the dopublish element is ignored.

SOAP Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <UpdateAssignmentsWithForcePrincipalResponse xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0">
            <UpdateAssignmentsWithForcePrincipal>
                <WorkspaceID>002481F0-8E9F-11E2-EE36-A5EED1105F38</WorkspaceID>
                <AssignmentRoot>[Assignment Root]</AssignmentRoot>
                <Assignments>
                    <dataset>
                        <tuple>
                            <old>
                                <Assignment xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0">
                                    <ID>001CC438-906D-11E2-EECC-951E26303F4B</ID>
                                    <UserDN>cn=tester1,cn=organizational users,o=system,cn=cordys,o=orr.com</UserDN>
                                    <EffectiveDate>2013-02-13T00:00:00.0000</EffectiveDate>
                                    <FinishDate>2013-02-22T05:09:05.000</FinishDate>
                                    <IsPrincipalUnit>true</IsPrincipalUnit>
                                    <IsEffective>yes</IsEffective>
                                    <UnitID>001CC438-906D-11E2-EECC-49936ED1DF4B</UnitID>
                                    <QName>teams/college</QName>
                                    <Name>001CC438-906D-11E2-EECC-49936ED1DF4B</Name>
                                    <RoleDN>cn=principal,cn=organizational roles,o=system,cn=cordys,o=orr.com</RoleDN>
                                    <UnitRoleID>001CC438-906D-11E2-EECC-951E262FFF4B</UnitRoleID>
                                    <IsLeadRole>true</IsLeadRole>
                                    <AssignmentRoot>001CC438-906D-11E2-EECC-8FE3BE469F4B</AssignmentRoot>
                                </Assignment>
                            </old>
                            <new>
                                <Assignment xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0">
                                    <ID>001CC438-906D-11E2-EECC-951E26303F4B</ID>
                                    <UserDN>cn=mnagarjuna,cn=organizational users,o=system,cn=cordys,o=orr.com</UserDN>
                                    <EffectiveDate>2013-02-13T00:00:00.0000</EffectiveDate>
                                    <FinishDate>2013-02-22T05:36:00.800</FinishDate>
                                    <IsPrincipalUnit>true</IsPrincipalUnit>
                                    <IsEffective>yes</IsEffective>
                                    <UnitID>001CC438-906D-11E2-EECC-49936ED1DF4B</UnitID>
                                    <QName>teams/college</QName>
                                    <Name>001CC438-906D-11E2-EECC-49936ED1DF4B</Name>
                                    <RoleDN>cn=professor,cn=organizational roles,o=system,cn=cordys,o=orr.com</RoleDN>
                                    <UnitRoleID>001CC438-906D-11E2-EECC-951E262FFF4B</UnitRoleID>
                                    <IsLeadRole>true</IsLeadRole>
                                    <AssignmentRoot>001CC438-906D-11E2-EECC-8FE3BE469F4B</AssignmentRoot>
                                </Assignment>
                            </new>
                        </tuple>
                    </dataset>
                </Assignments>
                <DoPublish/>
                <ForceSetPrincipal>[Override existing principal unit?]</ForceSetPrincipal>
            </UpdateAssignmentsWithForcePrincipal>
        </UpdateAssignmentsWithForcePrincipalResponse>
    </SOAP:Body>
</SOAP:Envelope>
Request Parameters Description

Parameter

Description

Mandatory

Accepted input values

WorkspaceID Unique and valid ID of the Collaborative Workspace (CWS) No GUID or null

ID

ID of the assignment. It is used to identify the assignment to be updated.

Yes

This Assignment ID is returned when an assignment is read, for instance, by using GetAssignments API.

AssignmentRoot

Assignment root ID. GUID retrieved from InitializeAssignmentRoot must be used.

Yes

GUID

UserDN

User DN

Yes

Distinguished Name of the user. For example, cn=cordysuser,cn=organizational users,o=development,cn=cordys,cn=build1,o=vanenburg.com

UnitID

Organization unit ID

Yes

ID of a unit, usually GUID, which is retrieved using the getUnits API.

QName Fully Qualified Name (FQN) of the organization unit Yes String
Name Name of the organization unit Yes String

RoleDN

Role DN

Yes

Distinguished Name of a role. For Example, cn=cordysrole,cn=organizational roles,o=system,cn=cordys,cn=build1,o=vanenburg.com. The role must be an existing role in the unit.

EffectiveDate

Start date of the assignment; if empty, the assignment has no start date.

Yes

Date in UTC format. For example 2008-09-23T22:37:53.234.

FinishDate

End date of the assignment; if empty, assignment has no end date

Yes

Date in UTC format. For example 2008-09-23T22:37:53.234.

IsPrincipalUnit

Principal unit of the user

Yes

If the value provided is:

  • true - this unit will be the principal unit of the user.
  • false - this unit will not be the principal unit of the user.

DoPublish

This parameter is ignored.

Yes

true or false

ForceSetPrincipal

Flag which is used to indicate whether any existing setting of the principal unit may be overwritten. If true, it overwrites. If false, an error is displayed stating that the principal has been set already.

Yes

true or false

SOAP Response

<UpdateAssignmentsWithForcePrincipalResponse xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0">
    <UpdateAssignmentsWithForcePrincipal>
        <dataset xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0">
            <tuple>
                <old>
                    <Assignment xmlns="http://schemas.cordys.com/userassignment/UserAssignmentService/1.0">
                        <ID>001CC438-906D-11E2-EECC-951E26303F4B</ID>
                        <UserDN>cn=mnagarjuna,cn=organizational users,o=system,cn=cordys,o=orr.com</UserDN>
                        <EffectiveDate>2013-02-13T00:00:00.0000</EffectiveDate>
                        <FinishDate>2013-02-22T05:36:00.800</FinishDate>
                        <IsPrincipalUnit>true</IsPrincipalUnit>
                        <IsEffective>yes</IsEffective>
                        <UnitID>001CC438-906D-11E2-EECC-49936ED1DF4B</UnitID>
                        <QName>teams/college</QName>
                        <Name>001CC438-906D-11E2-EECC-49936ED1DF4B</Name>
                        <RoleDN>cn=professor,cn=organizational roles,o=system,cn=cordys,o=orr.com</RoleDN>
                        <UnitRoleID>001CC438-906D-11E2-EECD-0D30315AFF4B</UnitRoleID>
                        <IsLeadRole>false</IsLeadRole>
                        <AssignmentRoot>001CC438-906D-11E2-EECC-8FE3BE469F4B</AssignmentRoot>
                    </Assignment>
                </old>
            </tuple>
        </dataset>
    </UpdateAssignmentsWithForcePrincipal>
</UpdateAssignmentsWithForcePrincipalResponse>
Response Parameters

Parameter

Description

ID

ID of the Assignment

UserDN

DN of the User cn=$userName,cn=organizational users,o=system,cn=cordys,cn=$instanceName,o=$domain

EffectiveDate

Date on which the assignment starts. If there is no start date, the effective date is taken as the default date.

FinishDate

Date on which the assignment ends. If there is no finish date, the assignment does not end.

IsPrincipalUnit

Given unit is the principal unit of the user (true or false)

IsEffective

Assignment is valid, based on the calculations from the EffectiveDate and the FinishDate (true or false)

UnitID

ID of the organization unit

QName
Fully Qualified Name (FQN) of the organization unit
Name Name of the organization unit

RoleDN

DN of the Role cn=My_role,cn=my-isvp,cn=cordys,cn=Env1,o=cordys.com

UnitRoleID

ID of the unit-role combination

IsLeadRole

Given role is lead role of this organization unit or not (true or false)

AssignmentRoot

ID of the Assignment root