OnboardingContractorCreateContractorIdentity2 Method |
This code method is intended specifically for the OIM Packaged Solution.
The code method is used in the "On-board contractor" process template. It creates a new identity data object for the on-boarded contractor. If the property "CONTRACTORIDENTITY" is set to an an existing Contractor Identity Object ID, the method will update the existing identity instead of creating a new one.
The action object is used as a template for the new identity. The copy rule with UID FB8628C0-9D0B-4A5C-87D2-6BAAFCB5F311 is used to copy data from the action object to the identity. The identity is always classified as a contractor in the IDENTITYCATEGORY property. The identity is always classified as primary in the IDENTITYTYPE property.
An IdentityID is generated and assigned to the identity. Afterwards a user is created for the identity. The user is then added to the "Contractors" user group.
'On create' event definitions for the new Identity are executed.
The new identity is set to status "Inactive", "Active" or "Terminated" depending on the stated validity period.
The method creates role assignment data objects for the selected roles in the process. If the roles require approval (depends on the settings on their role folder(s)) a number of approval processes are launched.
Codemethod usage | Description |
---|---|
Designed to be used in a process only | Yes |
Action Object (data object type) | On-boarding contractor |
Security | The method overrides all security. It therefore doesn't have to be executed by the SYSTEM user. |
Namespace: Omada.OE.Solution.OIM.Assembly.PackagedSolution
public void CreateContractorIdentity2( CodeMethodInvokeContext context, string configuration, out int identityId, out string identityIdent )